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.
Text hierarchy
Four text levels provide consistent information hierarchy through opacity rather than color changes. This keeps the palette cohesive while differentiating content importance.
Spacing scale
shadszn/ui uses Tailwind's default 4px-based spacing scale. These are the most commonly used values across components:
| Scale | Pixels | Usage |
|---|---|---|
| 0.5 | 2px | Micro nudges |
| 1 | 4px | Tight gaps between inline elements |
| 1.5 | 6px | Compact padding |
| 2 | 8px | Small internal padding |
| 3 | 12px | Default gap between elements |
| 4 | 16px | Standard padding |
| 6 | 24px | Section spacing |
| 8 | 32px | Large section padding |
| 12 | 48px | Page-level spacing |
| 16 | 64px | Major section breaks |
Border radius scale
Consistent rounding creates visual harmony across all components.
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: reduceis 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.