Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
Reveal
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By @dipanjana25
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 Reveal
Reveal is an animated CSS button by @dipanjana25. 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>Reveal</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<button id="reveal"><a class="content">Reveal</a>
</button>
</div>
</body>
</html>CSS
body {
height: 100vh;
display: grid;
place-items: center;
background: #000000;
}
#reveal{
height:100px;
width:200px;
border: 1px solid black;
color: white;
cursor: pointer;
padding: 10px 10px;
background-color: black;
box-shadow: outset 0 0 0 0 #daf189;
border-radius: 15px;
font-size: 20px;
font-weight:400;
transition: ease-out 1s;
font-size: 40px;
color: #fff;
text-align: center;
animation: glow 0.5s ease-in-out infinite alternate;
}
#reveal:hover {
border: 1px solid rgb(3, 69, 3);
box-shadow: inset 200px 0 0 0 #f882c5;
/* color: white; */
text-shadow: 0.5px 0 black, -0.5px 0 black, 0 0.5px black,0 -0.5px black;
transition: ease-out 1s;
animation: dontglow 1s ease-in-out;
}
@keyframes glow {
from {
text-shadow: 0 0 10px #fff, 0 2px 10px #ff0080;
}
to {
text-shadow: 0 0 10px #fff, 0 2px 10px #f4d50d;
}
}
@keyframes dontglow {
from {
text-shadow: 0 0 10px #fff, 0 2px 10px #c50c68;
}
to {
text-shadow: 1px 0 black, -0.5px 0 black, 0 0.5px black,0 -0.5px black;
}
}
#reveal:hover:active {
transition: 1s;
transform: scale(1.5);
}