Search documentation

Search pages, components, blocks, styles and colours.

Get started
Skip to content

Version 0.4.0

Colour roles, three densities, four motion speeds and the Get started page.

One set of components now fits a dashboard and a landing page alike: colour roles retint every component, densities resize them and motion speeds set how they move.

Colour roles

Six colour roles, primary, secondary, info, success, warning and destructive, are each held by two variables, --<role>-hue and --<role>-chroma, and one recipe turns them into the same tokens for every role: a fill and the text on it, a text colour for any surface, a border, and an eight-level tinted ladder. Every pair is AA in light and dark at any hue and strength, which the tests check around the colour wheel.

Primary and secondary are neutral by default, so nothing changes until you pick a colour, and they take any hue. The statuses keep to their family: info is blue, success green, warning orange to yellow, destructive red to orange. Pick one and it carries through the components: primary buttons, links, checked checkboxes and radios, switches, progress bars, slider ranges and selected days take the primary colour; secondary buttons the secondary one; destructive buttons, menu items, invalid fields and error messages the destructive one.

States follow one rule in every role: hover is the fill at 90%, pressed at 80%, and the soft form (the destructive button, invalid fields) is a 12% wash of the fill with the role's text colour. Focus keeps its blue ring.

The new Colors page has a picker for every role, with presets and hue and strength sliders, an app preview in light and dark built from the real components, the role's tokens with their contrast ratios, and the CSS to copy. The settings menu has a Primary row. The Surfaces page is now part of Colors: the picker's first tab sets the surface tint, and the surface ladder, where each level goes and the interaction overlays are documented there.

bunx --bun fabricator-ui@latest add foundations

Breaking changes

  • The error-* tokens are now destructive-* (bg-destructive-surface-3, text-destructive-text, border-destructive-border, …). <Alert variant="error"> and <Badge variant="error"> still work and look the same as destructive.
  • --destructive-light and bg-destructive-light are removed. Use bg-destructive/12 for a soft destructive fill.
  • The switch is on in the primary colour, not the focus blue. While primary is neutral that is the foreground colour.
  • destructive in the fabricator preset is now the destructive role's fill, a little darker so text in it passes AA.

Three densities

Fabricator UI now builds websites as well as dashboards from the same components. Three densities size every component: compact for dashboards, toolbars and dense tables (28px controls, 12px text), default for apps (36px, 13px, as before) and spacious for websites and landing pages (44px controls, 15px text, 18px icons). Controls, menu and table rows, text, icons, padding, gaps and segmented tracks all follow, and tracks stay concentric at every density.

Set one on any element with data-density, and everything inside follows. DensityProvider does the same and also reaches the menus, selects, popovers, tooltips, dialogs and sheets its components open in portals, so a compact dashboard header opens compact menus and a spacious landing page opens spacious selects. Nest them freely.

import { DensityProvider } from "@/components/ui/density"
 
export default function MarketingLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return <DensityProvider density="spacious">{children}</DensityProvider>
}
bunx --bun fabricator-ui@latest add density

Pick a project-wide density on Get started: the install command writes it into your stylesheet. The settings menu on this site has a Density row, and the Density page, which replaces Sizes, shows all three side by side. The density-compact, density-default and density-spacious utilities take breakpoints, and your own components can use the same tokens: h-(--density-36), text-(length:--density-text-13), size-(--density-icon-16).

Breaking changes

  • size="sm" now pins a control to the compact density and size="lg" to spacious, whatever its container says. Small sizes look as before. Large ones grow: Button and Toggle lg and icon-lg go from 40px to 44px with 15px text, matching Search lg.
  • Updating a Fabricator component also installs the foundations density tokens and, for overlays, the density item.
  • /docs/foundations/sizes redirects to /docs/foundations/density.

Four motion speeds

Four speeds

Fabricator UI now has four motion speeds: smooth for marketing sites, default for most products, snappy for apps people use all day and instant for dense dashboards. Each speed has its own durations, curves and scales rather than one multiplier, so smooth settles softly and instant stays out of the way. Set one with data-motion on <html>, or on any element to change one part of a page; data-motion="off" stops motion. The settings menu on this site has the same choice. See Motion.

bunx --bun fabricator-ui@latest add foundations

Motion by role

Every animation now belongs to a role: feedback, press, glide, move, tooltip, popup, dialog, sheet, disclosure and toast. Each surface has one utility (motion-popup, motion-dialog, …) holding its whole recipe, and everything else uses duration-<role> and ease-<curve>. The default speed follows Emil Kowalski's guidance:

  • Tooltips open in 125ms and appear at once while you move between them.
  • Menus and popovers open in 180ms from 0.95 and grow from their trigger; dialogs open in 250ms from the centre.
  • Exits are about 30% quicker than entrances, on a strong ease-out; things that move on screen use ease-in-out.
  • Buttons and toggles give to 0.97 when pressed.
  • The command palette opens with no animation, because it is opened from the keyboard.

Toasts, sheets, the Base UI drawer, items and the message scroller no longer use their own fixed timings. The Radix drawer keeps Vaul's.

The earlier names, duration-fast, duration-moderate, duration-slow and ease-spring, keep working as aliases.

Get started page

The new Get started page walks you through a setup in four steps:

  1. Look. The Make it yours settings (theme, sound, icons, radius, motion, surface and primary colour) sit beside every component, and the components follow each change.
  2. Project. A new project or an existing one, the framework (Next.js, Vite, TanStack Start, React Router, Astro or Laravel), its name, the component primitives and an optional monorepo.
  3. Extras. Every component or just the starter, interface sounds, and for your AI assistant the agent skill and the MCP server.
  4. Install. The commands in order for npm, pnpm, yarn or bun, each with a line on what it does, plus a link that opens the page with your setup, so a designer can hand it to a developer.

The colours you set on the Colors page carry over.

Your look in the init URL

/init now installs a look on top of the Fabricator palette. Colours are <hue>_<chroma>; only what differs from the defaults needs a param:

ParamExample
surfacesurface=145_0.022
primary, secondary, info, success, warning, destructiveprimary=260_0.15
shapeshape=pill
motionmotion=snappy
bunx --bun fabricator-ui@latest init -t next -p "https://fabricator-ui.vercel.app/init?base=base&template=next&primary=260_0.15&shape=pill"

A tinted surface or a new primary, secondary or destructive colour also points the theme tokens at the live recipes, as the Colors page shows, so you can retint the project later by changing two variables.

Release on GitHub