Button
A button triggers an event or action. They let users know what will happen next.
When to use
- Doing something, such as saving, sending or opening a dialog.
- The one action a view is built around, as the single primary.
- Submitting a form, where the button is the end of the task.
When not to use
- Going somewhere. That is a link, even when you want it to look like a button, in which case use a link button.
- Several equal actions on one screen. If everything is primary, nothing is.
- A toggle between two states. That is a toggle or a checkbox.
Guidance
Do
Name the action on the button and give the view one primary. The reader can then see what the screen is for.
Don't
Do not label a button OK or Submit, and do not make two primary. Neither word says what happens and neither button leads.
Intensity
What each of this component's grounds spends, measured against the ladder in both themes.
| Appearance | Ground | Light | Dark |
|---|---|---|---|
| button | neutral | 0.042Ambient | 0.066Substrate |
| button | disabled | 0.042Ambient | 0.129Ambient |
| button--danger | danger-bold | 0.443Marked | 0.617Marked |
| button--default | neutral | 0.042Ambient | 0.066Substrate |
| button--discovery | discovery-bold | 0.444Marked | 0.624Marked |
| button--primary | brand-bold | 0.460Marked | 0.598Marked |
| button--selected | selected | 0.042Ambient | 0.062Substrate |
| button--subtle | neutral-subtle | 0.000Substrate | 0.000Substrate |
| button--warning | warning-bold | 0.448Marked | 0.601Marked |
Substrate, Ambient and Marked are measured. Directed depends on what else is in the region, and Demanded is declared and rationed, so neither is a property this component carries by itself. See intensity.
Content
What to write, and what to leave out.
- Start with a verb and say the object. Create queue, not Submit.
- Sentence case.
- Keep it to about three words.
- Match the button to the heading it answers, so a dialog asking to delete has a Delete button.
- Add an ellipsis when the action opens another step rather than doing the thing.