milesj / interweave

🌀 React library to safely render HTML, filter attributes, autowrap text with matchers, render emoji characters, and much more.
https://interweave.dev
MIT License
1.09k stars 38 forks source link
autolink emoji emoji-picker emoji-unicode html-parsing interpolation matcher react react-elements

Interweave

Build Status npm version npm deps

Interweave is a robust React library that can...

<Interweave content="This string contains <b>HTML</b> and will safely be rendered!" />
<Interweave
    content="This contains a URL, https://github.com/milesj/interweave, and a hashtag, #interweave, that will be converted to an anchor link!"
    matchers={[new UrlMatcher('url'), new HashtagMatcher('hashtag')]}
/>

Requirements

Installation

Interweave requires React as a peer dependency.

yarn add interweave react
// Or
npm install interweave react

Documentation

https://interweave.dev