Back to buttons

Live preview

Preview settings

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

⌘ / Ctrl + S saves locally

To a Galaxy far far away · Mahalakshmiiii

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

By Mahalakshmiiii

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 To a Galaxy far far away · Mahalakshmiiii

To a Galaxy far far away · Mahalakshmiiii is an animated CSS button by Mahalakshmiiii. 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="space-button">
  To a Galaxy far far away 
  <span class="space-icon">
    <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 256 256"><path fill="white" d="M148 224a4 4 0 0 1-4 4h-32a4 4 0 0 1 0-8h32a4 4 0 0 1 4 4Zm71.1-67.3l-12.4 55.6a12 12 0 0 1-7.7 8.8a14.4 14.4 0 0 1-4 .6a12 12 0 0 1-7.5-2.6L158.6 196H97.4l-28.9 23.1a12 12 0 0 1-7.5 2.6a14.4 14.4 0 0 1-4-.6a12 12 0 0 1-7.7-8.8l-12.4-55.6a12.4 12.4 0 0 1 2.5-10.3l30.5-36.5a117.4 117.4 0 0 1 7.9-35.8c11.8-30.5 33.8-50.3 42.7-57.5a12 12 0 0 1 15 .1c10.9 8.8 30.9 28.1 42.2 57.4a119 119 0 0 1 7.8 35l31.1 37.3a12.4 12.4 0 0 1 2.5 10.3ZM98.3 188h59.4c50.4-91.6-8-149.5-27.2-165.1a3.9 3.9 0 0 0-5 0C106 38.5 46.8 96.3 98.3 188Zm-7.5 3c-13-23.5-20-46.4-21-68.5l-24.2 29a4.1 4.1 0 0 0-.8 3.5l12.3 55.6a4 4 0 0 0 2.6 2.9a4 4 0 0 0 3.8-.6Zm119.6-39.5l-24.7-29.6c-.8 22.3-7.7 45.4-20.6 69.1l27.4 21.9a4 4 0 0 0 3.8.6a4 4 0 0 0 2.6-2.9l12.3-55.6a4.1 4.1 0 0 0-.8-3.5ZM128 104a8 8 0 1 0-8-8a8 8 0 0 0 8 8Z"></path></svg>
    </span>
  </button>

CSS


.space-button {
  align-items: center;
  background-image: linear-gradient(to left bottom, #220ee9, #0021d3, #0029bb, #002ca3, #002d8a, #003e92, #004e98, #005d9b, #0084bc, #00acd5, #00d4e6, #5ffbf1);
  border-radius: 0 25px 0 25px;
  border: 0;
  color: #f1f1f1;
  display: flex;
  font-size: 16px;
  padding: 10px 20px;
}

.space-icon {
  margin-left: 10px;
}

.space-button:hover .space-icon {
  animation: move_4001 0.6s infinite alternate;
}

@keyframes move_4001 {
  0% {
    transform: translateY(2px);
  }

  100% {
    transform: translateY(-2px);
  }
}