List of React's HTML and SVG tag names
npm install react-tag-namesList of React's HTML and SVG tag names. Tag names are scraped directly from@types/react, so you are getting exactly the tag names that React uses
internally.
- Tag names are divided into HTML and SVG tag names. This is useful since React
uses different typings for those two categories.
- Instead of kebab-case (e.g. clip-path), React uses camel-case (clipPath).
- Since the tag names are taken directly from React's type definition, you are
guaranteed to always get exactly the tags that React supports.
``sh`
npm install react-tag-names
> _Note: Previous versioning of react-tag-names was coupled to respectivereact@16.9.2
> react versions (e.g. => react-tag-names@16.9.2). As React'sreact-tag-names
> list of tag names only changes very rarely, this convention has been
> discontinued. now follows its own versioning, starting at
> v1.0.0._
`js`
import reactTagNames from "react-tag-names";
reactTagNames: string[] — List of all React tag names (sorted HTML first
and SVG last)
`js
[
"a",
"abbr",
"address",
// ...
"video",
"wbr",
"webview",
"animate",
"circle",
"clipPath",
// ...
"tspan",
"use",
"view",
];
`
`js`
import { htmlTagNames } from "react-tag-names";
htmlTagNames: string[] — List of HTML React tag names
`js`
[
"a",
"abbr",
"address",
// ...
"video",
"wbr",
"webview",
];
`js`
import { svgTagNames } from "react-tag-names";
svgTagNames: string[] — List of SVG React tag names
`js`
[
"animate",
"circle",
"clipPath",
// ...
"tspan",
"use",
"view",
];
- html-tag-names — List of HTML
tags
- mathml-tag-names — List of
MathML tags
- svg-tag-names — List of SVG tags
- svg-element-attributes —
Map of SVG elements to allowed attributes
- html-element-attributes
— Map of HTML elements to allowed attributes
- aria-attributes` — List of ARIA
attributes