# react-tag-names

> List of React's HTML and SVG tag names

Latest version **1.0.0** (published 2019-08-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-tag-names
pnpm add react-tag-names
yarn add react-tag-names
bun add react-tag-names
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-08-24 |
| First published | 2019-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 21.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | jgierer12 |
| Keywords | react, tag, name, html, svg |

## Links

- npm: https://www.npmjs.com/package/react-tag-names
- Repository: https://github.com/jgierer12/react-tag-names
- Issues: https://github.com/jgierer12/react-tag-names/issues
- npm.io page: https://npm.io/package/react-tag-names

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-08-24
- 16.9.2 — 2019-08-24
- 16.9.1 — 2019-08-09
- 16.8.24 — 2019-08-05
- 16.8.23 — 2019-07-08
- 16.8.22 — 2019-06-28

## README

# 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

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

## Install

```sh
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)

```js
import reactTagNames from "react-tag-names";
```

`reactTagNames: string[]` &mdash; 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",
];
```

### HTML (`htmlTagNames` export)

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

`htmlTagNames: string[]` &mdash; List of HTML React tag names

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

### SVG (`svgTagNames` export)

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

`svgTagNames: string[]` &mdash; List of SVG React tag names

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

## Related

- [`html-tag-names`](https://github.com/wooorm/html-tag-names) — List of HTML
  tags
- [`mathml-tag-names`](https://github.com/wooorm/mathml-tag-names) — List of
  MathML tags
- [`svg-tag-names`](https://github.com/wooorm/svg-tag-names) — List of SVG tags
- [`svg-element-attributes`](https://github.com/wooorm/svg-element-attributes) —
  Map of SVG elements to allowed attributes
- [`html-element-attributes`](https://github.com/wooorm/html-element-attributes)
  — Map of HTML elements to allowed attributes
- [`aria-attributes`](https://github.com/wooorm/aria-attributes) — List of ARIA
  attributes

## License

[MIT](license) &copy; [Jonas Gierer](https://gierer.xyz)

---
_Source: https://npm.io/package/react-tag-names · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
