VisorVisor
Blocks

Design System Specimen

A live, interactive design system specimen block that showcases the full Visor token system and component library. Responds dynamically to the active theme.

Preview

Design System Specimen

A live showcase of all Visor design tokens and components. Switch themes to see everything update in real-time.

Color Palette

Theme identity colors, status indicators, and semantic tokens.

Theme Colors
Brand Color
Primary
#cfdfe7
100
#adc8d5
200
#89aec0
300
#6093aa
400
#397a96
500
#2a647c
600
#1a4e64
700
#0b3a4c
800
#002938
900
#001c29
950
Neutral
#f3f4f6
100
#e5e7eb
200
#d1d5db
300
#9ca3af
400
#6b7280
500
#4b5563
600
#374151
700
#1f2937
800
#111827
900
#030712
950
Status Colors
Success
#f0fdf4
50
#dcfce7
100
#22c55e
500
#16a34a
600
#15803d
700
#14532d
900
Warning
#fffbeb
50
#fef3c7
100
#f59e0b
500
#d97706
600
#b45309
700
#78350f
900
Error
#fef2f2
50
#fee2e2
100
#ef4444
500
#dc2626
600
#b91c1c
700
#7f1d1d
900
Info
#f0f9ff
50
#e0f2fe
100
#0ea5e9
500
#0284c7
600
#0369a1
700
#0c4a6e
900
Semantic Tokens
Text
text-primary
text-secondary
text-tertiary
text-disabled
text-inverse
text-link
text-success
text-warning
text-error
text-info
Surface
surface-page
surface-card
surface-subtle
surface-muted
surface-overlay
surface-accent-subtle
surface-accent-default
surface-accent-strong
Border
border-default
border-muted
border-strong
border-focus

Typography

Font families, weights, and the full type scale.

Font Families
Heading & Body--font-heading

The quick brown fox jumps
Regular400
The quick brown fox jumps
Medium500
The quick brown fox jumps
Semibold600
The quick brown fox jumps
Bold700
Monospace--font-mono

The quick brown fox jumps
Regular400
The quick brown fox jumps
Medium500
The quick brown fox jumps
Bold700
Type Scale
4xl36px
Display text
3xl30px
Page heading
2xl24px
Section heading
xl20px
Subsection heading
lg18px
Large body text
base16px
Default body text for reading
sm14px
Small text, labels, and captions
xs12px
Fine print and metadata

Spacing

4px-based spacing scale.

0
0px / 0
1
4px / 0.25rem
2
8px / 0.5rem
3
12px / 0.75rem
4
16px / 1rem
5
20px / 1.25rem
6
24px / 1.5rem
8
32px / 2rem
10
40px / 2.5rem
12
48px / 3rem
16
64px / 4rem
20
80px / 5rem
24
96px / 6rem

Shadows & Elevation

Shadow tokens from subtle to prominent.

xs

--shadow-xs

sm

--shadow-sm

md

--shadow-md

lg

--shadow-lg

xl

--shadow-xl

Surfaces

Background surface tokens for layering and hierarchy.

Page--surface-page
Card--surface-card
Subtle--surface-subtle
Muted--surface-muted
Overlay--surface-overlay
Accent Subtle--surface-accent-subtle
Accent Default--surface-accent-default
Accent Strong--surface-accent-strong

Border Radius

Radius scale from sharp to fully rounded.

none0px
sm2px
md4px
lg8px
xl12px
2xl16px
3xl24px
full9999px

Motion & Duration

Duration tokens control transition speed.

100ms
--motion-duration-100
150ms
--motion-duration-150
200ms
--motion-duration-200
300ms
--motion-duration-300
500ms
--motion-duration-500
800ms
--motion-duration-800

Easing Curves

Easing tokens control the feel of transitions.

linear
linear
ease-in
cubic-bezier(0.4, 0, 1, 1)
ease-out
cubic-bezier(0, 0, 0.2, 1)
ease-in-out
cubic-bezier(0.4, 0, 0.2, 1)
spring
cubic-bezier(0.34, 1.56, 0.64, 1)

Icons

Phosphor icons at multiple sizes. All icons from @phosphor-icons/react.

Size Scale
16px
20px
24px
32px
Icon Map
HouseHome / dashboard
MagnifyingGlassSearch
GearSettings
UserProfile / account
BellNotifications
EnvelopeSimpleMessages / email
PlusAdd / create
XClose / dismiss
CheckConfirm / success
WarningWarning / caution
InfoInformation
ArrowRightNavigate / next
CaretDownExpand / dropdown
DotsThreeMore actions
PencilSimpleEdit
TrashDelete

