0.5.8 • Published 1 month ago

react-native-html-component v0.5.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

React Native HTML Component

This allows you to render HTML content within your application. It accepts a string of HTML content as a prop and renders it within a WebView component. This makes it easy to integrate rich HTML content into your React Native application.

npm version

Installation

Expo

expo install react-native-html-component react-native-webview

Other

npm install react-native-html-component react-native-webview
# OR
yarn add react-native-html-component react-native-webview
#OR
pnpm add react-native-html-component react-native-webview

Usage

import HtmlC from 'react-native-html-component';

export default function App() {
    return (
        <Html html="<p>Hello World!</p>" />
    )
}

Props

html

A string that represents the HTML content to be rendered.

➤ Type: string


allowTextSelection

An optional boolean that determines whether text selection is allowed.

➤ Type: boolean ➤ Default: false


backgroundColor

An optional string that sets the background color of the root html.

➤ Type: string ➤ Default: 'transparent'


color

An optional string that sets the text color of the root html.

➤ Type: string ➤ Default: '#000000'


fontSize

An optional number that sets the font size of the root html.

➤ Type: number ➤ Default: 16


style

An optional StyleProp object that can be used to apply custom styles to the component.

➤ Type: StyleProp<ViewStyle>

0.5.8

1 month ago

0.5.7

5 months ago

0.5.6

9 months ago

0.5.5

9 months ago

0.5.4

10 months ago

0.5.3

10 months ago

0.5.1

10 months ago

0.5.0

10 months ago

0.0.1

10 months ago