Skip to content

raviqqe/picolight

Repository files navigation

🎨 Picolight

GitHub Action npm License

The tiny syntax highlighting library for dynamic input.

Its core library has only 0.5 KB JavaScript!

Install

npm install picolight

Usage

import { highlight } from "picolight";
import { scheme } from "picolight/languages/scheme";
import { githubDark } from "picolight/themes/github-dark";

const code = document.querySelector("code");

code.innerHTML = highlight(
  `(write-string "Hello, world!\\n")`,
  scheme,
  githubDark,
).outerHTML;

Supported languages

Supported themes

We support all TextMate themes provided by Shiki.

License

MIT

About

The tiny syntax highlighting library for dynamic input

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •