Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
Bhushan's button
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By @Bhushan
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 Bhushan's button
Bhushan's button is an animated CSS button by @Bhushan. 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<button>
<span> Button </span>
</button>
</body>
</html>
CSS
body{
display:flex;
width : 100vw;
height : 100vh;
justify-content : center;
align-items : center;
overflow : hidden;
}
button {
display: inline-block;
width: 150px;
height: 50px;
border-radius: 10px;
border: 1px solid #03045e;
position: relative;
overflow: hidden;
transition: all 0.5s ease-in;
z-index: 1;
}
button::before,
button::after {
content: '';
position: absolute;
top: 0;
width: 0;
height: 100%;
transform: skew(15deg);
transition: all 0.5s;
overflow: hidden;
z-index: -1;
}
button::before {
left: -10px;
background: #240046;
}
button::after {
right: -10px;
background: #5a189a;
}
button:hover::before,
button:hover::after {
width: 58%;
}
button:hover span {
color: #e0aaff;
transition: 0.3s;
}
button span {
color: #03045e;
font-size: 18px;
transition: all 0.3s ease-in;
}