Back to buttons

Live preview

Preview settings

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

⌘ / Ctrl + S saves locally

Neon Glass Button

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

By @sabhisharma-ise

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 Neon Glass Button

Neon Glass Button is an animated CSS button by @sabhisharma-ise. 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">
  <title>Neon Glass Button</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
  <link rel="stylesheet" href="./style.css">

</head>

<body>
  <div class="bg-video">
    <iframe frameborder="0"
      src="//player.vimeo.com/video/538565375?autoplay=1&amp;loop=1&amp;playsinline=1&amp;autopause=0&amp;muted=true&amp;byline=false&amp;dnt=true?fun=false&amp;title=false&amp;controls=0"
      allow="autoplay"></iframe>
  </div><a class="button">Pull Focus</a>

</body>

</html>

CSS


@import url("https://fonts.googleapis.com/css2?family=Miriam+Libre:wght@700&display=swap&text=Pull%Focus");
.bg-video {
  content: "";
  position: absolute;
  width: 100%;
  height: auto;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bg-video:before {
  content: "";
  width: 100%;
  padding-bottom: 56.25%;
  display: block;
  height: 0;
}
.bg-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1000%;
  height: 135%;
  transform: translate3d(-50%, -50%, 0);
}

body {
  display: flex;
  height: 100vh;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  font-size: 2em;
  font-family: "Miriam Libre", sans-serif;
  background: #02020e;
}
body .bg-video {
  content: "";
  position: absolute;
  width: 100%;
  height: auto;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
body .bg-video:before {
  content: "";
  width: 100%;
  padding-bottom: 56.25%;
  display: block;
  height: 0;
}
body .bg-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1000%;
  height: 135%;
  transform: translate3d(-50%, -50%, 0);
}

.button {
  position: relative;
  overflow: hidden;
  z-index: 1;
  cursor: pointer;
  min-width: 15ch;
  padding: 1em;
  background: url("http://api.thumbr.io/whitenoise-354x370.png?background=ffffff00&noise=ffffff&density=40&opacity=4"), rgba(255, 255, 255, 0.01);
  transition: 0.5s ease-in-out;
  transition-property: background, text-shadow;
  -webkit-backdrop-filter: blur(0.333em);
          backdrop-filter: blur(0.333em);
  border-radius: 1em;
  font-family: inherit;
  text-align: center;
  letter-spacing: 0.05em;
  color: white;
  text-shadow: 0 0.01em 0.2em rgba(227, 222, 255, 0.333), 0 0.01em 0.5em rgba(227, 222, 255, 0.25);
  box-shadow: inset 0 0.01em 0.4em rgba(227, 222, 255, 0.2), inset 0 0.04em 0.18em rgba(154, 146, 210, 0.3), inset 0 0.98em 1em rgba(202, 172, 255, 0.3), inset 0 -0.82em 0.68em -0.64em rgba(96, 68, 144, 0.3), inset 0 0.07em 0.11em -0.04em white, inset 0 0.39em 0.56em -0.36em rgba(255, 255, 255, 0.5);
}
.button:hover, .button:focus {
  background: rgba(39, 0, 255, 0.25);
  text-shadow: 0 0.01em 0.2em #b1a3ff, 0 0.01em 1em #b1a3ff;
}
.button:hover:before, .button:focus:before {
  transform: translate3d(100%, 0, 0) scale3d(1, 1, 1);
}