Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
Shoh2008's hover button
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By Shoh2008
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 Shoh2008's hover button
Shoh2008's hover button is an animated CSS button by Shoh2008. 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>
Button
</button>CSS
button {
--b: 3px;
/* border thickness */
--s: .45em;
/* size of the corner */
--color: #e2e2e2;
font-weight: bold;
padding: calc(.5em + var(--s)) calc(.9em + var(--s));
color: var(--color);
--_p: var(--s);
background: conic-gradient(from 90deg at var(--b) var(--b),#0000 90deg,var(--color) 0)
var(--_p) var(--_p)/calc(100% - var(--b) - 2*var(--_p)) calc(100% - var(--b) - 2*var(--_p));
transition: .3s linear, color 0s, background-color 0s;
outline: var(--b) solid #0000;
outline-offset: .6em;
font-size: 16px;
border: 0;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
}
button:hover,
button:focus-visible {
--_p: 0px;
outline-color: #ffffff;
outline-offset: .05em;
}
button:active {
background: #ffffff;
color: #000000;
}