Design Language

Glass morphism, color system, typography, and motion.

Glass morphism principles

shadszn/ui is built on a glass-morphism design philosophy. Surfaces are translucent layers stacked on deep backgrounds, creating visual depth through transparency rather than elevation shadows. The core principles:

  • Layered transparency -- Surfaces use low-opacity white fills (4%, 8%, 12%) to create depth without blocking the background.
  • Subtle borders -- 1px borders at 8-20% white opacity define edges without being heavy.
  • Backdrop blur -- Optional blur on overlays (dialogs, dropdowns) enhances the frosted glass effect.
  • Luminous accents -- Glow effects (box-shadow) on focus and active states give interactive elements a soft radiance.

Color system

The brand palette centers on three families: navy, lavender, and orange. Together they create a distinctive night-sky aesthetic.

Navy Deep
#0A0820
--bg-deep
Navy Base
#0D0B2E
--bg-base
Navy
#19154E
--brand-navy
Navy Light
#2a247a
--brand-navy-light
Lavender
#E8E3FF
--brand-lavender
Orange
#FF8B4B
--brand-orange

Text hierarchy

Four text levels provide consistent information hierarchy through opacity rather than color changes. This keeps the palette cohesive while differentiating content importance.

Primary
Headings, important labels, primary content
Secondary
Body text, descriptions, supporting content
Tertiary
Placeholders, captions, metadata
Muted
Disabled states, decorative text, dividers

Spacing scale

shadszn/ui uses Tailwind's default 4px-based spacing scale. These are the most commonly used values across components:

ScalePixelsUsage
0.52pxMicro nudges
14pxTight gaps between inline elements
1.56pxCompact padding
28pxSmall internal padding
312pxDefault gap between elements
416pxStandard padding
624pxSection spacing
832pxLarge section padding
1248pxPage-level spacing
1664pxMajor section breaks

Border radius scale

Consistent rounding creates visual harmony across all components.

sm
4px
Badges, small tags
md
10px
Buttons, inputs
lg
12px
Cards, panels
xl
16px
Dialogs, modals
2xl
24px
Large containers
3xl
32px
Hero sections

Motion principles

Animation in shadszn/ui is powered by Framer Motion and follows a minimal, purposeful approach. Motion serves to orient the user, not to decorate.

  • Fast transitions -- 120ms for micro-interactions (hover, focus). 200ms for standard transitions. 300ms for larger layout shifts.
  • Ease curves -- Default easing uses CSS ease. Framer Motion variants use spring physics with low stiffness for a natural feel.
  • Entrance animations -- Components enter with a subtle fade + translate (opacity 0 to 1, y-offset 8px to 0). Use the provided Framer Motion variants for consistency.
  • Stagger children -- Lists and grids stagger child entrance by 50ms per item for a cascading reveal.

All motion respects the user's prefers-reduced-motion system setting. When reduced motion is preferred, animations resolve instantly. Use the useReducedMotion hook from the utilities package to conditionally disable motion in your own components.

import { motion } from "framer-motion"

// Standard fade-up entrance
const fadeUp = {
  initial: { opacity: 0, y: 8 },
  animate: { opacity: 1, y: 0 },
  transition: { duration: 0.3, ease: "easeOut" },
}

// Staggered list container
const stagger = {
  animate: { transition: { staggerChildren: 0.05 } },
}

// Usage
<motion.div {...fadeUp}>
  <Card>...</Card>
</motion.div>

Accessibility commitments

shadszn/ui is built accessibility-first. Every component is grounded in these principles:

  • Radix UI primitives -- All interactive components are built on Radix UI, providing correct ARIA attributes, keyboard navigation, focus management, and screen reader support out of the box.
  • Contrast ratios -- Text colors on dark backgrounds meet WCAG AA contrast requirements. Primary text (95% white) on navy achieves a contrast ratio above 12:1.
  • Motion sensitivity -- All animations are disabled when prefers-reduced-motion: reduce is set. Touch targets maintain a minimum 44px hit area.
  • Focus indicators -- Visible focus rings on all interactive elements, using the lavender glow effect to stay on-brand while meeting visibility requirements.