Syntax Highlighting Packages
Source-code syntax-highlighting libraries for rendering readable, colorized code blocks in docs, editors, and blogs (Shiki, Prism, highlight.js).
Packages in Syntax Highlighting
Kind
Sort:Used by Most Apps
highlight.js
Zero-dependency JavaScript syntax highlighter with automatic language detection for over 190 languages.
prism-react-renderer
A lightweight, themeable Prism syntax highlighter for React and React Native, built on a render-props API.
Prism
Lightweight, extensible syntax highlighting for the web and Node.js, with support for 300+ languages.
lowlight
Virtual syntax highlighting for virtual DOMs and non-HTML things, powered by highlight.js
rehype-highlight
Rehype plugin that syntax-highlights code blocks at build time using lowlight and highlight.js.
diff2html
Generate pretty, GitHub-style HTML diffs from git diff or unified diff output
refractor
Lightweight virtual syntax highlighter that wraps Prism to output hast syntax trees instead of HTML strings.
Sugar High
Lightweight, zero-dependency syntax highlighter that turns code into HTML without a DOM, in browsers and JS runtimes alike.
react-refractor
A thin React wrapper around refractor/Prism that renders syntax-highlighted code as virtual DOM instead of touching the DOM directly.