Prism
Lightweight, extensible syntax highlighting for the web and Node.js, with support for 300+ languages.
Repository Health
Technical Analysis
Prism is a lightweight, robust, and elegant syntax highlighting library for the web. It tokenizes source code against grammar definitions and wraps each token in semantic markup, letting you style code with CSS themes rather than inline styles. Prism ships with definitions for hundreds of languages and a rich plugin ecosystem covering line numbers, copy-to-clipboard, autoloading, diff highlighting, and more.
Originally spun off from Lea Verou’s Dabblet, Prism runs in almost any browser and in Node.js. Its extensible, hook-based design lets you add languages, patch existing grammars, and hook into the highlighting lifecycle, which is why it powers documentation sites, blogs, and static site generators across the ecosystem.
What You Get
- A tiny core tokenizer with grammar definitions for 300+ programming languages
- A theme system driven entirely by CSS, with many bundled and community themes
- A plugin ecosystem: line numbers, copy-to-clipboard, autoloader, diff highlighting, and more
- First-class support for both browsers and Node.js via ESM and CommonJS builds
- TypeScript type definitions and an extensible, hook-based highlighting lifecycle
Common Use Cases
- Highlighting fenced code blocks on documentation sites and technical blogs
- Rendering syntax-highlighted snippets in static site generators at build time
- Displaying read-only code samples inside web apps and component libraries
- Adding language-aware highlighting to Markdown/MDX pipelines
Under The Hood
Architecture - Prism’s core (src/core/) is a small tokenizer: tokenize/tokenize.js walks source text against a grammar object of named regex patterns, producing a doubly linked-list.js token stream that stringify.js renders into nested <span> markup with token-type classes. A registry.js manages language components by id, resolving aliases and lazily loading grammars so hundreds of languages need not all be present. highlight.js, highlight-element.js, and highlight-all.js are the public entry points, with auto-start.js wiring up automatic highlighting of the page. A hook system lets plugins observe and mutate the highlighting lifecycle. Tech Stack - Pure JavaScript authored as ESM in src/, with a custom scripts/build.js producing both the ESM (dist/) and CommonJS (dist/cjs/) builds plus generated TypeScript declarations (types/). It has zero runtime dependencies, targets Node.js >=18, and uses ESLint and Prettier for consistency. Code Quality - The repo carries 27 Mocha test files under tests/ covering the core, individual language definitions, plugins, regex patterns, and identifiers, alongside tsc typechecking of both source and tests. Source is thoroughly JSDoc-annotated (the Registry class documents every field and method), and a dedicated SECURITY.md describes how the maintainers triage ReDoS reports inherent to a regex-based highlighter. API Design - The public surface is deliberately minimal and ergonomic: Prism.highlight(code, grammar, language) for strings, highlightElement/highlightAll for the DOM, and declarative grammar objects plus a hook API for extension. Language grammars can be patched or extended without forking, and the extensive prismjs.com documentation and examples/ folder keep the getting-started boilerplate near zero.
Used by 42 apps in this directory
evidence
Analytics · Data Engineering
Turn SQL queries and markdown files into polished, interactive data apps and business intelligence reports — no drag-and-drop, no GUI, just code.
FeatBit
Developer Tools · Devops
Self-hosted, enterprise-grade feature flag platform for safe, targeted, and data-driven feature releases.
Flagsmith
Ab Testing Experimentation · Developer Tools · Devops
Open-source feature flagging, remote config, and A/B/multivariate testing platform for web, mobile, and server-side apps — self-host or use the hosted SaaS.
Flowfile
Data Engineering
Visual ETL that compiles to Polars — build pipelines on a canvas, export as standalone Python, and run anywhere without platform lock-in.
FormBee
Forms Surveys
A self-hostable form backend that accepts HTML form submissions and routes them to email, Telegram, Discord, webhooks, and automation platforms — without writing any server-side code.
Formbricks
Analytics · Design Tools · Forms Surveys
Open-source experience management platform for in-app, website, email, and link surveys — privacy-first and fully self-hostable.
Formizee
Forms Surveys
An open-source form backend and builder platform — design forms, collect submissions, and get analytics without hosting your own server, positioned as an alternative to Formspree and Typeform.
fountain-ink
Blogging
A self-hostable, decentralized blogging platform built on Lens Protocol — own your content, audience, and distribution forever.
GB Studio
Design Tools · Developer Tools · Game Development
Drag-and-drop retro Game Boy game creator that compiles real ROMs — no coding required.