unstale

npm / react-shiki

react-shiki

What changed in react-shiki 0.11, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-28.

2 breaking5 new APIs and options2 behavior and defaults4 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.9 on npm

react-shiki 0.1113 changes

Breaking changes 2

  • 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.1release notes

  • 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.0release notes

New APIs and options 5

  • Accepts 'javascript' or 'oniguruma' alongside engine instances; named engines are created, cached, and lazy-loaded internally, and 'javascript' skips the WASM fetch.

    0.11.1release notes

  • Adds an option to highlight specific lines by displayed line number, respecting startingLineNumber. Highlighted lines receive the rs-highlighted-line class.

    0.11.0release notes

  • Adds a CSS variable for the highlighted-line background color, defaulting to the theme text color at 10% opacity.

    0.11.0release notes

  • Adds a CSS variable for line-number color on highlighted lines, defaulting to the theme text color at 65% opacity.

    0.11.0release notes

  • 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.0release notes

Behavior and default changes 2

  • The pre, language label, and highlighted line selectors are fully wrapped in :where(), giving them zero specificity so user rules always win.

    0.11.1release notes

  • 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.1release notes

Fixes and other changes 4

  • Fixes throttle state typing for React 18.

    0.11.2release notes

  • Language alias matching is now case-insensitive.

    0.11.1release notes

  • 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.1release notes

  • Language ids are trimmed before resolving.

    0.11.0release notes