ArcaneJaspr Codex
Documentation
Design Tokens
Reference for all Arcane UI design tokens
Live Demo
Status Colors
success
warning
error
info
Spacing Scale
xs (4px)
sm (8px)
md (16px)
lg (24px)
xl (32px)
Surface Tokens
background
surface
card
input

Design Tokens#

Arcane Jaspr uses a comprehensive design token system for consistent styling. These tokens are available as both Dart constants and CSS custom properties.

Colors (ArcaneColors)#

All colors are available as CSS variables with the --arcane- prefix.

Brand & Accent Colors#

TokenCSS VariableDescription
accent--arcane-accentPrimary accent color
accentHover --arcane-accent-hover Accent hover state
accentContainer --arcane-accent-container Accent container background
accentForeground --arcane-accent-foreground Text on accent background

Status Colors#

TokenCSS VariableDescription
success--arcane-successSuccess state
successForeground --arcane-success-foreground Text on success
successHover--arcane-success-hoverSuccess hover
successContainer --arcane-success-container Success container
warning--arcane-warningWarning state
error--arcane-errorError/destructive state
errorForeground --arcane-error-foreground Text on error
info--arcane-infoInfo state
infoForeground --arcane-info-foreground Text on info

Surface Colors#

TokenCSS VariableDescription
background--arcane-backgroundPage background
backgroundSecondary --arcane-background-secondary Secondary background
backgroundTertiary --arcane-background-tertiary Tertiary background
surface--arcane-surfaceSurface/card background
surfaceVariant --arcane-surface-variant Alternate surface
card--arcane-cardCard background
cardForeground --arcane-card-foreground Text on cards
cardHover--arcane-card-hoverCard hover state
cardAlt--arcane-card-altAlternate card
input--arcane-inputInput background
inputForeground --arcane-input-foreground Input text
navbar--arcane-navbarNavigation bar

Text Colors#

TokenCSS VariableDescription
onBackground --arcane-on-background Text on background
onSurface--arcane-on-surfaceText on surface
onSurfaceVariant --arcane-on-surface-variant Secondary text
muted--arcane-mutedMuted text
mutedForeground --arcane-muted-foreground Muted foreground
textSubtle--arcane-text-subtleSubtle text
textFaint--arcane-text-faintFaint text

Border Colors#

TokenCSS VariableDescription
border--arcane-borderDefault border
borderSubtle--arcane-border-subtleSubtle border
ring--arcane-ringFocus ring

Special Colors#

TokenCSS VariableDescription
tooltip--arcane-tooltipTooltip background
tooltipForeground --arcane-tooltip-foreground Tooltip text
codeBackground --arcane-code-background Code block background

Neon Colors (Gaming)#

TokenCSS VariableDescription
neonPink--arcane-neon-pinkNeon pink
neonCyan--arcane-neon-cyanNeon cyan
neonPurple--arcane-neon-purpleNeon purple
neonGreen--arcane-neon-greenNeon green
neonOrange--arcane-neon-orangeNeon orange

Spacing (ArcaneSpacing)#

Consistent spacing scale for margins, padding, and gaps.

TokenValueUse Case
xs4pxTight spacing
sm8pxSmall spacing
md16pxDefault spacing
lg24pxLarge spacing
xl32pxExtra large
xxl48pxSection spacing
xxxl64pxLarge sections
huge96pxHero sections
massive128pxFull sections

Special Spacing#

TokenValueUse Case
sectionY80pxVertical section padding
heroY120pxHero section padding

Typography (ArcaneTypography)#

Font Sizes#

TokenValueUse Case
xs12pxSmall labels
sm14pxSecondary text
md15pxDefault text
base16pxBody text
lg18pxLarge text
xl20pxSubheadings
xl224pxHeadings
xl332pxLarge headings
xl440pxHero headings
xl548pxDisplay text
hero56pxHero text
mega72pxMega display

Font Weights#

TokenValueDescription
normal400Regular weight
w500500Medium weight
w600600Semi-bold
bold700Bold

Font Families#

TokenValueUse Case
sansSystem sans-serifBody text
headingSystem sans-serifHeadings
monoFira Code, JetBrains MonoCode

Border Radius (ArcaneRadius)#

TokenValueDescription
none0No radius
xs4pxExtra small
sm6pxSmall (theme-reactive)
md8pxMedium (theme-reactive)
lg12pxLarge (theme-reactive)
xl16pxExtra large
xxl24pxVery large
full9999pxPill shape
circle50%Circle

Layout (ArcaneLayout)#

Max Widths#

TokenValueUse Case
card400pxCards
form480pxForms
narrowText560pxNarrow text
text640pxText content
narrow768pxNarrow layouts
content1024pxMain content
container1280pxPage container
full1440pxFull width

Z-Index (ArcaneZIndex)#

Semantic z-index layers for proper stacking.

TokenValueUse Case
below-1Below content
base0Base layer
dropdown1000Dropdown menus
sticky1020Sticky elements
fixed1030Fixed elements
fab1035Floating action buttons
modalBackdrop1040Modal backdrop
modal1050Modal dialogs
popover1060Popovers
tooltip1070Tooltips
toast1080Toast notifications

Effects (ArcaneEffects)#

Shadows#

TokenDescription
noneNo shadow
xsExtra small shadow
smSmall shadow
mdMedium shadow
lgLarge shadow
xlExtra large shadow
cardCard shadow
glowAccentAccent glow
glowSuccessSuccess glow
glowErrorError glow

Transitions#

TokenDurationDescription
fast150msQuick transitions
normal200msDefault transitions
slow300msSlow transitions

Using Tokens#

In Dart#

// Using spacing
ArcaneDiv(
  styles: const ArcaneStyleData(
    padding: PaddingPreset.lg,  // Uses ArcaneSpacing.lg
    gap: Gap.md,                // Uses ArcaneSpacing.md
  ),
)

// Using colors
ArcaneDiv(
  styles: const ArcaneStyleData(
    background: Background.surface,
    textColor: TextColor.primary,
  ),
)

In CSS#

.my-component {
  padding: var(--arcane-spacing-lg);
  background: var(--arcane-surface);
  color: var(--arcane-text);
  border-radius: var(--arcane-radius-md);
  box-shadow: var(--arcane-shadow);
}

Direct Access#

// Access color values directly
final accentColor = ArcaneColors.accent;  // CSS variable reference

// Access spacing values
final spacing = ArcaneSpacing.lg;  // "24px"

// Access typography
final fontSize = ArcaneTypography.lg;  // "18px"