Back to buttons

Live preview

Preview settings

Changes appear as you type. Use Tab to test keyboard focus.

⌘ / Ctrl + S saves locally

Buttons

HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.

By @SaurabhBarde-007

Remix button

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 Buttons

Buttons is an animated CSS button by @SaurabhBarde-007. 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>Buttons</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <div class="checkbox"></div>
    <div class="container">
      <div class="buttons">
        <a class="btn btn1">Click Me<span></span></a>
      </div>
    </div>
  </body>
</html>

CSS


*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html,body{
    height: 100%;
}

body{
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    font-weight: 400;
}

.container{
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.buttons{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.btn{
    text-decoration: none;
    padding: 20px 50px;
    font-size: 1.25em;
    position: relative;
    margin: 32px;
}

/* button 1 */

.btn1{
    background-color: rgb(0, 21, 41);
    color: white;
    border-radius: 30px;
    transition: transform 1.3s ease;
}

.btn1::after, .btn1::before{
    content: "";
    position: absolute;
    opacity: 0.3;
    background-color: rgb(0, 21, 41);
    border-radius: inherit;
    width: 100%;
    height: 100%;
    left: 0;
    bottom: 0;
    z-index: -1;
    transition: transform 0.3s ease;
}

.btn1:hover{
    transform: translate(-12px,-12px);
}

.btn1:hover::after{
    transform: translate(6px, 6px);
}

.btn1:hover::before{
    transform: translate(12px, 12px);
}