compacto-ui

Search documentation

Jump to a page or a component.

Tokens

The --app-* vocabulary, resolved against the palette you have active. These are the only color names the library speaks.

Colors

Switch palettes in the header with this table in view — it shows which tokens carry a palette's character and which barely move.

TokenUtilityValueSwatch
--app-bgbg#eaf3fb
--app-panelpanel#ffffff
--app-sidebarsidebar#dceaf7
--app-hoverhoverrgba(12,40,70,0.05)
--app-selectedselectedrgba(2,132,199,0.12)
--app-borderborderrgba(12,40,70,0.12)
--app-border-midborder-midrgba(12,40,70,0.22)
--app-border-accentborder-accentrgba(2,132,199,0.45)
--app-accentaccent#0369a1
--app-accent-dimaccent-dim#2f8fc0
--app-accent-faintaccent-faintrgba(3,105,161,0.1)
--app-texttext#14425e
--app-brightbright#08283a
--app-dimdim#4c7690
--app-editoreditor#ffffff
--app-guttergutter#e2eef9
--app-successsuccess#15803d
--app-warnwarn#b45309
--app-errorerror#b91c1c

Rules

  • Every token is exposed to Tailwind as an app-* utility: bg-app-panel, text-app-dim, border-app-border-mid.
  • --app-on-solid is derived, not stored: text on a solid accent block needs the opposite of the accent, which is white on a light palette and the page background on a dark one.
  • Nothing is folded. A semantic vocabulary has to collapse bgSelected, borderAccent, accentFaint, text, editorBg and gutterBg into their nearest neighbours; this one keeps them apart.
  • theme.css uses @theme inline, not @theme, so the --color-app-* entries stay as var() references. A plain @theme would freeze one palette's hex values into the generated utilities and every other palette would silently stop working.
  • Motion is tokenised too: --motion-duration-instant / fast / base / slow, and three easing curves. No magic numbers in a transition.