Button design guidelines: size, color, text and states
Buttons are where a website asks visitors to do something: enquire, add to cart, pay, download, sign up. If they are unclear, too small or behave unpredictably, that ask fails at the last step. Good button design guidelines give every button on a site a defined type, size, colour, label style and set of states, so designers and developers stop reinventing them page by page. This article lays out a complete, compact system you can adopt or adapt.
Three button types cover almost everything
Most business websites and web apps need only three levels of emphasis. Having more usually leads to confusion about which one to use.
Primary buttons
The primary button marks the most important action in a given area: “Get a quote”, “Place order”, “Book appointment”. It uses a solid fill in your accent colour with high-contrast text. As a guideline, show only one primary button per section or dialog, so the main action is never in doubt.
Secondary buttons
Secondary buttons are for useful but less important actions that sit alongside the primary: “View pricing”, “Save draft”, “Cancel”. They are typically outlined (a border with a transparent or light background) or use a muted fill. They should look clearly clickable but visibly weaker than the primary.
Text buttons
Text buttons, sometimes called tertiary or ghost buttons, look like styled links with no border or background. Use them for low-priority actions such as “Skip”, “Learn more” or “Edit” inside a table row. They are compact and unobtrusive, which is why they should never carry critical actions.
A note on destructive buttons
Actions like “Delete account” or “Cancel order” often get a red variant. Reserve red strictly for destructive actions so it keeps its warning meaning, and pair it with a confirmation step where mistakes are costly.
Sizing rules
Size affects both how noticeable a button is and how easy it is to press.
- Touch target: aim for at least 44 to 48px of height on touch screens. Material Design recommends 48 by 48dp targets; WCAG 2.2 sets a minimum of 24 by 24 CSS pixels at AA, but larger is far more comfortable.
- Standard size: 44 to 48px tall with 16px text works for most website buttons.
- Small size: around 32 to 36px for dense areas like tables and toolbars on desktop, with enough space between neighbours.
- Large size: 52 to 56px for hero calls to action or mobile checkout.
- Width: let buttons size to their label with generous horizontal padding on desktop. On mobile, full-width buttons for the main action in forms and checkout are easier to tap.
- Spacing: keep at least 8px between adjacent buttons, more on touch devices, to avoid mis-taps.
Limit yourself to two or three sizes. A fourth size rarely solves a real problem.
Colour rules
Colour tells visitors which button matters most and whether it is available.
- Use your accent colour for primary buttons only, so it becomes a reliable signal.
- Check that button text meets a 4.5:1 contrast ratio against the button fill.
- For outlined secondary buttons, ensure the border has at least a 3:1 contrast ratio with the page background, as required for user interface components under WCAG.
- Keep the same colours across the site; a green primary button on one page and a blue one on another weakens recognition.
- Test buttons on every background they appear on, including dark sections and photographs.
Writing button labels
A button label should tell people exactly what happens when they press it.
- Start with a verb: “Download brochure”, “Request callback”, “Pay ₹2,499”.
- Be specific. “Submit” and “Click here” say nothing about the outcome.
- Keep it short, ideally one to three words, occasionally up to five.
- Use sentence case (“Book a demo”) for readability; all capitals can feel shouty and are harder to read.
- Match the label to the page heading or dialog title so people know they are completing the task they started.
Avoid icons as the only label except for universally understood actions like close or search, and even then provide an accessible name in the code.
Button states every system needs
A button changes appearance as people interact with it. Each state should be designed on purpose, not left to browser defaults.
Default
The resting appearance described above.
Hover
On devices with a mouse, a slightly darker or lighter fill, or a subtle shadow, confirms the element is clickable. Do not rely on hover to reveal that something is a button, since touch screens have no hover.
Focus
When someone reaches a button with the keyboard, a clearly visible focus ring must appear. Never remove focus outlines without a strong replacement. Using the CSS :focus-visible selector shows the ring for keyboard users without showing it on every mouse click.
Active or pressed
A brief darker shade or slight inset as the button is pressed gives tactile feedback, especially on touch screens.
Disabled
Disabled buttons look muted and do not respond. Use them carefully; a greyed-out “Continue” with no explanation frustrates people. Where possible, keep the button enabled and show a helpful message about what is missing when pressed.
Loading
After a click that triggers a network request, such as payment or form submission, show a spinner or change the label to something like “Sending…”, and prevent repeat clicks. This avoids duplicate orders and reassures people that something is happening.
Document the system in one reference
Create a single reference page or design file listing each button type, size and state with its exact colours, padding, border radius, font weight and label rules. Developers can then build these once as reusable components. If you want a complete button and component system built into your site or app, our website development and mobile app development teams can set it up from the design stage.
Frequently asked questions
What is the best colour for a call-to-action button?
There is no universally best colour. What works is a colour that contrasts strongly with its surroundings and is used consistently for primary actions only.
Should buttons have rounded corners?
Rounded, square and pill-shaped buttons can all work. Choose a radius that suits your brand and apply it to every button, input and card for a consistent look.
How many buttons should be on one screen?
Keep one primary button per section or dialog, with a small number of secondary or text buttons where needed. Many competing buttons make decisions harder.
Is a link or a button better for navigation?
In code, links should take people to another page and buttons should perform actions. Visually, a link can be styled as a button when it represents a key call to action.
We can do this for you
See what a package covers and what it costs, or ask us about your own project.

