Your docs, shaped for every reader. Memory-persistent interactivity for static sites — no backend required.
CustardUI adds tabs that sync across pages, content that hides until needed, and shareable deep links — all from a single script tag. Built for educational sites, documentation portals, and course textbooks.
See it in action
The demo below is a live CustardUI-powered page. Try interacting with the tabs, toggles, and placeholders to see how they work.
Hey, [[username]]! Let's get your project set up. Your name is remembered across every page on this site — set it once, see it everywhere.
Make sure these are installed before continuing.
brew install node git
winget install OpenJS.NodeJS Git.Git
sudo apt install nodejs git
↑ peeked by default — visible enough to know it's there, collapsed until you actually need it
npm install custardui
yarn add custardui
pnpm add custardui
Config file location varies by OS:
~/.config/custardui/config.json
%APPDATA%\custardui\config.json
~/.config/custardui/config.json
↑ synced with Prerequisites — switching OS above updates this automatically. No extra clicks.
Set "theme": "auto" to follow the reader's system preference. This is the most commonly missed config option. Share this step
npm run dev
yarn dev
pnpm dev
↑ synced with Installation — pick your package manager once, every code block on the site follows
Port already in use? Kill the process on port 3000:
lsof -ti:3000 | xargs kill
netstat -ano | findstr :3000
taskkill /PID <PID> /F
fuser -k 3000/tcp
↑ peeked by default — troubleshooting is there when you need it, invisible when you don't
Focus & Share
Did you notice the Share this step link in the demo above? Any element on the page can become a shareable, highlighted anchor — with or without an existing id. No more "scroll down and find the paragraph about the config file." You can even share this paragraph right here.
For TAs and instructors: When a student asks a question that's already answered on the site, share a URL like:
https://your-course-site.com/textbook?cv-highlight=the-element-id
The page loads with that section visually highlighted — drawing the student's eye straight to the answer.
Adaptations
Adaptations go beyond themes. They let different organizations share the same underlying content while each seeing a version tailored to them — logos, links, terminology, and all. No backend. No duplicate repositories.
Consider a Git mastery guide used by multiple courses:
This is how git-mastery.org uses CustardUI — a single site serving multiple audiences with zero backend infrastructure.
Getting started
No build step, no server to manage. Works with MarkBind, Jekyll, plain HTML — anything.
<!-- Step 1: Add to your <head> or base layout -->
<script src="https://cdn.jsdelivr.net/npm/@custardui/custardui" data-base-url="/"></script>
// Step 2: config.json — define your toggles and tabs
{
"config": {
"toggles": [
{
"toggleId": "prerequisites",
"label": "Prerequisites",
"isLocal": true,
"default": "peek"
},
...
],
"tabgroups": [
{
"groupId": "os",
"tabs": [
{ "tabId": "macos", "label": "macOS" },
{ "tabId": "windows", "label": "Windows" },
{ "tabId": "linux", "label": "Linux" }
],
...
}
],
"placeholders": [
{
"name": "username",
"defaultValue": "there",
...
}
]
},
...
}
CustardUI is open source, free to use, and designed to slot into your existing workflow with minimal effort.
