Design & SVG

Button State Previewer

Design your button's look, then see its default, hover, active and focus states side by side, without needing to hover or click through each one.

Default (interactive)

Hover

Active

Focus

How to use the button state previewer

  1. Style your buttonSet background, text color, focus ring, radius and padding.
  2. Compare all four statesSee default, hover, active and focus rendered next to each other instantly.
  3. Copy the CSSGrab the full set of rules for your stylesheet.

Why preview every state at once

Hover, active and focus styles normally only appear while you're actively interacting with an element, which makes them easy to overlook during design. Mirroring the same rules onto separate preview buttons lets you compare all four states at a glance.

Default

The button's resting appearance, and the only state that's a real, fully interactive button.

Hover

A slightly darkened background gives clear feedback that the button is interactive.

Active

A further darkened background plus a subtle scale-down while the button is being pressed.

Focus

A visible ring around the button so keyboard users can always see which control is focused.

Button State Previewer FAQ

How can hover and active states be shown at the same time?

A browser can only apply real :hover or :active styles while you interact with an element. This tool mirrors the same CSS rules onto separate preview buttons using extra classes, so all states are visible at once.

How are the hover and active colors chosen?

Hover darkens your base background by a small amount and active darkens it further, matching a common, subtle interaction pattern.

What is the focus state for?

It shows the outline that appears when a button receives keyboard focus, which is essential for accessible, keyboard-navigable interfaces.

Can I still interact with the real button?

Yes, the first button in the preview is fully interactive, so you can hover, click and tab to it to see the real states alongside the static previews.

Does the copied CSS include all four states?

Yes, the copy button generates the base class plus :hover, :active and :focus-visible rules, ready to paste into your stylesheet.

Try other free tools

More handy tools from My Panda Toolbox.