Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
love-sonkar's button
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By @love-sonkar
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 love-sonkar's button
love-sonkar's button is an animated CSS button by @love-sonkar. Preview the interaction, customize its HTML, styles and JavaScript, or download the files with creator credit.
- Effects and categories
- Hover effects, Animated
- 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" />
<link rel="stylesheet" href="./style.css" />
<title>Document</title>
</head>
<body>
<!-- Add Your button code here -->
<button class="btn">Click Me</button>
<script src="./app.js"></script>
</body>
</html>
CSS
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
:root {
--mainColor: rgb(173, 255, 47);
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100dvh;
background-color: #ffffff;
}
.btn {
cursor: pointer;
padding: 15px 50px;
color: rgb(255, 255, 255);
font-size: 1.8rem;
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
background: var(--mainColor);
transition: 0.5s ease-in;
border: none;
}
.btn:hover{
box-shadow: 0 0 30px var(--mainColor);
background: var(--mainColor);
border: 1px solid var(--mainColor);
animation: borderanim 1s ease-in infinite;
}
@keyframes borderanim {
0%,
100% {
border-radius: 20px 0 20px 0;
}
50% {
border-radius: 50px;
}
}JavaScript
// Add Your button script here