Skip to Content
Design TokensToken Reference

Design Tokens

Rayden UI includes a comprehensive design token system extracted from the Rayna UI  Figma design system. These tokens ensure consistency across all components and make theming straightforward.

Overview

Design tokens are available in two ways:

  1. CSS Variables — Used automatically via Tailwind CSS classes
  2. JavaScript/TypeScript — Importable for programmatic use

Using Tokens

In Tailwind CSS Classes

All tokens are available as Tailwind v4 theme variables:

// Colors <div className="bg-primary-400 text-grey-900">Content</div> // Shadows <div className="shadow-soft-lg">Card with soft shadow</div> // Typography <p className="text-body-lg">Large body text</p>

In JavaScript/TypeScript

import { colors, shadows, spacing, typography, blurs, grid } from "@raydenui/ui/preset"; // Access any token console.log(colors.primary[400]); // "#F56630" console.log(shadows.soft.lg); // "0px 4px 6px..." console.log(spacing[4]); // "16px"

Colors

Primary

The primary color palette is a warm orange, used for main actions and brand elements.

TokenValuePreview
primary-50#FFECE5
primary-75#FCD2C2
primary-100#FCB59A
primary-200#FA9874
primary-300#F77A4A
primary-400#F56630
primary-500#EB5017
primary-600#CC400C
primary-700#AD3307
primary-800#8F2802
primary-900#711E00

Secondary

A blue palette for secondary actions and informational elements.

TokenValue
secondary-50#E3EFFC
secondary-75#C6DDF7
secondary-100#B6D8FF
secondary-200#80BBFF
secondary-300#3D89DF
secondary-400#1671D9
secondary-500#0D5EBA
secondary-600#034592
secondary-700#04326B
secondary-800#012657
secondary-900#001633

Grey

Neutral tones for text, borders, and backgrounds.

TokenValueUsage
grey-50#F9FAFBSubtle backgrounds
grey-75#F7F9FCCard backgrounds
grey-100#F0F2F5Dividers, input backgrounds
grey-200#E4E7ECBorders, disabled backgrounds
grey-300#D0D5DDInput borders, outlines
grey-400#98A2B3Placeholder text, icons
grey-500#667185Secondary text
grey-600#475367Body text
grey-700#344054Strong text
grey-800#1D2739Headings
grey-900#101928Primary text

Semantic Colors

Success

TokenValue
success-50#E7F6EC
success-400#0F973D
success-600#04802E
success-700#036B26

Error

TokenValue
error-50#FBEAE9
error-400#D42620
error-500#CB1A14
error-700#9E0A05

Warning

TokenValue
warning-50#FEF6E7
warning-400#F3A218
warning-500#DD900D
warning-600#AD6F07

Info

TokenValue
info-400#0BA5EC
info-500#0086C9

Shadows

Soft Shadows

Subtle, diffused shadows for a gentle elevation effect.

TokenValue
shadow-soft-xxs0px 1.5px 4px -1px rgba(16, 25, 40, 0.07)
shadow-soft-xs0px 2px 4px -1px rgba(16, 25, 40, 0.02), 0px 5px 13px -5px rgba(16, 25, 40, 0.05)
shadow-soft-sm0px 10px 18px -2px rgba(16, 25, 40, 0.07)
shadow-soft-md0px 0px 3px -1px rgba(16, 25, 40, 0.04), 0px 14px 22px -9px rgba(16, 25, 40, 0.14)
shadow-soft-lg0px 4px 6px -2px rgba(16, 25, 40, 0.03), 0px 16px 24px -4px rgba(16, 25, 40, 0.08)
shadow-soft-xl0px 8px 8px -4px rgba(16, 25, 40, 0.03), 0px 24px 32px -4px rgba(16, 25, 40, 0.08)
shadow-soft-2xl0px 32px 54px -12px rgba(16, 25, 40, 0.18)
shadow-soft-3xl0px 40px 72px -12px rgba(16, 25, 40, 0.14)

Hard Shadows

Defined shadows with visible edges for stronger elevation.

TokenValue
shadow-hard-xxs0px 2px 5px -2px rgba(16, 25, 40, 0.06), 0px 2px 7px 0px rgba(16, 25, 40, 0.05), 0px 0px 0px 1px rgba(16, 25, 40, 0.05)
shadow-hard-xs0px 2px 12px -1px rgba(16, 25, 40, 0.1), 0px 2px 2px -1px rgba(16, 25, 40, 0.04), 0px 0px 0px 1px rgba(16, 25, 40, 0.05)
shadow-hard-sm0px 6px 16px 0px rgba(16, 25, 40, 0.08), 0px 0px 0px 1px rgba(16, 25, 40, 0.05)
shadow-hard-md0px 0px 3px -1px rgba(16, 25, 40, 0.04), 0px 16px 24px -6px rgba(16, 25, 40, 0.08), 0px 0px 0px 1px rgba(16, 25, 40, 0.05)

Typography

