Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
ahmedrizk101's minimal button
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By ahmedrizk101
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 ahmedrizk101's minimal button
ahmedrizk101's minimal button is an animated CSS button by ahmedrizk101. Preview the interaction, customize its HTML, styles and JavaScript, or download the files with creator credit.
- Effects and categories
- Minimal
- 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
<button class="button">
click me
</button>CSS
.button {
width: 200px;
height: 40px;
background: yellow;
box-shadow: -6px 6px 0 0 hsl(60, 100%, 40%);
border: none;
outline: none;
position: relative;
font-size: 1.2rem;
text-transform: uppercase;
font-weight: bold;
}
.button:active {
box-shadow: -3px 3px 0 0 hsl(60, 100%, 40%);
top: 3px;
left: -3px;
background-color: hsl(60, 100%, 45%);
}
.button::before {
content: '';
position: absolute;
background: none;
width: 0;
height: 0;
border: 6px solid transparent;
border-right: 6px solid hsl(60, 100%, 40%);
border-left-width: 0;
top: 0;
left: -6px;
}
.button:active::before {
border: 3px solid transparent;
border-right: 3px solid hsl(60, 100%, 40%);
}
.button::after {
content: '';
position: absolute;
background: none;
width: 0;
height: 0;
border: 6px solid transparent;
border-top: 6px solid hsl(60, 100%, 40%);
border-bottom-width: 0;
bottom: -6px;
right: 0;
}
.button:active:after {
border: 3px solid transparent;
border-top: 3px solid hsl(60, 100%, 40%);
}