Tools1

Free online web UI tools

CSS Button Generator.

Find your style. Make it yours. Take the code.

Button studio

Live CSS preview
Editing state

A little inspiration

Pick a starting point. Make it yours.

Every detail is editable. Explore the tabs to find your own style.

THE CANVAS

Made by you.

.
STEP-BY-STEP GUIDEHow to create CSS buttonsRead the tutorial

Create CSS buttons, one detail at a time.

Style a button visually and get the HTML and CSS to use it on your website. Start with a preset, adjust typography, colors, shape, and shadows, then preview the interaction states before exporting.

Choose a starting pointMake it your own
VIDEO TUTORIAL How to create a CSS button Choose a preset, personalize your button, and copy or download the CSS. English narration Watch video

How to create a CSS button

Start with a style you like

Browse 44 presets across Everyday, Classic, Shaped, Expressive, Gradients, and Elite collections. Every preset is a starting point you can edit.

How presets affect your design

Choose first, then fine-tune

Use Style collection to narrow the gallery. Applying a preset replaces both default and hover styles, while keeping your button text and class name.

Try a simple solid fill, a shaped corner, a crisp outline, or a more decorative treatment. Once you find a direction, use the other tabs to make the details fit your page.

Make the label feel right

Set the button text, font family, size, weight, spacing, line height, alignment, and text color. See the label update as you work.

Fine-tune text and spacing

Typography that fits the action

Text contains the font controls and a second Button text field. Font size runs from 10 to 80 px; the listed families use fonts available on the visitor’s device.

Use a short label that describes the action. In Fill, horizontal and vertical padding add space around it without changing the type size. Check longer labels in the page where the button will be used.

Choose a solid or gradient fill

Use one background color or blend two colors with a linear gradient. Color pickers and hex inputs let you work visually or precisely.

Set colors and gradient direction

Two colors, one clear direction

In Fill, change Fill style to Linear gradient to reveal Second color and Gradient angle. The angle runs from 0 to 360 degrees.

Hex fields accept a full six-digit color or a three-digit shorthand. Test the white or colored label against both ends of a gradient; the studio does not automatically certify text contrast.

Control the outline and depth

Adjust linked or independent corners, border width and style, box shadows, and text shadows. Give the button a shape that suits its context.

Explore corners, borders, and shadows

From a crisp rectangle to a soft pill

In Shape, keep Link all corners on for one shared radius, or turn it off to set each corner. Border styles include solid, dashed, dotted, double, inset, outset, ridge, groove, and none.

In Shadow, set horizontal and vertical offsets, blur, color, and opacity. Box shadow also has spread and an inset switch. Text shadow is separate, so you can add depth to the label without changing the button outline.

Design the interaction, too

Edit Default and Hover styles separately. Preview Default, Hover, and Active appearances, then compare the button on light and dark canvases.

Understand editing and preview states

Two editable styles, three preview states

Editing state chooses which style your controls change. The canvas state buttons only choose the preview. Hovering or pressing the preview also shows its interaction.

Hover values that still match the default follow base edits until customized. The exported CSS includes a hover rule when needed, a focus-visible outline, an active movement, and a reduced-motion rule.

Bring the CSS into your project

Copy the generated CSS and matching HTML button, or download a stylesheet. A class name keeps the two pieces connected.

Copy, download, and keep your work

Plain code you can use directly

Choose a distinctive Class name, copy CSS from its tab, then copy the button from HTML. Download saves a .css file named after the class; it does not download a complete webpage.

Preview and code generation run in your browser. The studio tries to remember one draft in this browser’s local storage; export anything you want to keep. Reset returns the studio to its starting style.

Text and styles in. HTML and CSS out.

No upload is needed. JavaScript powers the live editor in your browser. Copy the HTML and CSS separately, or download the CSS stylesheet. The generated font stack uses fonts available on the viewer’s device.

Language38

English العربية Français Italiano Deutsch Español Português Nederlands Русский Türkçe 日本語 中文 हिन्दी Bahasa Indonesia Bahasa Melayu 한국어 Tiếng Việt ไทย Polski Svenska Українська Norsk বাংলা Ελληνικά فارسی اردو Čeština Dansk Magyar Română Suomi Български Filipino ქართული Slovenčina Azərbaycanca עברית Slovenščina