Themes
A DocsLit site has a complete look out of the box, and you can change it with one line in docslit.json. Six prebuilt themes cover the common documentation styles, thirteen palettes cover colors, and brand colors, fonts and radii sit on top of both.
Theme and palette
Two independent choices define the look:
| Choice | What it controls | Examples |
|---|---|---|
| Theme | Layout structure, typography, shape (radii), elevation and component styling | default, peppermint, frond, tonal, folio, ledger |
| Palette | Colors, with a matching light and dark set | teal, ocean, forest, slate, violet, rose, amber, graphite, mint, ink, paper, steel, iris |
Every theme has a signature palette that it uses unless you pick another. Any theme works with any palette, and with your own brand colors on top. The ids never overlap, so a single theme string is unambiguous: a theme id selects a theme, a palette id selects a palette with the classic look, and a path ending in .json loads a theme file.
Switch themes in one line
Set theme in docslit.json:
To keep the theme but change the colors, use the object form with a palette:
You can also change the theme from the command line. theme use edits docslit.json in place. It keeps your other settings, brand colors and fonts, and the file's formatting:
The last command passes a palette id, so it changes only the palette and keeps the current theme. When you name a theme, the palette resets to that theme's signature palette unless you add --palette. A name that matches nothing exits with code 1 and suggests the closest one:
A new project can start with a theme too:
"theme": "ocean" and the other eight original palette names keep the classic look unchanged, and so do theme objects and theme files from earlier releases. You opt in to a new look only by naming a theme.List what is available
docslit theme list prints every theme with its signature palette, every palette, and the custom color variables. A * marks the choice your project currently uses. Add --json for agents and scripts:
The JSON has the shape { themes, palettes, radius, appearance, current, config }. Each palette carries its accent for light and dark mode.
Try themes live
While you write, docslit dev --theme-picker adds a floating Theme button at the bottom right of every page. It opens a panel with the theme list, palette swatches, a light, dark or system switch, Reset and Copy config, which copies a theme block for docslit.json. Everything runs in the browser, so switching is instant, and your choices persist in the browser and in the URL as ?theme=folio&palette=ocean.
The picker never appears in a build unless you ask for it. To ship it in a built site, for a gallery or a demo, set:
This site does exactly that. Use the Theme button at the bottom right of this page to try every theme and palette on the page you are reading. A built site with the picker loads the fonts of every theme, so leave it off for normal production docs.
?theme=frond&palette=ocean opens a site with that combination when the picker is enabled. It is a quick way to show colleagues two options side by side.The themes
Each screenshot is the same sample page, shown in light and dark mode. The image follows the mode you have selected for this site.
Default
The classic DocsLit look, unchanged: dark-first, flat surfaces and a full-height sidebar with an accent bar. Signature palette teal, with Inter and JetBrains Mono. Also available as classic.
Peppermint
A clean, airy look for product docs: soft borders, rounded cards, pill tabs under a frosted header, an open sidebar with a tinted pill for the current page, generous whitespace and a subtle gradient at the top. Signature palette mint, with Inter and JetBrains Mono. It is the familiar choice for teams coming from Mintlify, and the importer picks it for Mintlify projects.
Frond
A crisp technical look: a strong type hierarchy, monochrome zinc surfaces with one accent, sharp radii, hairline borders, a filled and tinted sidebar item, bold group titles and an accent eyebrow above the title. Signature palette ink, with Inter and JetBrains Mono. It is the familiar choice for teams coming from Fern, and the importer picks it for Fern projects.
Tonal
Material 3 inspired. Surfaces and accents are derived from one seed color with tonal palettes, so the whole site shifts with a single choice of accent. Pill navigation indicators, 20px radii, borderless tonal cards, hover and press state layers, 3px focus rings and light-weight headings. Signature palette iris, with Roboto and Roboto Mono. With any other palette, that palette's accent (or colors.accent) is the seed.
Folio
A book or knowledge-base look: a 640px reading column, serif headings, 17px body text, an outline sidebar with a rule and an accent bar, quiet uppercase group labels, a large serif title with its description, underlined links and left-bar callouts. Signature palette paper, with Source Serif 4 for headings, Inter and JetBrains Mono. The importer picks it for GitBook projects.
Ledger
Built for API reference: a dense 13.5px sidebar, a wide 760px column inside a 1680px page, 15px type, section dividers on h2, uppercase table heads and small precise code. Signature palette steel, with IBM Plex Sans and IBM Plex Mono.
Choosing a theme
| If your docs are | Start with |
|---|---|
| Product docs for developers, moving from Mintlify | peppermint |
| Technical docs with lots of reference, moving from Fern | frond |
| Brand-led docs where one accent color should drive everything | tonal |
| Long-form guides, a handbook or a knowledge base | folio |
| Parameter tables, endpoints and code samples | ledger |
| Already live on DocsLit and you like it as it is | default |
What themes change
- Tabs. Themes restyle the header tab bar: pills in
peppermint, indicator tabs intonal, underlines in the others. An explicitlayout.tabsStyleoverrides the theme's tab styling. Tabs placed in the sidebar keep the shared styling. See Tabs and anchors. - Layout settings win.
layout.contentWidth,layout.sidebarWidthand the other layout settings override a theme's tokens.peppermintandfolioturn onlayout.showDescriptionby default. - Fonts. The Google Fonts link is added only for the active theme, and
defaultkeeps its original link. Offline builds load no remote font. Each font stack ends in system fonts and uses a metric-matched fallback face, so a late font swap does not shift the layout. - Components. Cards, callouts, tabs and code chrome read theme tokens. Themes cannot style inside a component's shadow DOM beyond those tokens.
Accessibility
Themed sites meet WCAG 2.2 AA contrast for every color DocsLit derives: secondary and muted text, link color, the accent, text on filled accent surfaces and code text. A test checks every theme with every palette in light and dark mode.
- Your own colors are respected as written. If an explicit color fails AA,
docslit validatewarns with the codetheme-low-contrastand tells you which pair to adjust. Run it after changingcolors. prefers-contrast: morestrengthens borders and text in every theme.- Focus is always visible. Themes use a visible focus ring (3px in
tonal), and you can restyle it with the--focus-colorand--focus-wtokens. - The classic theme keeps its original contrast. The
defaulttheme with the eight original palettes is intentionally unchanged, so some pairs, mostly muted text and white text on a bright accent in dark mode, fall short of AA. If contrast is a hard requirement, choose one of the five newer themes, or thedefaulttheme with one of the newer palettes (mint,ink,paper,steel,iris).
Next steps
- Set brand colors, fonts, corner radius and default appearance in Palettes and brand colors
- Override individual styles with the design tokens
- Add your logo and shape the header and footer in Site chrome
- Run
docslit validateto check theme names, theme files and color contrast