react-syntax-highlighter/react-syntax-highlighter
syntax highlighting component for react with prismjs or highlightjs ast using inline styles observed · 2026-08-28
Health v2 · maintenance only
76/100
- Activity 69
- Release rhythm 72
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 3
- age_days: 3871
- days_rel: 188
- days_push: 188
- n_releases_24m: 10
Adoption not part of the score
4674 stars · 315 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A React component for syntax highlighting code blocks, built on lowlight/refractor (highlight.js and Prism grammars) using an AST to build the virtual DOM. All styles are JavaScript-based inline styles, so no external stylesheets are required.
Use cases
- display highlighted code snippets in a react app
- syntax highlighting component for react without css stylesheets
- render markdown code blocks with prism or highlight.js themes
- highlight code in react native
- customize code block colors with inline styles
When to choose
- you want idiomatic React rendering via virtual DOM instead of dangerouslySetInnerHTML
- you need bundled JS-based themes with no stylesheet tags
- you want both highlight.js and Prism language support in one component
When to avoid
- you are not using React
- you prefer CSS-class-based highlighting with a tiny bundle
- you need server-side highlighting outside of React components
Facets
library · maturity active
ui-components frontend-framework frontend web-development developer-tools browser cross-platform react syntax-highlighting prismjs highlightjs inline-styles code-display nodejs
3 sources
- readme: https://github.com/react-syntax-highlighter/react-syntax-highlighter · fetched 2026-08-28 · 6cd2040a1b4f
- homepage: http://react-syntax-highlighter.github.io/react-syntax-highlighter/demo/ · fetched 2026-08-29 · 3219ea5ae71e
- registry_npm: https://registry.npmjs.org/react-syntax-highlighter · fetched 2026-08-29 · 1ccf17ffcec1
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| react-syntax-highlighter/react-syntax-highlighter | main | 76 |
For agents
markdown · JSON · MCP: product_card(name="react-syntax-highlighter/react-syntax-highlighter")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem