Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
They define the visual characteristics of a brand or a product such as typography, colors, icons, and spacing. They make it easier to maintain a scalable, consistent system for UI development. Radius maintains all design tokens in a theme.ts
file.
The theme is a collection of design tokens. You might have multiple versions of the theme. For example, to switch between different brands or perhaps color modes (dark & light). The shape of the theme object conforms to the System UI Theme Specification.
We use Styled System to connect component styles to design tokens. For example:
Now, this component will have style props available to set foreground color, background color, margin and padding values.
There are situations where you might want to support slight stylistic variations of components. For example, a button might have primary, secondary and transparent variants. Or typography variants similar to how text styles work in Sketch and Figma.
Styled System variants allow you to apply a set of visual styles to a component using a single prop. These variants also map to your design tokens, defined in theme.ts
.
The Text component can now use the variant
prop to switch between lead, body and label styles.
The Field component is a composed of <Input />
, <Label />
, <Text variant="hint" color="text.secondary" />
and <Text variant="hint" color="text.error" />
. Which in-turn use a composition of design tokens and variants.