Shadows
Use the shared shadow scale to express elevation without copying raw box-shadow values.
Shadow scale
Shadow tokens express elevation without exposing raw box-shadow values. The light theme uses a quiet black shadow scale. The dark theme strengthens the ambient shadow and adds a restrained highlight so elevated surfaces remain legible.
Dark theme
nonexssmmdlgxl2xlLight theme
nonexssmmdlgxl2xlLight and dark elevation
Keep the same shadow prop in both modes. The active theme supplies the appropriate elevation treatment for the surface.
Menu surface
import { Box, Text } from "@smoothie-framework/whisk-react";
<Box background="surface2" rounded="lg" shadow="md" padding={4}>
<Text>Menu surface</Text>
</Box>Dialog surface
import { Box, Text } from "@smoothie-framework/whisk-react";
<Box background="surface2" rounded="lg" shadow="xl" padding={4}>
<Text>Dialog surface</Text>
</Box>Use elevation
Prefer surface and border roles for ordinary hierarchy. Add a shadow when a panel, menu, or dialog needs to read as physically above its surroundings.
Raised card
import { Box, Text } from "@smoothie-framework/whisk-react";
<Box background="surface2" rounded="lg" shadow="sm" padding={4}>
<Text>Raised card</Text>
</Box>- Use
xsorsmfor modestly raised cards and compact surfaces. - Use
mdfor menus, selects, and popovers; uselgfor drawers or side panels. - Use
xlfor dialogs. Reserve2xlfor exceptional, highest-elevation surfaces. - Do not use shadow alone to communicate selection, an error, or keyboard focus.