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

1.1.13 • 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

/@portabletext/react-native/

    Package Sidebar

    Install

    npm i @portabletext/react-native

    Weekly Downloads

    6,407

    Version

    1.1.13

    License

    MIT

    Unpacked Size

    19.6 kB

    Total Files

    13

    Last publish

    Collaborators

    • stipsan
    • snorreeb
    • sanity-io
    • kmelve
    • rexxars
    • skogsmaskin
    • mariuslundgard
    • bjoerge
    • rbotten