Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
mrhyddenn's animated button
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By mrhyddenn
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 mrhyddenn's animated button
mrhyddenn's animated button is an animated CSS button by mrhyddenn. Preview the interaction, customize its HTML, styles and JavaScript, or download the files with creator credit.
- Effects and categories
- Animated
- 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
<div class="scrolldown" style="--color: skyblue">
<div class="chevrons">
<div class="chevrondown"></div>
<div class="chevrondown"></div>
</div>
</div>CSS
.scrolldown {
--color: white;
--sizeX: 30px;
--sizeY: 50px;
position: relative;
width: var(--sizeX);
height: var(--sizeY);
margin-left: var(sizeX / 2);
border: calc(var(--sizeX) / 10) solid var(--color);
border-radius: 50px;
box-sizing: border-box;
margin-bottom: 16px;
cursor: pointer;
}
.scrolldown::before {
content: "";
position: absolute;
bottom: 30px;
left: 50%;
width: 6px;
height: 6px;
margin-left: -3px;
background-color: var(--color);
border-radius: 100%;
animation: scrolldown-anim 2s infinite;
box-sizing: border-box;
box-shadow: 0px -5px 3px 1px #2a547066;
}
@keyframes scrolldown-anim {
0% {
opacity: 0;
height: 6px;
}
40% {
opacity: 1;
height: 10px;
}
80% {
transform: translate(0, 20px);
height: 10px;
opacity: 0;
}
100% {
height: 3px;
opacity: 0;
}
}
.chevrons {
padding: 6px 0 0 0;
margin-left: -3px;
margin-top: 48px;
width: 30px;
display: flex;
flex-direction: column;
align-items: center;
}
.chevrondown {
margin-top: -6px;
position: relative;
border: solid var(--color);
border-width: 0 3px 3px 0;
display: inline-block;
width: 10px;
height: 10px;
transform: rotate(45deg);
}
.chevrondown:nth-child(odd) {
animation: pulse54012 500ms ease infinite alternate;
}
.chevrondown:nth-child(even) {
animation: pulse54012 500ms ease infinite alternate 250ms;
}
@keyframes pulse54012 {
from {
opacity: 0;
}
to {
opacity: 0.5;
}
}