Depth
Shadows show which surfaces sit above others. This chapter covers the shadow scale and when to use each step.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
Usage
Use shadow tokens to create elevation and hierarchy. Each shadow level provides meaningful depth for different interface elements.
Components can also use the shadow prop for direct shadow application:
Tokens
Shadow tokens with their usage guidelines:
Shadow Scale
Shadow 1
Inset shadow for subtle depth and pressed states. Use for form inputs, pressed buttons, or elements that need to appear recessed.
Shadow 2
Classic panel and card shadows for subtle elevation. Perfect for cards, panels, and surfaces that need minimal depth.
Shadow 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.
Shadow 4
Small overlays and hover cards with medium elevation. Ideal for hover states, small popovers, or temporary overlays.
Shadow 5
Popovers and dropdowns with strong elevation. Use for dropdown menus, popovers, and floating panels that need clear separation.
Shadow 6
Large overlays and dialogs with maximum elevation. Reserved for modals, dialogs, and major overlays that need the highest visual priority.
Dark 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.
Component Usage
Many components support the shadow prop for direct shadow application:
The shadow prop also supports responsive values:
Credits
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.
© 2026 Kushagra Dhawan. Licensed under MIT. GitHub.