All Projects → wooorm → svg-element-attributes

wooorm / svg-element-attributes

Licence: MIT License
Map of SVG elements to allowed attributes

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to svg-element-attributes

svg-tag-names
List of known SVG tag names
Stars: ✭ 22 (+37.5%)
Mutual labels:  element, tag
Vue Gl
Vue.js components rendering 3D WebGL graphics reactively with three.js
Stars: ✭ 434 (+2612.5%)
Mutual labels:  element, tag
vue-resize-sensor
detect container resizing
Stars: ✭ 75 (+368.75%)
Mutual labels:  element
TagEditText
A simple Android Tag EditText
Stars: ✭ 14 (-12.5%)
Mutual labels:  tag
Id3
Library to read, modify and write ID3 & Lyrics3 tags in MP3 files. Provides an extensible framework for retrieving ID3 information from online services.
Stars: ✭ 27 (+68.75%)
Mutual labels:  tag
markdown-editor
一个在线的markdown编辑器
Stars: ✭ 78 (+387.5%)
Mutual labels:  element
ShowMoreText
This is simple library for creating textview expandable. Like Continue or Less. This library extended versiion TextView. Easy to use.
Stars: ✭ 97 (+506.25%)
Mutual labels:  tag
imageorient
Go image decoding with respect to the EXIF orientation tag
Stars: ✭ 62 (+287.5%)
Mutual labels:  tag
laravel-boolean-dates
Automatically convert Eloquent model boolean attributes to dates (and back).
Stars: ✭ 31 (+93.75%)
Mutual labels:  attributes
TagField
🏷 Simple Tag Field for SwiftUI 🏷
Stars: ✭ 19 (+18.75%)
Mutual labels:  tag
botdarr
Slack/Discord/Telegram/Matrix bot for accessing radarr, sonarr, and lidarr
Stars: ✭ 76 (+375%)
Mutual labels:  element
3d-tag-cloud-for-react
基于 react 的 3d 标签云
Stars: ✭ 23 (+43.75%)
Mutual labels:  tag
StickerLayout
sticker layout,图片缩放拖动。在图片上打图标和文字标签
Stars: ✭ 15 (-6.25%)
Mutual labels:  tag
hoc-element-table
📦 A Vue 3.x Table Component built on Webpack 5
Stars: ✭ 26 (+62.5%)
Mutual labels:  element
H2PC TagExtraction
A application made to extract assets from cache files of H2v using BlamLib by KornnerStudios.
Stars: ✭ 12 (-25%)
Mutual labels:  tag
vue-element-admin-ts
vue-element-admin 的 typescript 版本
Stars: ✭ 101 (+531.25%)
Mutual labels:  element
job-plus
Job Plus项目是基于SpringBoot+Vue的轻量级定时任务管理系统
Stars: ✭ 17 (+6.25%)
Mutual labels:  element
element-table
An extended table to integration with bootstrap-table and element-ui.
Stars: ✭ 18 (+12.5%)
Mutual labels:  element
attribute-events
🔥 Fire events on attribute changes of your Eloquent model
Stars: ✭ 198 (+1137.5%)
Mutual labels:  attributes
action-autotag
Automatically generate a new tag when the manifest file (package.json, Dockerfile, custom file, etc) version changes.
Stars: ✭ 45 (+181.25%)
Mutual labels:  tag

svg-element-attributes

Build Coverage Downloads Size

Map of SVG elements to allowed attributes.

Contents

What is this?

This is a map of tag names to lists of allowed attributes. Global attributes are stored at the special tag name *. All attributes from SVG 1.1, SVG Tiny 1.2, and SVG 2 are included.

👉 Note: Includes deprecated attributes.

👉 Note: ARIA (role, aria-*), event (ev:event, on*), or xml:* and xlink:* attributes are not included.

When should I use this?

You can use this to figure out if certain attributes are allowed on certain SVG elements.

Install

This package is ESM only. In Node.js (version 12.20+, 14.14+, or 16.0+), install with npm:

npm install svg-element-attributes

In Deno with Skypack:

import {svgElementAttributes} from 'https://cdn.skypack.dev/svg-element-attributes@2?dts'

In browsers with Skypack:

<script type="module">
  import {svgElementAttributes} from 'https://cdn.skypack.dev/svg-element-attributes@2?min'
</script>

Use

import {svgElementAttributes} from 'svg-element-attributes'

console.log(svgElementAttributes['*'])
console.log(svgElementAttributes.circle)

Yields:

[
  'about',
  'class',
  'content',
  'datatype',
  'id',
  'lang',
  'property',
  'rel',
  'resource',
  'rev',
  'tabindex',
  'typeof' ]
[
  'alignment-baseline',
  'baseline-shift',
  'clip',
  'clip-path',
  'clip-rule',
  // …
  'transform',
  'unicode-bidi',
  'visibility',
  'word-spacing',
  'writing-mode' ]

API

This package exports the following identifiers: svgElementAttributes. There is no default export.

svgElementAttributes

Map of lowercase SVG elements to allowed attributes (Record<string, Array<string>>).

Types

This package is fully typed with TypeScript.

Compatibility

This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 12.20+, 14.14+, and 16.0+. It also works in Deno and modern browsers.

Security

This package is safe.

Related

Contribute

Yes please! See How to Contribute to Open Source.

License

MIT © Titus Wormer

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].