Shadows
Custom shadow system with 6-step scale for elevation and hierarchy. The shadow infrastructure (6-step scale, token structure) is from Radix Themes, but Kookie UI uses custom shadow values that differ from Radix Themes.
For complete shadow documentation and advanced usage, visit the Radix Themes Shadows documentation. Note that Kookie UI's shadow values are customized and may not match Radix Themes exactly.
Installation
shellUsage
Use shadow tokens to create elevation and hierarchy. Each shadow level provides meaningful depth for different interface elements.
csscssComponents can also use the shadow prop for direct shadow application:
tsxTokens
Shadow tokens with their usage guidelines:
cssShadow Scale
Shadow 1
Inset shadow for subtle depth and pressed states. Use for form inputs, pressed buttons, or elements that need to appear recessed.
cssShadow 2
Classic panel and card shadows for subtle elevation. Perfect for cards, panels, and surfaces that need minimal depth.
cssShadow 3
Elevated cards and buttons with more prominent depth. Use for raised cards, elevated buttons, or elements that need to stand out from the background.
cssShadow 4
Small overlays and hover cards with medium elevation. Ideal for hover states, small popovers, or temporary overlays.
cssShadow 5
Popovers and dropdowns with strong elevation. Use for dropdown menus, popovers, and floating panels that need clear separation.
cssShadow 6
Large overlays and dialogs with maximum elevation. Reserved for modals, dialogs, and major overlays that need the highest visual priority.
cssDark Mode
All shadows automatically adapt to dark mode when using the Theme component's appearance prop. Shadow values are carefully tuned to maintain proper depth perception in both light and dark themes.
tsxComponent Usage
Many components support the shadow prop for direct shadow application:
tsxThe shadow prop also supports responsive values:
tsxCredits
The shadow infrastructure (6-step scale system and token structure) is from Radix Themes by WorkOS. However, Kookie UI uses custom shadow values that have been modified from the original Radix Themes values. The shadow system structure and approach credit goes to Radix Themes, while the specific shadow values are custom to Kookie UI.