{cssVar}
{name}
{role}
import {
colorTokens,
createDynamicColorVariables,
defaultTheme,
defaultMotionMode,
motionTokens,
motionModeDetails,
radiusTokens,
shadowTokens,
themeDetails,
themeNames,
typographyTokens,
type MotionModeName,
type ThemeName
} from "@ai-ui/tokens";
import type { Meta, StoryObj } from "@storybook/react";
import type { CSSProperties } from "react";
type TokensOverviewProps = {
motionMode: MotionModeName;
theme: ThemeName;
};
function ResolvedTokenValue({ cssVar }: { cssVar: string }) {
const value =
typeof document === "undefined"
? ""
: getComputedStyle(document.documentElement).getPropertyValue(cssVar).trim();
return {value || cssVar};
}
function TokenSwatch({
cssVar,
name,
role
}: {
cssVar: string;
name: string;
role: string;
}) {
return (
{name} {role}
{theme.label}
{theme.note}
Surface
Secondary containers and ambient panels.
Card
Elevated containers for composition.
Primary
Shared action color and emphasis layer.
{cssVar}
AI UI / Phase 1
Seed color now drives the palette. Components inherit tonal surfaces and emphasis roles from the token layer instead of shipping disconnected visual skins.
Active Seed Preset
{themeDetails[theme].label}
Motion
{motionModeDetails[motionMode].label}
These cards render their own seed-derived palettes, so the tonal system can be reviewed side by side without changing component code.
Semantic color tokens replace hardcoded brand values. Components consume roles such as primary, muted, destructive, or surface.
The system now separates display voice, body readability, and metadata density into named text roles.
{token.fontVar}
{token.familyVar}
{token.sample}
{token.name}
{token.cssVar}
{token.name}
{token.cssVar}
Timing and motion scale now live in variables that components can consume directly. The toolbar now switches between the interactive micro-feedback layer and the static fallback.
`motion.css` now includes a small recipe layer for transitions, press feedback, enters, and overlays.
{recipe}
recipe