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.

foundationserverstylev2.1.0
Visual examples + interactive variants
View Interlace Base on Storybook
No embeddable story for this item yet.
→

Install

Two equivalent paths — the URL works in any shadcn-CLI setup; the alias works once you've registered @interlace in your components.json.

Via shadcn URL
npx shadcn@latest add https://ds.interlace.tools/r/interlace-base.json
With the @interlace alias
npx shadcn@latest add @interlace/interlace-base

History

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.preflight cascade layer, which ranks above Tailwind's utilities: img { height: auto } beat a call-site h-10, and svg { display: block } beat inline. Preflight now sits in Tailwind's base layer, prose and animation classes in components, 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.

    Migration

    Only deep imports move; styles/index.css and styles/base.css are unchanged. - styles/interlace-theme.css → styles/brand/interlace.css (values) and styles/semantics.css (bindings) - styles/themes/harbor.css → styles/brand/harbor.css - styles/tokens.css → styles/structure/motion.css - styles/foundation.css → styles/structure/type.css, structure/layout.css, structure/radius.css - styles/fonts.css, styles/preflight.css → styles/page/fonts.css, styles/page/preflight.css - styles/theme.css → styles/page/fumadocs.css and styles/page/shiki.css The layers interlace.primitives, interlace.foundation and interlace.preflight no longer exist. If you overrode one of them, move the rule into your own CSS; it no longer needs a layer to win.
  • Breakingmajor

    Adding a component no longer restyles your app. Every component used to depend on theme, which swapped your font-sans and font-mono for Inter and JetBrains Mono, set img { display: block }, drew an outline on every focusable element and recoloured body. Components now depend on interlace-base, which only adds tokens. A test compiles a stock shadcn globals.css with and without it and checks the app's own utilities come out the same. The Interlace look is now opt-in: theme is a registry:theme that writes shadcn cssVars into your :root and .dark, and interlace-foundation carries the fonts, the page preflight and the fumadocs bridge. Interlace's animate-accordion-down/up no longer replace tw-animate-css's versions.

    Migration

    Your globals.css decides how much of Interlace you get. 1. Components only, with your own look: @import "./styles/interlace/base.css"; after @import "tailwindcss";. This is what the CLI installs with every component. 2. Add the Interlace palette and radius: npx shadcn add @interlace/theme. The CLI writes the variables into your :root and .dark. 3. Keep the full Interlace page (what theme gave you before): npx shadcn add @interlace/interlace-foundation and import ./styles/interlace/index.css instead of base.css. Load Inter and JetBrains Mono yourself, as before.
  • Addedminor

    Three additions for content sites. A --highlight / --highlight-foreground colour pair (amber, AAA text in both schemes and in Harbor) with a highlight Button variant, for the warm call-to-action that is not the brand primary. Badge gains success, warning, info and highlight tones. And a --font-heading token: Typography h1–h6 and the hero headings read it, it falls back to --font-body, and --font-body now 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 the oklch() value that paints the same 8-bit sRGB pixel, checked in Chromium, so nothing on screen and no contrast ratio changes. A new structure/scheme.css sets color-scheme on :root and on .dark / [data-scheme='dark'], so scrollbars, form controls and light-dark() follow your theme. ds.interlace.tools/tokens/interlace.tokens.json carries 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.

    Migration

    None. If your own code parsed --interlace-* values as hex, parse oklch() as well; the hex each value paints is in the token file.

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.

60 lines · TypeScript
/*
 * @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.