@godievski/rn-syntax-highlighter
TypeScript icon, indicating that this package has built-in type declarations

0.1.11 • Public • Published

RN Syntax Highlighter

Syntax highlighting component for React Native using react-syntax-highlighter

Install

npm install @godievski/rn-syntax-highlighter --save npx pod-install

Use

props

Accepts almost all of the same props as react-syntax-highlighter with some additional props.

  • fontFamily (string) - the font family to use for syntax text.
  • fontSize (number) - the fontSize for syntax text.
  • dark (boolean) - darkmode for the numbers of the lines
  • startingLineNumber (number) - number from the line numbering will start
  • highligter (string) - defaults to rendering with vdom created from highlightjs, but can pass in prism as alternate option. You can see more about dealing with the prism highlighter in the docs for react-syntax-highlighter but one of the main uses would be better support for jsx

Package Sidebar

Install

npm i @godievski/rn-syntax-highlighter

Weekly Downloads

22

Version

0.1.11

License

ISC

Unpacked Size

13.1 kB

Total Files

8

Last publish

Collaborators

  • godievski