A lightweight, easy-to-use and framework agnostic syntax highlighter for your code examples(snippets) in web applications
Table of Contents
- Why yet another code highlighter?
- Supported Languages
Why yet another code highlighter?
There are many syntax highlighters avaliable already but most of those are either complex to setup or front end framework specific.
@favware/syntax-highlighter-reactis built using StencilJS. You can use it everywhere, i.e. Angular, React, Vue, any framework, No Framework!
- Uses PrismJS for syntax highlighting
- Light and Dark mode supported
- Copy code support
- Supports many languages, see Supported Languages
- Will default to using Fira Code as font family
yarn add @favware/syntax-highlighter-react @favware/syntax-highlighter-react # or npm install @favware/syntax-highlighter-react @favware/syntax-highlighter-react
To limit the size of this library a selection has been made from all langauges supported by PrismJS. The chosen languages are those that we consider the most popular / common. If you want to see another languages supported you're always free to open an issue