Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
Randdose's hover button
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By Randdose
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 Randdose's hover button
Randdose's hover button is an animated CSS button by Randdose. Preview the interaction, customize its HTML, styles and JavaScript, or download the files with creator credit.
- Effects and categories
- Hover effects
- 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">
<p>Button</p>
</button>CSS
.button {
all: unset;
display: flex;
align-items: center;
position: relative;
padding: 0.6em 2em;
border: mediumspringgreen solid 0.15em;
border-radius: 0.25em;
color: mediumspringgreen;
font-size: 1.5em;
font-weight: 600;
cursor: pointer;
overflow: hidden;
transition: border 300ms, color 300ms;
user-select: none;
}
.button p {
z-index: 1;
}
.button:hover {
color: #212121;
}
.button:active {
border-color: teal;
}
.button::after, .button::before {
content: "";
position: absolute;
width: 9em;
aspect-ratio: 1;
background: mediumspringgreen;
opacity: 50%;
border-radius: 50%;
transition: transform 500ms, background 300ms;
}
.button::before {
left: 0;
transform: translateX(-8em);
}
.button::after {
right: 0;
transform: translateX(8em);
}
.button:hover:before {
transform: translateX(-1em);
}
.button:hover:after {
transform: translateX(1em);
}
.button:active:before,
.button:active:after {
background: teal;
}