Skip to content

godievski/rn-syntax-highlighter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Syntax highlighter for react-native

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages