Interlace Foundation
@interlace/ui — opt-in page-level styling: Inter and JetBrains Mono on font-sans / font-mono, the preflight (body colours, WCAG 2.2 focus ring, media reset, scrollbars), and the fumadocs colour bridge. Restyles the host app by design.
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-foundation.jsonnpx shadcn@latest add @interlace/interlace-foundationHistory
This component is at v3.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.
Unreleased3 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.
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)
- Drawn by the component's own focus-visible classes, so it holds with or without the opt-in preflight.
- Reduced motion
- Animation is gated on prefers-reduced-motion.
- ARIA in the source
role="grid"
Dependencies
- Base UI primitive
- Native / no Base UI dependency
- Lucide icons
- none
- NPM dependencies
- none
- Registry dependencies
Source
The full implementation — styles/interlace/index.css once installed.
/*
* @interlace/ui — the full CSS contract, as Interlace's own apps use it.
*
* @import "tailwindcss";
* @import "@interlace/ui/styles/index.css";
*
* base.css (brand, semantics, structure: additive, what every component
* needs) plus layer 4, the opt-in page styling. In the registry this is the
* `interlace-foundation` item. See base.css for the layer model.
*/
@layer interlace.bridge, interlace.brand, interlace.semantics;
@import "./base.css";
/* 4. Page. Each file styles the page on purpose; none is needed by a
* component. */
@import "./page/fonts.css";
@import "./page/preflight.css";
@import "./page/fumadocs.css";
…2 more lines…Registry JSON
The raw registry record — what the shadcn CLI fetches.