Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
delete · boryanakrasteva
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By boryanakrasteva
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 delete · boryanakrasteva
delete · boryanakrasteva is an animated CSS button by boryanakrasteva. Preview the interaction, customize its HTML, styles and JavaScript, or download the files with creator credit.
- Effects and categories
- Hover effects, Icon
- 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="btn">
<p class="paragraph"> delete </p>
<span class="icon-wrapper">
<svg class="icon" width="30px" height="30px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6 7V18C6 19.1046 6.89543 20 8 20H16C17.1046 20 18 19.1046 18 18V7M6 7H5M6 7H8M18 7H19M18 7H16M10 11V16M14 11V16M8 7V5C8 3.89543 8.89543 3 10 3H14C15.1046 3 16 3.89543 16 5V7M8 7H16" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
</span>
</button>CSS
.btn {
cursor: pointer;
width: 50px;
height: 50px;
border: none;
position: relative;
border-radius: 10px;
-webkit-box-shadow: 1px 1px 5px .2px #00000035;
box-shadow: 1px 1px 5px .2px #00000035;
-webkit-transition: .2s linear;
transition: .2s linear;
transition-delay: .2s;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: space-between;
}
.btn:hover {
width: 150px;
transition-delay: .2s;
}
.btn:hover > .paragraph {
visibility: visible;
opacity: 1;
-webkit-transition-delay: .4s;
transition-delay: .4s;
}
.btn:hover > .icon-wrapper .icon {
transform: scale(1.1);
}
.bnt:hover > .icon-wrapper .icon path {
stroke: black;
}
.paragraph {
color: black;
visibility: hidden;
opacity: 0;
font-size: 18px;
margin-right: 20px;
padding-left: 20px;
-webkit-transition: .2s linear;
transition: .2s linear;
font-weight: bold;
text-transform: uppercase;
}
.icon-wrapper {
width: 50px;
height: 50px;
position: absolute;
top: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
}
.icon {
transform: scale(.9);
transition: .2s linear;
}
.icon path {
stroke: #000;
stroke-width: 2px;
-webkit-transition: .2s linear;
transition: .2s linear;
}