Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
Send Message · Bastiennnn
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By Bastiennnn
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 Send Message · Bastiennnn
Send Message · Bastiennnn is an animated CSS button by Bastiennnn. Preview the interaction, customize its HTML, styles and JavaScript, or download the files with creator credit.
- Effects and categories
- Hover effects, Icon, 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
<button class="button">
<svg xmlns="http://www.w3.org/2000/svg" class="svg" height="25px" viewBox="0 0 24 24" fill="none">
<path d="M14.2199 21.63C13.0399 21.63 11.3699 20.8 10.0499 16.83L9.32988 14.67L7.16988 13.95C3.20988 12.63 2.37988 10.96 2.37988 9.78001C2.37988 8.61001 3.20988 6.93001 7.16988 5.60001L15.6599 2.77001C17.7799 2.06001 19.5499 2.27001 20.6399 3.35001C21.7299 4.43001 21.9399 6.21001 21.2299 8.33001L18.3999 16.82C17.0699 20.8 15.3999 21.63 14.2199 21.63ZM7.63988 7.03001C4.85988 7.96001 3.86988 9.06001 3.86988 9.78001C3.86988 10.5 4.85988 11.6 7.63988 12.52L10.1599 13.36C10.3799 13.43 10.5599 13.61 10.6299 13.83L11.4699 16.35C12.3899 19.13 13.4999 20.12 14.2199 20.12C14.9399 20.12 16.0399 19.13 16.9699 16.35L19.7999 7.86001C20.3099 6.32001 20.2199 5.06001 19.5699 4.41001C18.9199 3.76001 17.6599 3.68001 16.1299 4.19001L7.63988 7.03001Z" fill="#000000"></path>
<path d="M10.11 14.4C9.92005 14.4 9.73005 14.33 9.58005 14.18C9.29005 13.89 9.29005 13.41 9.58005 13.12L13.16 9.53C13.45 9.24 13.93 9.24 14.22 9.53C14.51 9.82 14.51 10.3 14.22 10.59L10.64 14.18C10.5 14.33 10.3 14.4 10.11 14.4Z" fill="#000000"></path>
</svg>
Send Message
</button>CSS
.button {
cursor: pointer;
width: 200px;
height: 60px;
background-color: white;
font-size: medium;
font-weight: bold;
box-shadow: 0 5px 10px rgb(122, 122, 122);
border-radius: 10px;
border: 2px solid gray;
transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.button:hover {
box-shadow: 0 5px 10px rgb(58, 58, 58);
transform: translateY(-10px);
}
.button:active {
transform: scale(0.95);
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}
.svg {
padding-right: 8px;
fill: none;
height: 25px;
transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.button:hover .svg {
animation: flyAround 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes flyAround {
0% {
transform: translate(0, 0) rotate(0deg) scale(1);
}
50% {
transform: translate(20px, -100px) rotate(-300deg) scale(1);
}
100% {
transform: translate(0, 0) rotate(0deg) scale(1);
}
}