Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
TimTrayler's hover button
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By TimTrayler
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 TimTrayler's hover button
TimTrayler's hover button is an animated CSS button by TimTrayler. 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> Click me
</button>CSS
button {
--hover-shadows: 16px 16px 33px #121212,
-16px -16px 33px #303030;
--accent: fuchsia;
font-weight: bold;
letter-spacing: 0.1em;
border: none;
border-radius: 1.1em;
background-color: #212121;
color: white;
padding: 1em 2em;
transition: box-shadow ease-in-out 0.3s,
background-color ease-in-out 0.1s,
letter-spacing ease-in-out 0.1s,
transform ease-in-out 0.1s;
box-shadow: 13px 13px 10px #1c1c1c,
-13px -13px 10px #262626;
}
button:hover {
box-shadow: var(--hover-shadows);
}
button:active {
box-shadow: var(--hover-shadows),
var(--accent) 0px 0px 30px 5px;
background-color: var(--accent);
transform: scale(0.95);
}