Kharabeesh
On-device ع

CSS Button Generator

Design a button with colours or a gradient, padding, font, corners, border and shadow, plus hover, press and focus states. Try it live and copy CSS, HTML and Tailwind.

Free, no sign-up Your data stays on your device Works offline after first open

The tool

Loading the tool…

How to use

  1. Pick a preset or start from scratch, and type the button label.
  2. Adjust colours, padding, font, corners, border and shadow, and choose a hover effect. Hover and press the button to try it.
  3. Copy the CSS and HTML, or the Tailwind classes.

Privacy & how it works

Processes your data in the browser and stores nothing.

  • Engine: lightweight in-page code, no external libraries.
  • Works offline after you open it once.

Frequently asked questions

Why is there a :focus-visible rule?

So keyboard users can see where they are. Keep it; it only shows for keyboard focus, not mouse clicks.

What does the contrast warning mean?

We compute the WCAG contrast ratio between the text and button colours. Below 4.5 the text may be hard for some people to read. With a gradient we check the weaker colour.

Does the code work on any site?

Yes, plain CSS with no libraries. Rename the .btn class if you like and put your own label inside the button.

Related tools