Introduction | Shiki

ID: 1731https://shiki.matsu.io/guide/
Source

Shiki – A beautiful and powerful syntax highlighter


Introduction

Shiki (式, a Japanese word for “Style”) is a syntax highlighter based on the TextMate grammar and theme engine used by VS Code. It provides accurate and fast highlighting for almost any mainstream programming language, without requiring custom regular expressions, CSS, or HTML. As VS Code’s languages and themes evolve, so does Shiki’s highlighting.

All code blocks in this site are highlighted by Shiki.


Features


Playground

Below is a lightweight, client‑side playground where you can experiment with Shiki highlighting. Themes and languages load on demand.

// Playground code will be rendered client‑side.
// (The interactive playground component is omitted in this static view.)

To try it in full, visit the full playground.


Bundle Size

You can inspect the bundle size in detail on pkg‑size.dev/shiki.

As of v1.1.6 (22 February 2024):

BundleSize (minified)Size (gzip)Notes
shiki6.9 MB1.3 MBAll themes and languages are split into async chunks
shiki/bundle/full6.9 MB1.3 MBSame as shiki
shiki/bundle/web4.2 MB748 KBAll themes and common web languages are async chunks
shiki/core106 KB34 KBCore engine without any themes or languages, compose yourself
shiki/wasm623 KB231 KBWASM binary inlined as a base64 string

Next page: Installation & Usage


Edit this page on GitHub → Suggest changes to this page