NUICSSv3.0.6

Theming & Design Tokens

NUICSS features an aesthetic, token-first design system completely driven by CSS custom properties. It aligns directly with NUI components for seamless cross-package consistency.


Semantic Color Scale

NUICSS uses semantic token names rather than static hex codes, making dark mode transitions automatic and effortless.

Utility ClassCSS VariableDescription
bg-page--bg-pageApplication root canvas background
bg-surface--bg-surfaceContainer, card, and modal background
bg-subtle--bg-subtleHover states and subtle backgrounds
bg-muted--bg-mutedInactive elements, secondary chips
text-default--fg-defaultPrimary text and headings
text-muted--fg-mutedSupporting copy, placeholders, captions
border-default--border-defaultStandard component borders
border-subtle--border-subtleSubtle dividers and table row borders

Brand & Feedback Colors

Color RoleBackground UtilityText UtilityBorder Utility
Primarybg-primarytext-primaryborder-primary
Successbg-successtext-successborder-success
Warningbg-warningtext-warningborder-warning
Dangerbg-dangertext-dangerborder-danger

Border Radius Tokens

Utility ClassVariableSize
rounded-sm--radius-sm4px
rounded-md--radius-md8px
rounded-lg--radius-lg12px
rounded-xl--radius-xl16px
rounded-full--radius-full9999px

Dark Mode

NUICSS applies dark theme styles automatically when the .dark class is present on the root <html> tag:

html
<!-- Light Mode -->
<html class="light">
  <body class="bg-page text-default">...</body>
</html>

<!-- Dark Mode -->
<html class="dark">
  <body class="bg-page text-default">...</body>
</html>

All semantic tokens (bg-page, bg-surface, text-default, border-default) invert automatically.