Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
new button
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By @PVBharadwaj
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 new button
new button is an animated CSS button by @PVBharadwaj. 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">
<title>new button</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div >
<Button class="btn"><span></span>Click me</span></Button>
</div>
</body>
</html>
CSS
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
min-height: 100vh;
justify-content: center;
align-items: center;
background-color: #1d1253;
}
.btn{
font-size: 25px;
padding: 7px 14px;
background-color: rgb(121, 225, 239);
color: #18086c;
border-radius: 50px;
border-color: #18086c;
transition: 1s;
animation: bounce 0.5s cubic-bezier(0.8,0,1,1) infinite alternate;
}
@keyframes bounce {
100%{
margin-top: 20px;
}
}
.btn:hover{
font-size: 30px;
background-color: #18086c;
color: rgb(121, 225, 239);
border-color: rgb(121, 225, 239);
border-radius: 0%;
animation: glowing 1s infinite alternate;
font-family: Georgia, 'Times New Roman', Times, serif;
}
@keyframes glowing {
50%{
margin-top: 20px;
}
0% {
background-color: #18086c;
box-shadow: 0 0 3px #18086c;
}
50% {
background-color: #2b09d6;
box-shadow: 0 0 10px #2b09d6;
}
100% {
background-color: #18086c;
box-shadow: 0 0 3px #18086c;
}
}