whisk/ui foundations
Learn the visual vocabulary shared by whisk/ui components before choosing a component.
Foundation model
Foundations are the shared visual rules behind Whisk/UI. They define the values and rules that components, themes, and renderer adapters share.
- Primitive tokens provide the palette, type scale, spacing, sizing, borders, radii, shadows, and layering values.
- Semantic theme tokens map those values to roles such as surfaces, text, borders, accents, and statuses across light and dark modes.
- Component props apply the vocabulary to a rendered interface. Keep component behavior and application state outside the foundation layer.
Choose a foundation
Start with the visual rule or constraint you need to apply.
Apply foundations
Use component props to apply semantic colors and shared scales. Prefer CSS only when the component API does not express the host-specific behavior you need.
Release notes
A shared foundation keeps this surface consistent.
import { Box, Stack, Text } from "@smoothie-framework/whisk-react";
<Stack
gap={{ base: 3, md: 4 }}
background="surface1"
border="sm"
borderColor="borderSubtle"
rounded="lg"
padding={4}
>
<Box background="surface2" rounded="md" padding={3}>
<Text textStyle="caption">Release notes</Text>
<Text textStyle="body" color="subtle">A shared foundation keeps this surface consistent.</Text>
</Box>
</Stack>Next steps
Move from shared rules to theme configuration, component APIs, or custom styling.