Loading component…
The thing people click to do the main job.
There is one clear next step, like New task or Save.
The click only moves between sections. Use a tab for that.
One primary button for the main action. Other actions use a quieter variant.
To make every button rounder or sharper, change the theme. To invent a new kind of button, like a circle or one with an icon on the left, edit this component once. Every screen that uses it follows.
Blue app · Light product theme
The corners grow with the height. Change the roundness in the theme and all three move together.
Hover and focus are painted so the color is visible. The default button still changes when you hover it or reach it with the keyboard.
1 Spacing
8px between parts. Padding on the control is usually 12 or 16.
2 Component property
Button uses the props in its code sample.
3 Auto layout
The specimen hugs its content. The preview shows the direction.
4 Instance
Instance of Button.
5 Variance
Default, plus the states drawn in the preview.
6 Usage
There is one clear next step, like New task or Save.
It is a native button. Loading sets disabled. The focus ring is the accent color, drawn on keyboard focus.
import { Button } from "@/design-system";
<Button>New task</Button>
<Button variant="outline" size="sm">Cancel</Button>
<Button variant="destructive" loading>Delete</Button>