twinkleplop
docs / getting-started

getting started

Install and highlight your first snippet.

# install § 01

Install a language and theme.

terminal sh copy
pnpm add "@twinkleplop/typescript" "@twinkleplop/theme"

# first highlight § 02

Import. Initialize. Highlight.

first-twinkle.ts typescript copy
// import the language
import { language } from '@twinkleplop/typescript';

// create a reusable highlighter
const typescript = language();

// highlight some code
const html = typescript("1 + 2");

document.body.innerHTML = html;
What next? Pick a theme, skim the API reference, or learn how tokenization works under the hood.

tweaks

mode
density
nav style
crt scanlines