@qpavy/protable-text-react-native
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@portabletext/react-native

Note: Experimental! Please report issues and feedback.

Render Portable Text with React Native.

Utilizes @portabletext/react under the hood, and thus has the exact same API, but will render React Native views instead of HTML.

Installation

npm install --save @portabletext/react-native

Basic usage

import {PortableText} from '@portabletext/react-native'

<PortableText
  value={[/* array of portable text blocks */]}
  components={/* optional object of custom components to use */}
/>

Styling the output

The rendered views has very little or no styling applied, so you will quite often want to pass custom components to override the built-in ones.

Customizing components

Customizing components are done in the same way as in @portabletext/react - see the README for more details.

License

MIT © Sanity.io

Readme

Keywords

Package Sidebar

Install

npm i @qpavy/protable-text-react-native

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

19.9 kB

Total Files

13

Last publish

Collaborators

  • qpavy