Design Tokens

The complete reference of every scale in the system. Each token is a CSS variable (prefixed --astralis-) and a typed prop value — the same name works in both worlds:

<Box p="6" />                             {/* as a prop */}
padding: var(--astralis-spacing-6);       /* as a variable */

Color tokens have their own page — see Colors.

Spacing#

Used by padding, margin and gap props. A 4px-based scale: the token number × 0.25rem, with half steps at the small end.

TokensValues
0.54.5 (half steps)0.125rem – 1.125rem (2px – 18px)
112 (every integer)0.25rem – 3rem (4px – 48px)
14 16 20 24 28 32 36 40 44 48 52 56 60 64 72 80 963.5rem – 24rem (56px – 384px)

Variables: --astralis-spacing-{token}.

Sizing#

Used by w, h, size, minW/maxW, minH/maxH. Four vocabularies, all valid anywhere a size is accepted:

VocabularyTokensValues
Numericsame numbers as spacing4 = 1rem … 96 = 24rem
T-shirt3xs 2xs xs sm md lg xl 2xl8xl14rem, 16rem, 20rem, 24rem, 28rem, 32rem, 36rem, 42rem – 90rem
Fractions1/2 1/3 2/3 1/4 3/4 fifths, sixths, twelfthspercentages
Keywordsfull fit min max auto100%, fit-content, min-content, max-content, auto

Plus viewport units: vw vh and the small/large/dynamic variants (dvh svh lvh dvw svw lvw). Variables: --astralis-size-{token}.

Typography#

ScaleTokens
Font size3xs (0.5rem) 2xs xs sm md (1rem) lg xl 2xl 3xl 4xl 5xl 6xl 7xl 8xl 9xl (8rem)
Weightthin extralight light normal medium semibold bold extrabold black
Letter spacingtighter tight normal wide wider widest
Line heightnone (1) tight (1.25) snug (1.375) normal (1.5) relaxed (1.625) loose (2)

Font families are theme hooks: set --astralis-font-heading and --astralis-font-body in your CSS to give the whole library your typefaces — the Text and Heading components pick them up automatically.

Radius#

Used by rounded and its per-side/per-corner variants.

Tokennone2xsxssmmdlgxl2xl3xl4xlfull
Value01px2px4px6px8px12px16px24px32px9999px

Variables: --astralis-border-radius-{token}.

Borders#

ScaleTokens
Width (border)normal (1px) moderate (2px) thick (4px) thicker (8px) thickest (12px)
Style (borderStyle)solid dashed dotted double hidden none

Border colors come from the stroke tokens on the Colors page.

Shadows#

Used by the shadow prop: none xs sm md lg xl 2xl inner. Shadows are theme-aware — dark mode automatically swaps in deeper values so elevation stays legible on dark surfaces. Variables: --astralis-shadow-{token}.

Motion#

Durations used by every component transition:

Tokenfastestfasterfastmoderateslowslowerslowest
Value50ms100ms150ms200ms300ms400ms500ms

Variables: --astralis-duration-{token}. Components honor prefers-reduced-motion — continuous animations (Marquee, Carousel autoplay) pause for users who ask for less motion.

Breakpoints#

The responsive-prop keys: sm 640px · md 768px · lg 1024px · xl 1280px — details on Responsive Props.

Overriding tokens#

Every token above is a plain CSS variable, so retuning the system globally is one declaration — no build step, no config file:

:root {
  --astralis-border-radius-lg: 0.75rem;   /* every "lg" corner in the app */
  --astralis-font-heading: "Fraunces", serif;
  --astralis-duration-moderate: 150ms;    /* snappier default transitions */
}

For color-token overrides (which have a light/dark subtlety), see Theming.