Skip to content

Introduction


Shikiji shikiji is a beautiful and powerful syntax highlighter based on TextMate grammar and themes, the same engine as VS Code's syntax highlighting. Provides a very accurate and fast syntax highlighting for almost any mainstream programming language.

No custom RegEx to maintain, no custom CSS to maintain, no custom HTML to maintain. And as your favorite languages and themes in VS Code evolve - your syntax highlighting will evolve too.

Shikiji is a ESM-rewrite of Shiki with quite many improvements. We aim to merge this project back to Shiki as a milestone update. Breaking changes from Shiki and the compatibility build if you are migrating.

About the name, shikiji is a Japanese word meaing "Ceremonial Speech". shiki is inherited from shiki means "Style" and ji means "Word".

Oh btw, the code blocks in this document is highlighted by Shikiji, as you'd expect :)

Features

Playground

Here is a little playground for you to try out how Shikiji highlights your code. Unlike other code blocks that ran on the build time, this playground is rendered on the client side in the browser. Themes and languages are loaded on demand.

Playground

Install Shikiji to use it in your project.

Who is using?

Projects that depend on Shikiji (sort alphabetically):

Bundle Size

You can inspect the bundle size in detail on pkg-size.dev/shikiji.

As of v0.9.2, measured at 15th, December 2023:

BundleSize (minified)Size (gzip)Notes
shikiji6.2 MB1.2 MBincludes all themes and languages as async chunks
shikiji/core99 KB31 KBwithout themes or languages, compose on your own
shikiji/wasm623 KB231 KBwasm binary inlined as base64 string

Released under the MIT License.