Skip to content
NativeCSS
Docs contents

Design Tokens

tokens.css and colors.css are the only places raw values are allowed to live - everything else references them via var(). Color tokens in detail: Colors & Surfaces.

Spacing

--ncss-space-3xs through --ncss-space-3xl - a fluid scale (clamp()-based), growing slightly with viewport width instead of jumping in fixed steps.

TokenApprox.
--ncss-space-3xs0.25rem
--ncss-space-2xs0.5rem
--ncss-space-xs0.75rem
--ncss-space-sm1rem
--ncss-space-md1.5rem
--ncss-space-lg2rem
--ncss-space-xl3rem
--ncss-space-2xl4rem
--ncss-space-3xl6rem

Radius & Shadow

TokenPurpose
--ncss-radius-sm/-md/-lg/-fullCorner radius, -full for pills/circles
--ncss-shadow-sm/-md/-lgShadow steps
<div class="ncss-card ncss-radius-lg ncss-shadow-md ncss-border">
  Border/radius/shadow combined as standalone utilities
</div>

Usable as utility classes: .ncss-radius-*/.ncss-shadow-* - deliberately standalone, component-independent utilities instead of baked into individual components.

Motion

TokenValue
--ncss-motion-duration-fast100ms - fast entry into :active states
--ncss-motion-duration200ms - normal transitions
--ncss-motion-duration-slow400ms
--ncss-motion-easingcubic-bezier(0.4, 0, 0.2, 1)
--ncss-motion-easing-emphasizedcubic-bezier(0.16, 1, 0.3, 1) - pronounced decelerating curve for elements ENTERING the view (e.g. .ncss-modal--slide-up), best paired with -duration-slow

Tied to prefers-reduced-motion rather than hard-coded to 0 - base.css respects the setting globally.

Breakpoints & Container Query Thresholds

A fixed convention, not usable as var() (media/container queries don't accept custom properties in the condition itself) - documented as a comment in tokens.css. Breakpointless remains the default approach, fixed breakpoints a deliberately sparingly used escape hatch, e.g. for the nav collapse at 64rem.