Layer styles
Reuse a surface treatment made from background, border, radius, shadow, and opacity tokens.
Layer anatomy
A layer style is a repeatable surface treatment assembled from foundation tokens.
Compose a layer from its background, border, radius, shadow, and—where the design needs it—opacity. Choose semantic tokens so the treatment remains meaningful across themes.
Whisk/UI does not provide a single layerStyle prop. Apply a one-off treatment with utility props; create a recipe when the same treatment is reused.
Layer gallery
Use increasing separation only when the relationship between surfaces calls for it.
Base surface
For page content and quiet grouping.
Raised surface
For related content that needs separation.
Floating surface
For transient content above the page.
Layer usage
Keep the token choices explicit for one surface; name them in a recipe when the pattern repeats.
Activity
3 deployments completed today.
import { Box, Text } from "@smoothie-framework/whisk-react";
export function ActivityCard() {
return (
<Box
background="surface2"
border="sm"
borderColor="borderSubtle"
rounded="lg"
shadow="sm"
padding={4}
>
<Text textStyle="caption">Activity</Text>
<Text textStyle="body" color="subtle">3 deployments completed today.</Text>
</Box>
);
}For a named application pattern used in several places, use a component recipe instead of repeating the declaration.