What is a button?
A button is a control that starts an action when you tap or click it: pay, send, save, delete, add to basket. The label tells you what will happen, and the look tells you how important the action is.
You’ll see buttons used to:
- Commit an action: Place order, Send money, Book flight.
- Move forward in a flow: Continue, Next, Sign up.
- Do something small in place: Like, Share, Add another item.
- Destroy something: Delete account, Remove card, Cancel subscription.
Anatomy
- 1
Container
The shape and fill. Its color and style signal how important the action is.
- 2
Label
A short verb that says exactly what happens: "Add to basket", not "OK".
- 3
Icon (optional)
Helps scanning. Never the only cue unless the icon is universally understood.
- 4
Touch target
The tappable area. It can be larger than the visible shape: at least 44×44 pt (iOS) or 48×48 dp (Android).
How it differs from similar components
A common finding is a button that should have been something else, or something else pretending to be a button.
| Component | What happens on tap | Keeps a state? | Typical use |
|---|---|---|---|
| Button | Runs an action | No (it doesn’t stay “on”) | Pay, Save, Send, Delete |
| Link | Navigates to another page or screen | No | “View order details”, “Terms of service” |
| Toggle switch | Turns a setting on or off immediately | Yes, on/off | Notifications, Wi-Fi |
| Segmented control | Picks one of a few views | Yes, one selected | List / Map |
| Chip | Filters or adds a tag | Often | “Vegan”, “Under €20” |
| Menu item | Runs an action from a list | No | Overflow menu: Rename, Duplicate |
Designs & variants
Buttons come in emphasis levels. The more important the action, the louder the button. Each platform has its own names for them.
Pick a platform, then hover, press and Tab through the buttons. They all respond.
Primary · Filled
High emphasisThe single most important action on the screen: Pay, Place order, Continue. Usually one per screen.
Secondary · Tinted
Medium emphasisImportant, but not the main path: Save for later, Add another item. Softer fill, same shape.
Secondary · Outline (custom)
Medium emphasisOutline only. Common on the web for Cancel or Back next to a primary button.
Tertiary · Plain
Low emphasisText only: Skip, Learn more, Forgot password? It still needs a full-size touch target, even without a visible shape.
Destructive
AllRed for actions that delete or can't be undone. It should almost always lead to a confirmation or an Undo.
Icon buttons
AllSave space in toolbars. Each one needs an accessible name, or a screen reader just says 'button'.
Sizes
iOSSmall, medium and large. Small buttons still need a 44 pt / 48 dp touch target around them.
Floating action button (FAB)
Android · Material 3Floats above content for the screen's main action, like New order or Compose. iOS has no FAB; it uses a toolbar button instead.
Trail running shoes
Size 42 · Ocean blue
Total
€89.90
Sticky / floating CTA
AllA call-to-action pinned to the bottom of the screen. Check it never hides content, the keyboard, or the home indicator.
Button pair
iOSPrimary + secondary side by side. Check the order follows the platform (web dialogs often put the primary on the right).
| Emphasis | iOS | Android (Material 3Material DesignGoogle's design system for Android and the web: the rules for how buttons, tabs, sheets and other components look and behave.Open in glossary →) | Web (typical) | Use it for |
|---|---|---|---|---|
| High | Filled | Filled | Primary | The main action. One per screen. |
| Medium | Tinted / Gray | Filled tonal, Outlined | Secondary | Alternatives: Save for later, Cancel |
| Low | Plain | Text | Tertiary, link-style | Skip, Learn more, Forgot password? |
| Destructive | Red (destructive) | Error color (custom) | Danger | Delete, Remove, Cancel subscription |
| Floating | Not used | FABFAB (floating action button)The round button that floats above the content, usually bottom right on Android, for the screen's main action.Open in glossary →, extended FAB | Rare | The screen’s main creation action |
Dev note: SwiftUI names
.borderedProminent, tinted or gray is .bordered, plain is .borderless, and destructive buttons use role: .destructive.Six states, every time
A button is not one picture. It’s six: default, hover, pressed, focused, disabled and loading. Designers often deliver only the default look, so developers invent the rest, and that’s where bugs appear. Explore them here:
🎛️ Button states explorer
Every button has six states. A tester checks all of them on every platform and in both themes.
Platform
Emphasis
Default
Readable label, enough contrast (4.5:1 text, 3:1 shape against the background).
Hover
Web and iPad/desktop pointers only. A subtle change; never the only hint that something is clickable.
Pressed
Instant feedback on touch-down, so the user knows the tap registered.
Focused
Keyboard users must see a clear focus ring. Press Tab on the web and look for it.
Disabled
Looks inactive and really is: no tap, no click, no Enter key, no request.
Loading
Shows progress, blocks repeat taps, keeps its size, and always ends (success or error).
Now try a real one
Server response
Tap the button several times quickly while it loads. A good button counts your taps but sends only one request.
Ready
Check this part
A "Terms of service" control opens a new page. What should it be?
A button shows a spinner. What two things does that promise?