Tool Open source
Sugar High is a lightweight, zero-dependency JavaScript syntax-highlighting library that runs in browsers and JavaScript runtimes and converts source code to HTML without requiring a DOM. It supports JavaScript, TypeScript, CSS, Python, C, Go, Java, Rust, JSON, Markdown, SQL, HTML, YAML, and other built-in languages and formats, with alias normalization for inputs such as filename extensions and Markdown fences.
The library exposes a one-step highlight function and a composable core that separates syntax parsing from HTML rendering. Token classes can be customized with class maps or token hooks, while line-level hooks support highlighting or modifying generated lines; CSS custom properties provide theming. Its React package supplies Code and textarea-overlay Editor components, and its Remark plugin highlights fenced code blocks during Markdown processing.
Sugar High also provides an opt-in experimental WebGPU entry for asynchronous, language-agnostic highlighting through gpu-lexer. It is distributed as npm packages under the MIT license, with a separate core entry for selective language configurations.
1 use taken from transcripts — each links to the moment in the video.
A lightweight, zero-dependency syntax highlighter that converts source code into colored HTML in browsers or on the server without a DOM. It supports many languages, customizable token classes, line-level hooks, CSS-variable theming, and React and Markdown plugins.
1 in the library.