Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 879 Bytes

File metadata and controls

54 lines (35 loc) · 879 Bytes

react-native-html

Load arbitrary HTML

Simple HTML renderer for react-native

Ever had challenges rendering something in react-native? Can it render in HTML?

This simple package is worth a try.

Installation

npm install react-native-html --save

Props

Prop Type Note
html String
style WebView style This extends WebView styles
<any WebView props Any other WebView prop(s)
import Html from 'react-native-html';

const SomeComponent = () => (
  <View style={{ flex: 1 }}>
    <Html
      style={{ width: 80, height: 80 }}
      source={"<h1>hello world</h1>"
    />
  </View>
);

Dev

Lint & test (todo)


npm test

Inspiration

https://github.com/chitezh/react-native-svg-image