Back to buttons

Live preview

Preview settings

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

⌘ / Ctrl + S saves locally

command · vikas7754

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

By vikas7754

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 command · vikas7754

command · vikas7754 is an animated CSS button by vikas7754. Preview the interaction, customize its HTML, styles and JavaScript, or download the files with creator credit.

Effects and categories
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

<div class="container">
  <button class="btn cmd">
    <svg fill="#fff" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20px" height="20px" viewBox="0 0 80 80" xml:space="preserve">
      <g>
        <path d="M64,48L64,48h-8V32h8c8.836,0,16-7.164,16-16S72.836,0,64,0c-8.837,0-16,7.164-16,16v8H32v-8c0-8.836-7.164-16-16-16
		S0,7.164,0,16s7.164,16,16,16h8v16h-8l0,0l0,0C7.164,48,0,55.164,0,64s7.164,16,16,16c8.837,0,16-7.164,16-16l0,0v-8h16v7.98
		c0,0.008-0.001,0.014-0.001,0.02c0,8.836,7.164,16,16,16s16-7.164,16-16S72.836,48.002,64,48z M64,8c4.418,0,8,3.582,8,8
		s-3.582,8-8,8h-8v-8C56,11.582,59.582,8,64,8z M8,16c0-4.418,3.582-8,8-8s8,3.582,8,8v8h-8C11.582,24,8,20.417,8,16z M16,72
		c-4.418,0-8-3.582-8-8s3.582-8,8-8l0,0h8v8C24,68.418,20.418,72,16,72z M32,48V32h16v16H32z M64,72c-4.418,0-8-3.582-8-8l0,0v-8
		h7.999c4.418,0,8,3.582,8,8S68.418,72,64,72z"></path>
      </g>
    </svg>
    command
  </button>
  <a href="https://freecodez.com/post/7jypdpp" class="btn c">C</a>
</div>

CSS


.container {
  background: #ff6f6f;
  border-radius: 15px;
  padding: 15px;
  display: flex;
  gap: 15px;
  box-shadow: 3px 5px 10px #ff7a7a, inset 3px 0 0 #ff5751d6,
    inset -3px 0 0 #ff5751d6, inset 0 3px 0 #ffffff23, inset 0 -3px 0 #00000023;
}
.btn {
  text-decoration: none;
  border: none;
  outline: none;
  background: #ff6f6f;
  padding: 10px;
  box-shadow: 0 0 5px #0000005a, 2px 2px 3px #00000078,
    inset 1px 1px 2px #ffffff9d;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn:focus {
  animation: 0.3s clicked linear;
}
.cmd {
  display: flex;
  gap: 10px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
}
.c {
  width: 75px;
  font-size: 1.5rem;
}
@keyframes clicked {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
    box-shadow: 0 0 5px #00000067, inset 0 0 3px #ffffff78;
  }
  100% {
    transform: scale(1);
  }
}