UnflowUI
Tokens

Product Tokens

Studio colours, AI working states, the chart palette and the product type density.

Product tokens describe what the app is showing rather than the role of a surface. They live in @unflowio/tokens/css next to the semantic tokens and are read at runtime, so tenant accents and dark mode apply.

Studio colours

Every Studio has a main colour (icons, tiles, chart series), a soft background and a text colour for use on the soft background. Studios are always listed in this order: Language, Image, Video, Audio, 3D, then Workflow.

StudioMainSoftText
Languagebg-studio-language (blue-500)bg-studio-language-soft (blue-100)text-studio-language-text (blue-700)
Imagebg-studio-image (fuschia-500)bg-studio-image-soft (fuschia-100)text-studio-image-text (fuschia-700)
Videobg-studio-video (orange-500)bg-studio-video-soft (orange-100)text-studio-video-text (orange-700)
Audiobg-studio-audio (teal-500)bg-studio-audio-soft (teal-100)text-studio-audio-text (teal-700)
3Dbg-studio-3d (yellow-600)bg-studio-3d-soft (yellow-100)text-studio-3d-text (yellow-800)
Workflowbg-studio-workflow (indigo-500)bg-studio-workflow-soft (indigo-100)text-studio-workflow-text (indigo-700)

Each text colour reaches 4.5:1 on its soft colour and on white; a unit test enforces it.

Chart palette

--chart-1 to --chart-6 (bg-chart-1, stroke-chart-1, …) follow the Studio order, so a series of Studios needs no mapping.

AI working states

For what the AI is doing (streaming, thinking, generating, AI marks), never for actions a person starts. They default to the tenant accent derivations.

VariableUtilityDefault
--ai-accentbg-ai-accent--uf-accent
--ai-accent-strongbg-ai-accent-strong--accent-primary
--ai-accent-texttext-ai-accent-text--accent-text
--ai-accent-softbg-ai-accent-soft--accent-soft
--ai-accent-borderborder-ai-accent-border--accent-border

Two utilities draw the working states, and both stop animating under prefers-reduced-motion:

  • ai-shimmer: a placeholder bar that shimmers while content is generated (--animate-ai-shimmer).
  • ai-caret: the blinking block at the end of streamed text (--animate-ai-caret).
<div className="ai-shimmer h-3 w-48 rounded-full" aria-hidden />
<p>Drafting the summary<span className="ai-caret" aria-hidden /></p>

Type density

UI text is 13 px and reading text 14 px. No component renders 15 px.

UtilitySize / line heightUse
text-caption12 / 16Captions, hints, meta
text-ui13 / 18Nav items, tabs, table cells, field labels, input values
text-reading14 / 22Body text and AI answers
text-section16 / 24Section headings
text-page-title24 / 32Page titles

The page title step is text-page-title, not text-page: text-page already resolves to the --color-page surface.

Component sizes follow the same density: Button sm 13 px, md and lg 14 px; Tag sm 12 px, md 13 px; field labels, input and select values, table cells, action card and list item labels 13 px; slider labels, upload hints and upload meta 12 px.