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.
React Syntax Highlighter
A React component for syntax-highlighting code blocks using highlight.js or Prism ASTs, with JavaScript-based styles and no external stylesheet required.
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
Chroma
A general-purpose syntax highlighting library for Go, supporting 200+ languages and multiple output formats out of the box.
syntect
High-quality Rust syntax highlighting using Sublime Text's grammar and theme formats
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-shiki
A performant syntax-highlighting component and hook for React, powered by Shiki's TextMate grammars and themes.
tree-sitter-language-pack
Precompiled tree-sitter parsers and queries for 306+ languages in one install
highlightjs-curl
A highlight.js language grammar module that adds cURL command syntax highlighting to any site or app.
react-refractor
A thin React wrapper around refractor/Prism that renders syntax-highlighted code as virtual DOM instead of touching the DOM directly.
tree-sitter-astro-next
An Astro grammar for tree-sitter, compatible with tree-sitter 0.25+