Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
JaydipPrajapati1910's hover button
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By JaydipPrajapati1910
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 JaydipPrajapati1910's hover button
JaydipPrajapati1910's hover button is an animated CSS button by JaydipPrajapati1910. Preview the interaction, customize its HTML, styles and JavaScript, or download the files with creator credit.
- Effects and categories
- Hover effects, 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
<div class="container">
<div class="center">
<button class="btn">
<svg class="border" viewBox="0 0 180 60" height="60px" width="180px">
<polyline class="bg-line" points="179,1 179,59 1,59 1,1 179,1"></polyline>
<polyline class="hl-line" points="179,1 179,59 1,59 1,1 179,1"></polyline>
</svg>
<span>HOVER ME</span>
</button>
</div>
</div>CSS
.container {
width: 400px;
height: 400px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
display: flex;
justify-content: center;
align-items: center;
}
.center {
width: 180px;
height: 60px;
position: absolute;
}
.btn {
width: 180px;
height: 60px;
cursor: pointer;
background: transparent;
border: 2px solid #222;
outline: none;
transition: 1s ease-in-out;
}
.btn svg {
position: absolute;
left: 0;
top: 0;
fill: none;
stroke: #91C9FF;
stroke-dasharray: 150 480;
stroke-dashoffset: 150;
transition: 1s ease-in-out;
}
.btn:hover {
transition: 1s ease-in-out;
background: #4F95DA;
}
.btn:hover span {
transition: 1s ease-in-out;
color: #fff;
}
.btn:hover svg {
stroke-dashoffset: -480;
}
.btn span {
color: black;
font-size: 18px;
font-weight: 600;
}