svg-tag-names
List of known SVG tag names
Last updated 3 years ago by wooorm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install svg-tag-names 
SYNC missed versions from official npm registry.

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 12.20+, 14.14+, or 16.0+), install with npm:

npm install svg-tag-names

In Deno with Skypack:

import {svgTagNames} from 'https://cdn.skypack.dev/svg-tag-names@3?dts'

In browsers with Skypack:

<script type="module">
  import {svgTagNames} from 'https://cdn.skypack.dev/svg-tag-names@3?min'
</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 following identifiers: svgTagNames. There is no default export.

svgTagNames

List of known (lowercase) SVG tag names (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

Current Tags

  • 3.0.1                                ...           latest (3 years ago)

8 Versions

  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           4 years ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.1.2                                ...           6 years ago
  • 1.1.1                                ...           7 years ago
  • 1.1.0                                ...           8 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (18)

© 2010 - cnpmjs.org x YWFE | Home | YWFE