Colors
Green β orange is the action gradient. Everything interactive uses this range.
Action
--xd-action
#16A34A
Action End
--xd-action-end
#EA580C
XP / Warning
--xd-xp
#F59E0B
Streak / Error
--xd-streak
#EF4444
Badge
--xd-badge
#8B5CF6
Info
--xd-info
#3B82F6
Surface
--xd-surface
theme-aware
Background
--xd-bg
theme-aware
Semantic state tokens
Success
--xd-successError
--xd-errorWarning
--xd-warningInfo
--xd-infoTypography
Inter for UI, JetBrains Mono for code. Tight tracking on large sizes.
Display
Heading 1
Heading 2
Body β Inter 17px, line-height 1.7. Used for lesson prose and content areas.
Caption / muted β 13px, color: text-muted
const action = tokens.gradient.action
Learn Β· Build Β· Ship
Gradient text via .gradient-text utility
Components
Complete button system β variants, sizes, states, and special types.
Action buttons
Ghost & subtle
Special variants
Usage
Copy these class names directly into your HTML or JSX.
<button class="xd-btn-action">Primary</button>
<button class="xd-btn-ghost">Ghost</button>
<button class="xd-btn-subtle">Subtle</button>
<button class="xd-btn-danger">Danger</button>
<button class="xd-btn-action xd-btn-sm">Small</button>
<button class="xd-btn-action xd-btn-lg">Large</button>
<button class="xd-btn-loading">Loading...</button>
<button class="xd-btn-icon">✕</button>
<button class="xd-btn-action xd-btn-full">Full Width</button> Badges
<!-- base badge β add inline styles for color variants -->
<span class="xd-badge">Badge</span>
<!-- success variant -->
<span class="xd-badge" style="background:rgba(22,163,74,0.12);color:#4ade80;border:1px solid rgba(22,163,74,0.25)">
Activo
</span>
<!-- XP / warning variant -->
<span class="xd-badge" style="background:rgba(245,158,11,0.12);color:#F59E0B;border:1px solid rgba(245,158,11,0.25)">
1,240 XP
</span> FAB Button
Nueva nota
Card hover lift
Nota de ejemplo
Hover para ver el efecto lift
Forms
Inputs, selects, checkboxes, and toggles β all theme-aware with green focus rings.
Text inputs
Checkboxes & toggles
Complete form example
Usage
All form classes are theme-aware β they respond to the data-theme attribute automatically.
<!-- Label -->
<label class="xd-label">Label</label>
<!-- Text input -->
<input class="xd-input" placeholder="Text input" />
<!-- Error state -->
<input class="xd-input xd-input-error" />
<span class="xd-error-text">Error message</span>
<!-- Helper text -->
<span class="xd-helper">Helper text</span>
<!-- Select -->
<select class="xd-select">...</select>
<!-- Textarea -->
<textarea class="xd-textarea"></textarea>
<!-- Checkbox -->
<input type="checkbox" class="xd-checkbox" />
<!-- Toggle -->
<input type="checkbox" class="xd-toggle" /> Feedback
System feedback components β alerts for status messages, progress bars, tabs, and tooltips.
Alerts
<div class="xd-alert xd-alert-success">Success message</div>
<div class="xd-alert xd-alert-warning">Warning message</div>
<div class="xd-alert xd-alert-error">Error message</div>
<div class="xd-alert xd-alert-info">Info message</div> Progress bar
<div class="xd-progress">
<div class="xd-progress-bar" style="width:75%"></div>
</div> Tabs
Contenido de la pestana activa.
<div class="xd-tab-list">
<button class="xd-tab xd-tab-active">Active</button>
<button class="xd-tab">Tab 2</button>
<button class="xd-tab">Tab 3</button>
</div> Tooltip
<button class="xd-btn-action" data-tooltip="Tooltip text">
Hover me
</button> Tokens
Nine steps from 4px to 96px. Use --xd-space-* CSS variables.
Green-tinted shadows reinforce the brand on every interactive element.
Action SM
--xd-shadow-action-smAction MD
--xd-shadow-action-mdAction Glow
--xd-shadow-action-glowBorder radius scale
8px
12px
16px
20px
9999px
Logos & Icons
Two variants of the xdface mark β dark and light. Automatically switched via media queries.
Dark variant
Dark backgrounds
xdface
dark
Light variant
Light backgrounds
xdface
light
Usage
One file. Three ways to consume it.
Install
npm install @xdface/tokens Import
// TypeScript import { tokens } from '@xdface/tokens' // CSS custom properties import '@xdface/tokens/css' // Tailwind preset const preset = require('@xdface/tokens/tailwind') Motion
Seven tokens covering speed and feel. Hover the boxes to feel each value.
Duration
Easing
default
Standard browser ease
--xd-ease-defaultin-out
Material smooth
--xd-ease-in-outspring
Springy overshoot
--xd-ease-springTypography Scale
Nine steps from xs (11px) to 5xl (48px), each mapped to a CSS custom property.
Line heights
tight β 1.2
Headings, display
--xd-leading-tightsnug β 1.375
Large text
--xd-leading-snugnormal β 1.5
UI text
--xd-leading-normalrelaxed β 1.625
Body copy
--xd-leading-relaxedloose β 1.85
Long-form prose
--xd-leading-looseComponents v0.1
New shared utilities in tokens.css β no framework required.
.xd-card / .xd-card-hover
Static card
xdface Vault
Surface bg + border + radius-lg. Use for any content panel.
Hover card
Hover me
Lifts 2px on hover with theme-aware card shadow.
.xd-skeleton
Shimmer animation via @keyframes xd-shimmer Β· uses --xd-surface and --xd-surface-2
.xd-overlay / .xd-backdrop
.xd-kbd
Neutral shadow scale
xs
--xd-shadow-xssm
--xd-shadow-smmd
--xd-shadow-mdlg
--xd-shadow-lgxl
--xd-shadow-xlcard-hover
--xd-shadow-card-hoverZ-index scale
dropdown
--xd-z-dropdown10
sticky
--xd-z-sticky20
fixed
--xd-z-fixed30
overlay
--xd-z-overlay40
modal
--xd-z-modal50
popover
--xd-z-popover60
toast
--xd-z-toast70
tooltip
--xd-z-tooltip100