Manrope gives headings a distinct voice. Hanken Grotesk carries paragraphs, navigation, buttons, form labels, and other interface text. Code uses the local Mac stack: SF Mono, SFMono-Regular, then Menlo, with platform fallbacks elsewhere.

RoleFamily utilityDefault weight
Displayfont-heading (Manrope)700
Headingsfont-heading (Manrope)600
Bodyfont-sans (Hanken Grotesk)400
Navigation and interface labelsfont-sans (Hanken Grotesk)500
Eyebrows and metadatafont-sans (Hanken Grotesk)500
Codefont-mono (SF Mono / Menlo)400

Role scale

Sizes use rem so they follow the reader’s default text size. Pixel equivalents below assume a 16px root. Line heights are unitless. Each semantic text-* utility includes size, line height, tracking, and default weight. Display, heading, label, and code utilities also select their font family; body and caption utilities inherit the surrounding family. Use font-sans explicitly when placing body text inside a heading.

UtilitySizeAt 16px rootLine heightTrackingWeight
text-display-lg3.5rem56px1.1-0.03em700
text-display-sm3rem48px1.1-0.03em700
text-h12.5rem40px1.2-0.03em600
text-h22.25rem36px1.2-0.03em600
text-h32rem32px1.2-0.02em600
text-h41.75rem28px1.2-0.02em600
text-h51.5rem24px1.2-0.02em600
text-h61.25rem20px1.2-0.02em600
text-body-lg1.125rem18px1.50400
text-body-md1rem16px1.50400
text-body-sm0.875rem14px1.50400
text-body-xs0.75rem12px1.50400
text-caption-lg0.875rem14px1.50.08em500
text-caption-sm0.75rem12px1.50.08em500
text-caption-xs0.75rem12px1.50.08em500
text-label-lg1rem16px1.50500
text-label-md0.875rem14px1.428570500
text-label-sm0.75rem12px1.333330500
text-code-md0.875rem14px1.60400
text-code-sm0.75rem12px1.50400

Applying the system

<section className="space-y-6"> <h1 className="text-h3 md:text-h1">Your workspace, connected</h1> <p className="text-body-md prose-measure"> Keep projects, conversations, and decisions in one place. </p> <nav aria-label="Workspace" className="font-sans text-label-md"> <a href="/projects">Projects</a> </nav> <pre className="text-code-md overflow-x-auto"> <code>npm install @raydenui/ui</code> </pre> </section>
  • Choose heading elements for document structure, then choose their visual size with utilities. Heading tags automatically use Manrope; they do not impose a new size on existing components.
  • Use text-h3 md:text-h1 or text-h2 md:text-display-lg for responsive titles. Large display sizes are for short headlines, not dense panels.
  • Use text-body-md for reading text and prose-measure to cap long paragraphs at 65 characters. text-body-sm is for secondary text, not the default reading size.
  • Use text-label-md for controls and navigation. Use text-label-lg for mobile inputs; do not reduce the document’s root size to fit a layout.
  • Keep small labels in sentence case. Add uppercase to text-caption-* only for short eyebrows; caption-xs remains a compatibility alias at 12px, matching caption-sm.
  • Heading utilities balance line wrapping. Code blocks should scroll horizontally. Apply tabular-nums to changing values and table numbers.
  • font-medium, font-semibold, and font-bold can override a role’s default weight. Manrope is upright only; use Hanken Grotesk for true italic emphasis.

Spacing

Based on a 4px grid system.

TokenValue
14px
28px
312px
416px
520px
624px
728px
832px
1040px
1248px
1664px
2080px
2496px
32128px
40160px
48192px

Blurs

For backdrop and filter blur effects.

TokenValue
blur-xs2px
blur-sm4px
blur-md12px
blur-lg16px
blur-xl20px

Grid & Breakpoints

Breakpoints

TokenValue
sm320px
md600px
lg1136px

Grid Columns

The grid system adapts to different screen sizes:

  • Small (320px+): 4 or 6 columns, 16px margin, 12px gutter
  • Medium (600px+): 6 or 8 columns, 32px margin, 20px gutter
  • Large (1136px+): 12 columns, 112px margin, 32px gutter
  • Fluid: 12 columns, 24px margin, 24px gutter

Font Family

Import the shared styles and optional self-hosted fonts once in your application:

@import "tailwindcss"; @import "@raydenui/ui/styles.css"; @import "@raydenui/ui/fonts.css";

fonts.css ships variable WOFF2 subsets, including Hanken Grotesk’s true italic, with font-display: swap. Browsers fetch only the subsets and styles used on the page. Both font licenses are included in the package. SF Mono and Menlo are resolved locally; Rayden does not download or redistribute them.

If you already load these families yourself, omit fonts.css. The styles retain system fallbacks when webfonts are unavailable. Override --font-heading, --font-sans, and --font-mono to customize the family roles:

@theme { --font-heading: "Manrope", ui-sans-serif, system-ui, sans-serif; --font-sans: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif; --font-mono: "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

The JavaScript typography and fontFamily exports from @raydenui/ui/preset, the CSS utilities, and the AI/DTCG tokens describe the same role system.

Last updated on