Skip to content
tastebase

tastebase

Sign in

Your agent gets your look, hearts and dislikes in every project. Folders follow you to every device.

We keep the name, avatar and email your provider shares. Nothing else.

Best code block libraries

· updated

Written from the tastebase registry, so it changes when an entry does.

These are the code block libraries we would reach for, in that order. Each one is in tastebase because it does one job well; the table says which job.

Shiki leads: syntax highlighting with VS Code's grammars and themes: accurate, themeable code blocks. If it doesn't fit, Diffs is the next pick: fast code diff and file rendering for React on Shiki: split or unified, virtualised, with annotations.

3 picks

  1. Shiki

    Syntax highlighting with VS Code's grammars and themes: accurate, themeable code blocks.

  2. Diffs

    Fast code diff and file rendering for React on Shiki: split or unified, virtualised, with annotations.

  3. Trees

    A fast, searchable file tree for code browsers, from flat paths, as React or a web component.

Compared

LibraryPricingOpen sourceBest forSite
ShikiFreeYes (MIT)a code sample on a developer landing page or API product pageshiki.style–
DiffsFreeYes (Apache-2.0)a code review or changes view that renders file diffs with syntax highlighting, split or unifieddiffs.com–
TreesFreeYes (Apache-2.0)a file tree sidebar for a code browser or review tool, built from a list of pathstrees.software–

Questions

What is the best code block library?

Shiki: syntax highlighting with VS Code's grammars and themes: accurate, themeable code blocks. Reach for it for a code sample on a developer landing page or API product page.

Do these work outside React?

Yes, every one of them ships for at least one other framework, such as Vue, Svelte, Solid and Angular.