Interlace Base
@interlace/ui — the additive CSS baseline every component needs: motion tokens, type scale, container widths, the xs breakpoint, radius derived from --radius, layered brand + semantic colour tokens in OKLCH, and a color-scheme that follows the dark class so native controls match. Changes nothing the host app already styles.
Install
Two equivalent paths — the URL works in any shadcn-CLI setup; the alias works once you've registered @interlace in your components.json.
npx shadcn@latest add https://ds.interlace.tools/r/interlace-base.jsonnpx shadcn@latest add @interlace/interlace-baseHistory
This component is at v2.1.0. The version is stamped as a banner into the file the install writes, so the copy in your tree says which one you have — compare it with the number above before deciding whether to re-run the install.
Unreleased4 entries
- Breakingmajor
The stylesheets are now four layers, one directory each, and your classes always beat them. Page preflight used to sit in a custom
interlace.preflightcascade layer, which ranks above Tailwind's utilities:img { height: auto }beat a call-siteh-10, andsvg { display: block }beatinline. Preflight now sits in Tailwind'sbaselayer, prose and animation classes incomponents, and the three named Interlace layers hold custom properties only. A new lock (css-layer-lock.test.ts) keeps each layer reading only the one before it.Components - Breakingmajor
Adding a component no longer restyles your app. Every component used to depend on
theme, which swapped yourfont-sansandfont-monofor Inter and JetBrains Mono, setimg { display: block }, drew an outline on every focusable element and recolouredbody. Components now depend oninterlace-base, which only adds tokens. A test compiles a stock shadcnglobals.csswith and without it and checks the app's own utilities come out the same. The Interlace look is now opt-in:themeis aregistry:themethat writes shadcn cssVars into your:rootand.dark, andinterlace-foundationcarries the fonts, the page preflight and the fumadocs bridge. Interlace'sanimate-accordion-down/upno longer replace tw-animate-css's versions. - Addedminor
Three additions for content sites. A
--highlight/--highlight-foregroundcolour pair (amber, AAA text in both schemes and in Harbor) with ahighlightButton variant, for the warm call-to-action that is not the brand primary. Badge gainssuccess,warning,infoandhighlighttones. And a--font-headingtoken: Typography h1–h6 and the hero headings read it, it falls back to--font-body, and--font-bodynow follows the app's own--font-sans, so a shadcn app's typeface reaches Interlace components with no setup. Set--font-heading: var(--font-serif)to give headings a serif without touching body text. - Addedminor
The brand palette is now written in
oklch(), native controls follow the colour scheme, and the palette ships as a design-token file. Every--interlace-*colour was converted to theoklch()value that paints the same 8-bit sRGB pixel, checked in Chromium, so nothing on screen and no contrast ratio changes. A newstructure/scheme.csssetscolor-schemeon:rootand on.dark/[data-scheme='dark'], so scrollbars, form controls andlight-dark()follow your theme.ds.interlace.tools/tokens/interlace.tokens.jsoncarries both themes and schemes in the Design Tokens Community Group format for Figma, Tokens Studio and Style Dictionary, generated from the CSS and checked in CI.
Accessibility
Every story for this component is rendered headlessly and checked with axe-core (wcag2aa, wcag22aa, best-practice, ACT) on every PR. That gate has no continue-on-error, so what ships has zero known violations.
What follows is what static analysis can see. Axe cannot press a key and never sees an overlay open, so the operable-without-a-mouse claim lives in Behavior instead, where the keyboard path is replayed step by step.
- Focus + keyboard behaviour
- Native element semantics — no interaction layer to get wrong.
- Focus ring (WCAG 2.2 SC 2.4.13)
- Not focusable — no focus indicator required.
- Reduced motion
- Animation is gated on prefers-reduced-motion.
- ARIA in the source
- None — semantics come from the element or the Base UI primitive rather than hand-written ARIA.
Dependencies
- Base UI primitive
- Native / no Base UI dependency
- Lucide icons
- none
- NPM dependencies
tw-animate-css
- Registry dependencies
- none
Source
The full implementation — styles/interlace/base.css once installed.
/*
* @interlace/ui — the additive baseline every component needs.
*
* @import "tailwindcss";
* @import "@interlace/ui/styles/base.css";
*
* This is what `interlace-base` installs, and every registry component
* depends on it, so it lands in an adopter's app with their FIRST component.
* It therefore adds and never replaces. `apps/registry/src/__tests__/
* host-style-safety.test.ts` compiles a stock shadcn globals.css with and
* without this file and holds that.
*
* ─── Four layers, each reading only the one before it ──────────────
*
* 1. brand/ raw `--interlace-*` values, one file per theme.
* 2. semantics the names components read (shadcn's + Interlace's),
* bound to brand tokens, registered as Tailwind colours.
* 3. structure/ type, layout, radius, motion. Brand-invariant.
* 4. page/ opt-in page styling: fonts, preflight, fumadocs, shiki.
* NOT imported here; index.css adds it.
…40 more lines…Registry JSON
The raw registry record — what the shadcn CLI fetches.