Design custom CSS buttons with text, background (solid/gradient), border, shadow, and hover effects controls. 12 presets including 3D, Neon, Ghost, and Pill styles
Design fully styled CSS buttons without writing code by hand. Adjust colors, padding, borders, shadows, hover states, and typography, then grab the generated CSS and HTML.
Initializing in your browser…
Design complex box shadows with multi-layer support, inset shadows, visibility toggle, layer reordering, opacity control, and 12 professional presets
Create custom CSS keyframe animations visually. Add keyframes, adjust timing, and preview animations in real-time.
Create stunning CSS gradients with linear/radial/conic types, angle control, position control, multiple color stops, 11 presets, and reverse/randomize features
You need a primary call-to-action button with a hover state that matches the brand, dropped into a plain HTML page in seconds.
Button settings
Label "Get started" · BG #2563EB · Text #FFF · Radius 8px · Padding 12/24 · Hover darken 8%
Ready CSS
.btn {
background: #2563eb;
color: #fff;
padding: 12px 24px;
border: 0;
border-radius: 8px;
font: 600 16px/1 system-ui, sans-serif;
cursor: pointer;
transition: background .15s ease;
}
.btn:hover { background: #1e54c9; }The generator emits the full rule set including the `:hover` transition (the part hand-rolled buttons usually forget), and computes the hover colour by darkening the base by the chosen percentage instead of you guessing a second hex value. Paste it next to a `<button class="btn">` and it works with no framework.
Design fully styled CSS buttons without writing code by hand. Adjust colors, padding, borders, shadows, hover states, and typography, then grab the generated CSS and HTML.
The CSS Button Generator is a live visual editor that builds a complete <code>.button</code> rule plus a matching <code>.button:hover</code> rule from roughly twenty-five style parameters, organized into five tabs: Text, Background, Border, Shadow, and Hover. The Text tab controls font size (10-32px), font weight stepped in increments of 100 from 100 to 900, text color, letter spacing (-2 to 10px), and a text-transform toggle (none / uppercase / lowercase / capitalize). The Background tab switches between a solid color and a CSS linear-gradient with start color, end color, and an angle slider from 0 to 360 degrees (default 135deg), and also houses the horizontal and vertical padding sliders (paddingX 4-60px, paddingY 2-40px). The Border tab exposes width (0-10px), a none/solid/dashed/dotted style toggle, color, and a border-radius slider running all the way to 100px so you can reach fully rounded pill shapes.
The Shadow tab generates a single box-shadow whose opacity is applied by converting the chosen hex color to rgba through an internal hexToRgba helper, so a shadow color of #000000 at 20% opacity emits rgba(0, 0, 0, 0.2) rather than a flat hex value; you control offset X and Y (-20 to 20px), blur (0-50px), and spread (-20 to 20px). The Hover tab is where this tool goes beyond a static style picker: it captures a distinct hover background, hover text color, a scale transform driven by a slider from 0.95x to 1.20x, a separate hover shadow Y offset, and a transition duration from 0 to 500ms in 25ms steps. Those hover values are written into the generated <code>.button:hover</code> block as background, color, border-color, transform: scale(...), and a recomputed box-shadow, and the whole rule carries transition: all Nms ease so the state change animates. One honest limitation to know: when background type is set to gradient, the generated hover rule re-emits the same gradient, so a gradient button does not get a separate hover background from the CSS output.
The tool ships twelve named presets that overwrite the working style: Primary, Secondary, Success, Danger, and Warning map to Tailwind-style brand colors with matching darker hover shades; Outline and Ghost use a transparent background (Ghost hovers to a translucent rgba(59, 130, 246, 0.1)); Pill forces a 9999px radius; Gradient applies a pink-to-violet linear gradient; 3D uses a hard zero-blur offset shadow in a darker blue to fake depth; Neon pairs a transparent fill with a colored border and a 20px colored glow; and Minimal strips the shadow for a flat text-style button. Every control is mirrored into the URL via useUrlStates, so the full configuration is encoded in query parameters and the Share button produces a link that reopens the exact button; the Generated CSS panel copies the rule to the clipboard with a two-second confirmation. The output is plain hand-written CSS targeting a <code>.button</code> class with no vendor prefixes, no focus-visible or :active states, and no accessibility scaffolding, so you should add your own keyboard-focus styling and verify text-on-button contrast before shipping.
Apply the Neon preset to get a transparent fill with a 2px colored border and a 20px-blur colored glow shadow, then open the Hover tab to add a scale of 1.02x and shorten the transition to make the glow respond on hover.
Start from the Primary preset, tweak padding and border-radius, then click Share; the entire style is encoded in the URL query string through useUrlStates so a teammate opening the link sees the identical button and can copy its .button / .button:hover CSS.
Quickly generate styled buttons for mockups and prototypes without writing CSS from scratch.
Experiment with button styles before codifying them in a component library.
Create inline-styled buttons compatible with email HTML rendering.
The generated CSS uses standard properties, but email clients have limited CSS support. Test in your target clients and consider the VML/CSS hybrid approach for Outlook.
Yes. Add a CSS transition property to the generated code to smoothly animate between the default and hover states.
This runs as client-side JavaScript. Keys, tokens, payloads, and other inputs never leave your device.