Principles

Golden rules are non-negotiable guardrails. Shape language defines how corners, padding, and density scale from micro UI (small) through components (medium) to page sections (big).

Golden rules

Always apply — regardless of shape scale.

  • 1

    Semantic color only

    UI uses bg-surface, text-foreground, border-border, bg-accent — never raw neutrals or hex in components.

    See colors
  • 2

    One icon system

    @tabler/icons-react everywhere. Sized by tier (size-3–size-8), stroke 2, currentColor.

    See iconography
  • 3

    Shared components first

    Buttons, inputs, dialogs from @wisihe/ui-react. No one-off copies of the same pattern.

    See components
  • 4

    Accessible by default

    Icon-only controls get aria-label on the button. Decorative SVGs get aria-hidden. Respect prefers-reduced-motion.

    See motion
  • 5

    Honest, direct copy

    Say what happened and what to do next. No hype, no blame-the-user jokes.

    See tone-of-voice

Shape language

Three scales of corner radius, padding, and presence. Pick the scale that matches the UI element's job — not its importance. Token values live on the Layout page.

Nest outward: small inside medium inside big. A hero panel (big) contains cards (medium) contains chips (small). Never use a bigger radius on a child than its parent.

Small shape

Example chip

Nested content block

Small shape

Micro surfaces — dense, tight, pill-like

Radius
rounded-md · rounded-lg · rounded-full
4–12px
Padding
p-2 · p-3
Gap
gap-1.5 · gap-2
Shadow
shadow-none · shadow-sm

Corners stay subtle. Use full radius only for pills and circular controls — not for card-sized boxes.

Avoid: Avoid rounded-2xl, heavy padding, or section-scale shadows on micro UI.

ChipTagFacet labelIcon buttonBadge

Medium shape

Example chip

Nested content block

Medium shape

Components — the default card and control language

Radius
rounded-lg · rounded-xl
12–16px
Padding
p-4 · p-5
Gap
gap-3 · gap-4
Shadow
shadow-sm · hover:shadow-md

This is the workhorse scale. Most interactive blocks use rounded-xl, border-border, and p-4.

Avoid: Do not mix medium cards with small-radius inputs in the same component group.

Content cardButtonSearch fieldList rowDo/don’t row

Big shape

Example chip

Nested content block

Big shape

Sections — page regions and marketing shells

Radius
rounded-2xl · rounded-3xl
24–32px
Padding
p-6 · p-8 · py-10
Gap
gap-6 · gap-8 · space-y-8
Shadow
shadow-lg · soft gradient fills

Big shapes frame content — they should appear once or twice per viewport, not on every list item.

Avoid: Avoid big radius on chips or nested medium cards — nest medium inside big, not the reverse.

Hero panelDesign-system introModal shellFeature bandSidebar card

Do & don’t

Match corner radius and padding to the shape scale. Nest small inside medium inside big — child corners stay equal or tighter than the parent.

Chip (small)

Do

For sale

Don't

For sale
Card (medium)

Do

Project

Don't

Project

Section (big)

Do

Hero band

Don't

Hero band

Nesting

Do

Tag

Don't

Tag