# huozhi/sugar-high

Super lightweight code syntax highlighter solution

Repository: https://github.com/huozhi/sugar-high
Canonical: https://ross.abutalabs.com/products/sugar-high
Homepage: https://sugar-high.vercel.app
Language: TypeScript
License Family: other
Topics: highlight, js, jsx, syntax-highlighting, syntax, highlighter, code-block, code-editor, editor, minimalist, react, remark, remark-plugin
Last push: 2026-09-02T23:04:46+00:00

## Health v2 (maintenance only)
Score: 100/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 100, longevity 100
- inputs: {"age_days": 1678, "days_push": 0, "days_rel": 0, "gap_med": 8.5, "n_releases_24m": 25}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1294, forks 28 (observed 2026-09-03T02:15:12.768826+00:00)

## What it is
Sugar High is a super lightweight, zero-dependency syntax highlighter library that tokenizes source code into styled spans with a tiny custom parser. It ships with 25 built-in languages (JavaScript/JSX and TypeScript by default), light/dark token palettes driven by CSS variables, and integrates with React and remark-based Markdown pipelines.

## Use cases
- add syntax highlighting to code blocks in my react blog
- lightweight alternative to prism or shiki for code highlighting
- highlight code snippets in markdown docs via a remark plugin
- display jsx and typescript snippets with colors on my site
- zero-dependency syntax highlighter that keeps bundle size small
- theme code block token colors with css variables for light and dark mode
- highlight code in a static site without shipping heavy grammar files

## When to choose
- you need minimal bundle size and zero runtime dependencies
- you want full CSS control over token colors via custom properties and per-line styling
- you render JavaScript, JSX, TypeScript, or any of its 25 built-in languages in React or remark/MDX sites
- you prefer a tiny tokenizer over heavyweight grammar engines

## When to avoid
- you need exhaustive or highly accurate grammar coverage for complex or obscure languages
- you want a batteries-included ecosystem with many official plugins, line-number widgets, or UI chrome
- you require IDE-grade highlighting fidelity for deeply nested or templated code

## Facets
- artifact type: library
- maturity: active
- function: parser, editor, markdown
- domain: web-development, frontend, developer-tools, documentation
- platform: browser
- tags: syntax-highlighting, code-block, tokenizer, zero-dependency, lightweight, remark-plugin, react, jsx, css-variables, themeable, prism-alternative, shiki-alternative, code-display, nodejs, web-server

## Member repositories
- huozhi/sugar-high (main) score 100

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:12.768826+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:55:44.377478+00:00, confidence not recorded.
  - readme: https://github.com/huozhi/sugar-high (fetched 2026-09-03T02:15:12.768826+00:00, sha c7809f9068d7)
  - homepage: https://sugar-high.vercel.app (fetched 2026-08-29T12:11:55.243210+00:00, sha 2c04b7119c73)
  - registry_npm: https://registry.npmjs.org/sugar-high (fetched 2026-08-29T12:11:55.252815+00:00, sha 0cd740d6e5fa)
- Data as of 2026-08-30T08:39:29.467469+00:00.
