diff --git a/README.md b/README.md index cadba78..3bcff3d 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,42 @@ +
+ # react-html5-parser -Fast, simple and small HTML to React parser for the browser and React Native, sanitized by default +**Turn HTML strings into React and React Native elements, sanitized by default.** [![npm version](https://img.shields.io/npm/v/react-html5-parser)](https://www.npmjs.com/package/react-html5-parser) +[![npm downloads](https://img.shields.io/npm/dm/react-html5-parser)](https://www.npmjs.com/package/react-html5-parser) +[![types](https://img.shields.io/npm/types/react-html5-parser)](#other-exports) [![CI](https://img.shields.io/github/actions/workflow/status/devmaxxx/react-html5-parser/ci.yml?branch=main&label=CI)](https://github.com/devmaxxx/react-html5-parser/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md) -- Turns an HTML string into React elements, with no `dangerouslySetInnerHTML`. -- Sanitized by default with DOMPurify, run on the parsed tree so nothing is parsed twice. -- Swap any tag for your own component, or rewrite nodes and elements as they render. -- A 3 kB core entry for when you bring your own sanitizer. -- A React Native entry that renders `View`, `Text` and `Image`. -- Never throws on bad input: returns `null` and reports through `onError`. -- ESM and CommonJS builds, with TypeScript types. +[Install](#install) · [Use](#use) · [API](#api) · [React Native](#react-native) · [Examples](EXAMPLES.md) · [Changelog](CHANGELOG.md) + +
+ +## Features + +- **No `dangerouslySetInnerHTML`.** HTML becomes real React elements you can map, wrap and replace. +- **Safe by default.** DOMPurify runs on the parsed tree, so nothing is parsed twice and the checked tree is the rendered tree. +- **The browser's own HTML5 parser.** Markup is read exactly as the page would read it, inside an inert `