Design all the states of a button
A button should clearly communicate an action before it communicates a style. Choose a short, specific label and decide whether the action is primary or secondary. A real button is appropriate for an action; an anchor is appropriate for navigation to another location.
How to use this tool
- Choose padding, typography, background, border, and corner radius. Test a longer label as well as the shortest one.
- Adjust hover styling without changing the control’s size. Add focus and disabled states in your production stylesheet.
- Copy the markup and CSS into your page. Set type="button" unless the control is meant to submit a form, and connect the intended behavior.
The minimum height gives the control a practical interaction area while padding lets the width grow with its label. An offset focus outline is visible independently of the background color.
Read the reference documentation ↗