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
highlight.js
Zero-dependency JavaScript syntax highlighter with automatic language detection for over 190 languages.
Shiki
A syntax highlighter that renders code with the exact TextMate grammars and themes VS Code uses.
@codemirror/language
Language support infrastructure for the CodeMirror 6 editor: parsing, indentation, code folding, bracket matching, and syntax highlighting.
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.
lang-javascript
JavaScript, TypeScript, and JSX language support for the CodeMirror 6 code editor.
@lezer/highlight
Syntax highlighting framework that maps Lezer parse trees to styleable highlighting tags
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
Fumadocs Core
The headless React library for building documentation websites, with source loading, page trees, MDX processing, search, and i18n.
@codemirror/lang-python
Python language support for the CodeMirror code editor, with highlighting, indentation, and autocompletion.
rehype-highlight
Rehype plugin that syntax-highlights code blocks at build time using lowlight and highlight.js.
Ace Builds
Prebuilt Ace code editor bundles for embedding a fast, extensible editor with 100+ language modes in any web app
Pygments
Generic syntax highlighter for Python supporting over 500 languages and formats
diff2html
Generate pretty, GitHub-style HTML diffs from git diff or unified diff output