Accessibility

WCAG contrast ratios for key text/background pairs.

Aa
text-primary / surface-page15.4:1
AA AAA
Aa
text-primary / surface-card15.4:1
AA AAA
Aa
text-secondary / surface-page5.74:1
AA AAA
Aa
text-tertiary / surface-page4.75:1
AA AAA
Aa
text-link / surface-page4.62:1
AA AAA
Aa
text-inverse / surface-overlay14.7:1
AA AAA
Aa
text-success / surface-page4.49:1
AA AAA
Aa
text-error / surface-page5.25:1
AA AAA
Aa
text-warning / surface-page4.01:1
AA AAA
Aa
text-primary / surface-subtle14.9:1
AA AAA
Aa
text-primary / surface-muted13.8:1
AA AAA

Buttons

All button variants and sizes.

Variants
Sizes
States
Default
Hover
Active
Focus
Disabled

Form Controls

All form input types in default, error, and disabled states.

Text Input
Textarea
Checkbox
Radio Group
Select
Switch
Slider
Toggle Group

Component Showcase

A selection of Visor components composed together.

Card
Card Title

Card content with body text and semantic surface tokens.

Badge
DefaultSecondaryOutlineDestructive
Alert
Progress
25%
75%
100%
Tabs

Overview content goes here.

Separator

Content above

Content below

Installation

npx visor add --block design-system-specimen

This copies the specimen block and all its sub-components into your project:

  • blocks/design-system-specimen/design-system-specimen.tsx — orchestrator component
  • blocks/design-system-specimen/design-system-specimen.module.css — styles
  • blocks/design-system-specimen/specimen-data.ts — token data arrays
  • blocks/design-system-specimen/token-specimens.tsx — color, typography, spacing, shadow, surface, radius sections
  • blocks/design-system-specimen/motion-specimens.tsx — duration and easing previews
  • blocks/design-system-specimen/component-specimens.tsx — button, form, and component showcase
  • blocks/design-system-specimen/utility-specimens.tsx — icon grid and accessibility checks

Usage

import { DesignSystemSpecimen } from '@/blocks/design-system-specimen/design-system-specimen';

export default function DesignSystemPage() {
  return <DesignSystemSpecimen />;
}

What It Covers

The specimen block includes 12 interactive sections:

  • Color Palette — Swatches for all primitive and semantic color tokens
  • Typography — Full type scale from display (4xl) to fine print (xs)
  • Spacing — Visual spacing scale with proportional bars
  • Shadows & Elevation — All shadow levels applied to cards
  • Surfaces — Background variants with labels
  • Border Radius — Radius scale from sharp to fully rounded
  • Motion & Duration — Animated bars showing each duration token
  • Easing Curves — Animated dots demonstrating each easing function
  • Icons — Phosphor icon grid with size scale and semantic map
  • Accessibility — WCAG contrast pairs with AA/AAA pass/fail indicators
  • Buttons — All variants, sizes, and interactive states
  • Form Controls — Text input, textarea, checkbox, radio, select, switch, slider, toggle group
  • Component Showcase — Card, badge, alert, progress, tabs, separator

Theme Responsive

The specimen is fully theme-responsive. Use the theme switcher in the docs header to see every section update in real-time. This makes it useful for validating that a theme covers all design tokens completely.

Theme-Derived Font Weights

The Typography → Font Families section reads the active theme's declared weights (from typography.{display,body,heading}.weights in the theme's .visor.yaml) so the rendered weight rows match what the theme actually loads. A theme that loads Light/Regular/Medium/Bold/Extra Bold shows five rows; a theme that loads only Regular and Bold shows two. When the active theme has no weights declared, the specimen falls back to the standard 400/500/600/700 + 400/500/700 grid.

Pass a themeManifest prop (typed DesignSystemSpecimenThemeEntry[]) to wire in your own typography metadata. The docs site auto-injects its PRIVATE_THEMES manifest — call sites in MDX don't need to pass it manually.

<DesignSystemSpecimen
  themeManifest={[
    {
      slug: "blacklight",
      typography: {
        body: { family: "PP Model Mono", weights: [300, 400, 500, 700, 800] },
      },
    },
  ]}
/>

About Blocks

Blocks are complete UI patterns made up of multiple Visor components. Unlike individual components, blocks represent larger, composed sections of UI. Blocks are copy-and-own, just like components — install them into your project and customize freely.