# What changed in react-shiki

> 13 changes in react-shiki 0.11 from its official release notes, upgrade guides and advisories: 2 breaking, 5 new APIs and options. Each one cited. Sources checked 2026-10-28. HTML: https://unstale.sh/npm/react-shiki/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## react-shiki 0.11

### Breaking changes

- The language label no longer has the hardcoded `language-label` ID, avoiding duplicate IDs when pages render multiple code blocks; use `.rs-language-label` or `[data-slot="language-label"]` for styling. (0.11.1) — [release notes](https://github.com/AVGVSTVS96/react-shiki/releases/tag/react-shiki%400.11.1)
- Default styles are now unlayered with zero-specificity :where() selectors. Cascade-layer overrides for pre padding or border-radius no longer apply when applyDefaultStyles is enabled; plain unlayered CSS is unaffected. (0.11.0) — [release notes](https://github.com/AVGVSTVS96/react-shiki/releases/tag/react-shiki%400.11.0)

### New APIs and options

- Accepts `'javascript'` or `'oniguruma'` alongside engine instances; named engines are created, cached, and lazy-loaded internally, and `'javascript'` skips the WASM fetch. (0.11.1) — [release notes](https://github.com/AVGVSTVS96/react-shiki/releases/tag/react-shiki%400.11.1)
- Adds an option to highlight specific lines by displayed line number, respecting startingLineNumber. Highlighted lines receive the rs-highlighted-line class. (0.11.0) — [release notes](https://github.com/AVGVSTVS96/react-shiki/releases/tag/react-shiki%400.11.0)
- Adds a CSS variable for the highlighted-line background color, defaulting to the theme text color at 10% opacity. (0.11.0) — [release notes](https://github.com/AVGVSTVS96/react-shiki/releases/tag/react-shiki%400.11.0)
- Adds a CSS variable for line-number color on highlighted lines, defaulting to the theme text color at 65% opacity. (0.11.0) — [release notes](https://github.com/AVGVSTVS96/react-shiki/releases/tag/react-shiki%400.11.0)
- Adds experimental `outputFormat: 'tokens'` support to the hook, returning Shiki's raw TokensResult for custom rendering. The return type narrows based on the literal outputFormat passed. (0.11.0) — [release notes](https://github.com/AVGVSTVS96/react-shiki/releases/tag/react-shiki%400.11.0)

### Behavior and default changes

- The `pre`, language label, and highlighted line selectors are fully wrapped in `:where()`, giving them zero specificity so user rules always win. (0.11.1) — [release notes](https://github.com/AVGVSTVS96/react-shiki/releases/tag/react-shiki%400.11.1)
- Accepts dynamic grammar imports on the full and web bundles, allowing custom grammars to stay code-split instead of shipping in the main bundle. (0.11.1) — [release notes](https://github.com/AVGVSTVS96/react-shiki/releases/tag/react-shiki%400.11.1)

### Fixes and other changes

- Fixes throttle state typing for React 18. (0.11.2) — [release notes](https://github.com/AVGVSTVS96/react-shiki/releases/tag/react-shiki%400.11.2)
- Language alias matching is now case-insensitive. (0.11.1) — [release notes](https://github.com/AVGVSTVS96/react-shiki/releases/tag/react-shiki%400.11.1)
- Styles are embedded in the JS and install automatically at runtime, so no CSS import or bundler configuration is needed; `react-shiki/css` remains available for build-time CSS pipelines. (0.11.1) — [release notes](https://github.com/AVGVSTVS96/react-shiki/releases/tag/react-shiki%400.11.1)
- Language ids are trimmed before resolving. (0.11.0) — [release notes](https://github.com/AVGVSTVS96/react-shiki/releases/tag/react-shiki%400.11.0)
