wooorm/svg-tag-names

List of known SVG tag names

33

stars

68

commits

JavaScript

primary language

Nov 1, 2023

updated

element
name
svg
tag

README

svg-tag-names

Build Coverage Downloads Size

List of known SVG tag names.

Contents

What is this?

This is a list of SVG tag names. It includes all tag names from SVG 1.1, SVG Tiny 1.2, and SVG 2. The repo is includes scripts to regenerate the data from the specs.

When should I use this?

You can use this package when you need to know what tag names are allowed in any version of SVG.

Install

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

npm install svg-tag-names

In Deno with esm.sh:

import {svgTagNames} from 'https://esm.sh/svg-tag-names@3'

In browsers with esm.sh:

<script type="module">
  import {svgTagNames} from 'https://esm.sh/svg-tag-names@3?bundle'
</script>

Use

import {svgTagNames} from 'svg-tag-names'

console.log(svgTagNames.length) // => 94

console.log(svgTagNames.slice(0, 20))

Yields:

[
  'a',
  'altGlyph',
  'altGlyphDef',
  'altGlyphItem',
  'animate',
  'animateColor',
  'animateMotion',
  'animateTransform',
  'animation',
  'audio',
  'canvas',
  'circle',
  'clipPath',
  'color-profile',
  'cursor',
  'defs',
  'desc',
  'discard',
  'ellipse',
  'feBlend'
]

API

This package exports the identifier svgTagNames. There is no default export.

svgTagNames

List of known (lowercase) SVG tag names (Array<string>).

Types

This package is fully typed with TypeScript. It exports no additional types.

Compatibility

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

Security

This package is safe.

Contribute

Yes please! See How to Contribute to Open Source.

License

MIT © Titus Wormer

Contributors

wooorm

66 commits

wooorm/svg-tag-names

List of known SVG tag names

33

stars

68

commits

JavaScript

primary language

Nov 1, 2023

updated

element
name
svg
tag

README

svg-tag-names

Build Coverage Downloads Size

List of known SVG tag names.

Contents

What is this?

This is a list of SVG tag names. It includes all tag names from SVG 1.1, SVG Tiny 1.2, and SVG 2. The repo is includes scripts to regenerate the data from the specs.

When should I use this?

You can use this package when you need to know what tag names are allowed in any version of SVG.

Install

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

npm install svg-tag-names

In Deno with esm.sh:

import {svgTagNames} from 'https://esm.sh/svg-tag-names@3'

In browsers with esm.sh:

<script type="module">
  import {svgTagNames} from 'https://esm.sh/svg-tag-names@3?bundle'
</script>

Use

import {svgTagNames} from 'svg-tag-names'

console.log(svgTagNames.length) // => 94

console.log(svgTagNames.slice(0, 20))

Yields:

[
  'a',
  'altGlyph',
  'altGlyphDef',
  'altGlyphItem',
  'animate',
  'animateColor',
  'animateMotion',
  'animateTransform',
  'animation',
  'audio',
  'canvas',
  'circle',
  'clipPath',
  'color-profile',
  'cursor',
  'defs',
  'desc',
  'discard',
  'ellipse',
  'feBlend'
]

API

This package exports the identifier svgTagNames. There is no default export.

svgTagNames

List of known (lowercase) SVG tag names (Array<string>).

Types

This package is fully typed with TypeScript. It exports no additional types.

Compatibility

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

Security

This package is safe.

Contribute

Yes please! See How to Contribute to Open Source.

License

MIT © Titus Wormer

Contributors

wooorm

66 commits

Languages

JavaScript

100.0%