Home

Awesome

react-tag-names

List 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.

react-tag-names vs html-tag-names

Install

npm install react-tag-names

Note: Previous versioning of react-tag-names was coupled to respective react versions (e.g. react@16.9.2 => react-tag-names@16.9.2). As React's list of tag names only changes very rarely, this convention has been discontinued. react-tag-names now follows its own versioning, starting at v1.0.0.

Usage

All (default export)

import reactTagNames from "react-tag-names";

reactTagNames: string[] — List of all React tag names (sorted HTML first and SVG last)

[
  "a",
  "abbr",
  "address",
  // ...
  "video",
  "wbr",
  "webview",

  "animate",
  "circle",
  "clipPath",
  // ...
  "tspan",
  "use",
  "view",
];

HTML (htmlTagNames export)

import { htmlTagNames } from "react-tag-names";

htmlTagNames: string[] — List of HTML React tag names

[
  "a",
  "abbr",
  "address",
  // ...
  "video",
  "wbr",
  "webview",
];

SVG (svgTagNames export)

import { svgTagNames } from "react-tag-names";

svgTagNames: string[] — List of SVG React tag names

[
  "animate",
  "circle",
  "clipPath",
  // ...
  "tspan",
  "use",
  "view",
];

Related

License

MIT © Jonas Gierer