# Sugar High: 6.5 out of 10

Reasonable, with limits. 5th of 8 in [Code editors and highlighters](https://elestia.ai/opensource/code-editors/index.md).

Sugar High is a tiny highlighter with no dependencies. It turns JavaScript, TypeScript, JSX and about 30 other languages into HTML colored with CSS variables. It suits small blogs and docs that care about bundle size, but it guesses tokens with heuristics, so Shiki is more accurate and Prism or highlight.js are more proven for broad use.

**Best for:** Next.js or React blogs and docs that mostly show JS/TS code and want a highlighter of a few KB with no dependencies.

## Scores

- **Overall: 6.5** (likely 5.4 to 7.5)
  - Claude Opus 5.5 (5.5): It is a good fit when bundle size matters most and the code shown is mostly JS/TS. For most new projects, though, Shiki gives more accurate results at build time, and Prism or highlight.js have much wider use and validation. Active development is a plus, but it depends on one person and v2 broke the API, which keeps the score in the middle.
  - GPT-6.2 Sol (7.4): Sugar High is a strong pick for new projects that need compact, synchronous highlighting for common languages, especially JavaScript and TypeScript. Shiki is the stronger choice for broad language coverage and faithful tokenization, and CodeMirror is better suited to editing with completion and linting. Frequent releases support choosing Sugar High today, while concentrated maintenance and changes to the core API leave some uncertainty about upgrades.
- **Needed by many: 4.6** (likely 3.5 to 5.7)
  - Claude Opus 5.5 (5.0): Many web developers need to show code on docs sites and blogs, but Sugar High only highlights; its Editor component is a thin textarea, not a real editor. Its JS-first design fits a niche inside the highlighting part of the category.
  - GPT-6.2 Sol (4.1): Documentation, technical blogs, and browser playgrounds are a clear niche within frontend development. The framework-independent core reaches beyond React, while interactive editing comes through a basic React component. State of JS measures frontend work broadly, so the share of developers who need code highlighting is an estimate.
- **Helps a lot: 6.6** (likely 5.5 to 7.6)
  - Claude Opus 5.5 (5.5): It is fast, tiny, typed and easy to theme, and v2 added a composable core, line marking and React and remark integrations. It guesses tokens with heuristics, which can color them wrong, and it covers far fewer languages than Shiki, whose grammars are more accurate. An independent TanStack comparison found it produced much more HTML and ran slower in a large batch run, though that test used an older version.
  - GPT-6.2 Sol (7.6): Version 2.7.0 has a small, well-documented TypeScript API, JSX and TSX support, and hooks for styling tokens and lines. Types and examples make the common integration easy to check in an AI-assisted workflow. Independent JavaScript tests show fast highlighting and potentially bulky HTML, with results tied to specific inputs and earlier 2.x builds. Shiki offers fuller grammars, and CodeMirror offers deeper editing features.
- **Holds up over time: 6.6** (likely 5.3 to 8.0)
  - Claude Opus 5.5 (6.0): Activity is very high: 243 commits, 41 releases and 26 npm versions in the last year, the latest published in November 2026, and only 1 open issue. But it rests on one main maintainer working on it as a side project, and the v2 rewrite broke many APIs, which suggests more churn ahead.
  - GPT-6.2 Sol (7.2): The repository recorded 243 commits and the core package published 26 versions in the past year. The maintainer has sponsors across several projects, and npm lists one collaborator for Sugar High. Reported CSS and line-number problems were resolved after several months. The v2 upgrade changed APIs, and 2.7.0 removed core options in a minor release, so custom integrations carry more upgrade risk.
- **Used widely: 3.9** (likely 2.7 to 5.2)
  - Claude Opus 5.5 (4.0): Downloads rose from 170k to 1.75M per 4 weeks, a ratio of about 10x against a median of 4.1. But only 33 repos and 9 packages depend on it, so most installs probably come through another tool rather than direct choice. Direct users likely number in the low thousands, far behind Shiki, Prism and highlight.js, and roughly level with starry-night.
  - GPT-6.2 Sol (3.8): Four-week npm downloads rose to 1.75 million from 170,035, a 10.3× increase against the catalog baseline of 4.1×. Ecosyste.ms found 33 dependent repositories and nine packages, below even starry-night's repository count and far behind Shiki. About 1,400 stars and three Bluesky posts show modest visible attention, while automated installs and starter templates make direct adoption hard to estimate.
- **Vouched for: 4.6** (likely 3.4 to 6.0)
  - Claude Opus 5.5 (3.0): The only independent signals are a TanStack comparison that calls it a good fit for compact JS/TS highlighting, a few blog mentions, and an Obsidian plugin. No survey data, no story on Hacker News, and no well-known production users could be confirmed.
  - GPT-6.2 Sol (6.1): The Dracula Theme site uses v2, and a contributor confirmed that a CSS fix let the site remove its workarounds. An independent blog documents using it for server-rendered snippets, and an independent benchmark found good speed on a large JavaScript input. Vercel's blog starter and OpenAI's Apps SDK examples use older versions, so they add limited evidence about the current release.
- **Safe: 8.0** (likely 6.7 to 9.1)
  - Claude Opus 5.5 (8.0): It has no dependencies, no advisories, and is MIT-licensed on npm. There is no OpenSSF Scorecard, and one person controls publishing, which keeps the score from the top. GitHub does not detect a licence on the repository, but the npm package states MIT.
  - GPT-6.2 Sol (8.0): The core package declares MIT, has zero runtime dependencies, and has no recorded OSV advisories. The release workflow uses npm trusted publishing and enables provenance. One listed npm collaborator, the absence of a published security policy, and missing OpenSSF Scorecard data limit confidence in release oversight and incident response.

## Good

- Very small and dependency-free: about 5 KB gzipped for TypeScript, and the core is near 1 KB.
- Returns plain HTML strings without a DOM, so it works at build time, on the server or in the browser.
- Themes are plain CSS custom properties, and line numbers and line marks need no extra plugins.
- Very active in 2026: v2 added a core parse/render API, React components and a remark plugin.

## Bad

- It guesses tokens with heuristics instead of real grammars, so colors are less accurate than Shiki's TextMate output, especially outside JS/TS.
- It supports far fewer languages than Shiki, Prism or highlight.js, and Vue and Svelte get only base HTML colors.
- v2 broke the v1 API: presets, lineClassName, root exports and the React and remark packages all changed.
- One person drives the project, and few independent users or companies are known to run it in production.

## The numbers

- Downloads, 4 weeks: 1.7M
- In a year: ×10
- GitHub stars: 1.4k
- Commits, 12 months: 243
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/huozhi/sugar-high
- npm: https://www.npmjs.com/package/sugar-high

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
