# react-domproperty

> Convert HTML DOM attributes to React DOM attributes

Latest version **1.0.6** (published 2020-07-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-domproperty
pnpm add react-domproperty
yarn add react-domproperty
bun add react-domproperty
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2020-07-12 |
| First published | 2020-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 12.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | tizee |
| Maintainers | tizee |
| Keywords | react, html, dom, attribute, convert, react-domproperty |

## Links

- npm: https://www.npmjs.com/package/react-domproperty
- Repository: https://github.com/tizee/react-domproperty
- Homepage: https://github.com/tizee/react-domproperty#readme
- Issues: https://github.com/tizee/react-domproperty
- npm.io page: https://npm.io/package/react-domproperty

## 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.6 (latest) — 2020-07-12
- 1.0.5 — 2020-07-12
- 1.0.4 — 2020-07-11
- 1.0.2 — 2020-07-09
- 1.0.1 — 2020-07-09
- 1.0.0 — 2020-07-09

## README

<div align="center">
<h1> react-domproperty </h1>

<p>Convert HTML DOM attributes to React DOM attributes</p>
</div>

[![Build Status][build-badge]][build]
[![Code Coverage][coverage-badge]][coverage]
[![version][version-badge]][package]
[![MIT License][license-badge]][license]
[![PRs Welcome][pr-welcome]](http://makeapullrequest.com)

## Why?

- [react-attr-convert](https://github.com/utatti/react-attr-converter) does a great job but it has no longer been maintained.
- [babel-plugin-react-html-attrs](https://github.com/insin/babel-plugin-react-html-attrs) is just overkill for such a simple conversion task.

## Usage

```js
const convert = require('react-domproperty');
// nomral html attribute
convert('autoplay'); // => autoPlay
convert('crossOrigin'); // => crossOrigin
// SVG attribute
convert('xml:base'); // => xmlBase
// event handler
convert('onclick'); // => onClick
// bypass custom attributes
convert('custom-x'); // => custom-x
```

## Supported Attributes

See [attributes](./doc/attributes.md).

## Other

This project uses [ts-rollup-boilerplate](https://github.com/tizee/ts-rollup-boilerplate) as a starter.

## LICENSE

[MIT](./LICENSE)

[package]: https://www.npmjs.com/package/react-domproperty
[version-badge]: https://img.shields.io/npm/v/react-domproperty.svg?style=flat-square
[build]: https://travis-ci.com/tizee/react-domproperty
[build-badge]: https://travis-ci.org/tizee/react-domproperty.svg?branch=master
[coverage]: https://codecov.io/github/tizee/react-domproperty
[coverage-badge]: https://img.shields.io/codecov/c/github/tizee/react-domproperty.svg?style=flat-square
[license]: https://github.com/tizee/react-domproperty/blob/master/LICENSE
[license-badge]: https://img.shields.io/npm/l/react-domproperty.svg?style=flat-square
[pr-welcome]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square

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