Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
Generate · Spacious74
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By Spacious74
Button submission checks
Checks will appear after the preview updates.
Buttons only: no full pages, forms, cards or navigation. Put scripts in the JavaScript tab. Tailwind uses utilities from HTML and JavaScript; use complete class names. Custom CSS supports plain CSS, without @apply, imports or plugins.
Accessibility quick check
Waiting for the rendered preview…
Try Tab, Enter and Space in the preview. Check the focus ring, hover and disabled states, then enable Reduce motion. These checks are guidance, not an accessibility certification.
Explore freely here. Remix to publish your version with credit to the creator.
About Generate · Spacious74
Generate · Spacious74 is an animated CSS button by Spacious74. Preview the interaction, customize its HTML, styles and JavaScript, or download the files with creator credit.
- Effects and categories
- Icon
- Using this example
- Copy the HTML or download index.html, style.css and app.js. Test keyboard focus, motion and contrast in your own project.
Usage, Tailwind and licensing questions
Read the source files
HTML
<button class="button">
<div class="inner">
<div class="svgs">
<svg viewBox="0 0 256 256" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" class="svg-l">
<path d="M240 128a15.79 15.79 0 0 1-10.5 15l-63.44 23.07L143 229.5a16 16 0 0 1-30 0l-23.06-63.44L26.5 143a16 16 0 0 1 0-30l63.44-23.06L113 26.5a16 16 0 0 1 30 0l23.07 63.44L229.5 113a15.79 15.79 0 0 1 10.5 15" fill="currentColor"></path>
</svg>
<svg viewBox="0 0 256 256" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" class="svg-s">
<path d="M240 128a15.79 15.79 0 0 1-10.5 15l-63.44 23.07L143 229.5a16 16 0 0 1-30 0l-23.06-63.44L26.5 143a16 16 0 0 1 0-30l63.44-23.06L113 26.5a16 16 0 0 1 30 0l23.07 63.44L229.5 113a15.79 15.79 0 0 1 10.5 15" fill="currentColor"></path>
</svg>
</div>
Generate
</div>
</button>CSS
.button {
cursor: pointer;
border: solid 4px #161616;
border-top: none;
border-radius: 20px;
position: relative;
box-shadow: 0px 4px 10px #00000062, 0px 10px 40px -10px #000000a6,
0px 12px 45px -15px #00000071;
transition: all 0.3s ease;
}
.inner {
padding: 12px 30px;
font-size: 1.5rem;
display: flex;
align-items: center;
gap: 12px;
font-weight: 600;
letter-spacing: 1px;
border-bottom: solid 3px #374e72;
border-radius: 16px;
background: linear-gradient(180deg, #5771a5, #000);
color: #fff;
text-shadow: 1px 1px #000, 0 0 9px #fff;
}
.svgs {
position: relative;
margin-top: 9px;
z-index: 10;
}
.svgs > * {
filter: drop-shadow(0 0 6px #fff) drop-shadow(1px 1px 0px #000);
}
.svgs .svg-s {
position: absolute;
font-size: 0.8rem;
left: 20px;
top: -4px;
}
.button:active {
box-shadow: none;
}