All styles
Dark UI

Spinner State CSS Button

Free51 lines · no JS · WCAG AAA 12.6
Open in Studio
Theme

A real <button> carrying .btn-spinner-state — the preview is the stylesheet, not a picture of it.

States
default
hover
focus-visible
active
disabled
not declared
.btn-spinner-state {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border: 1px solid #2a3140;
  border-radius: 10px;
  background: #161b26;
  color: #d7dde8;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.btn-spinner-state::before {
  content: "";
  box-sizing: border-box;
  flex: none;
  width: 0;
  height: 0;
  margin-right: 0;
  border: 0 solid rgba(56, 189, 248, 0.25);
  border-top-color: #38bdf8;
  border-radius: 50%;
  opacity: 0;
  transition: width 0.25s ease, height 0.25s ease, margin-right 0.25s ease, border-width 0.25s ease, opacity 0.2s ease;
}
.btn-spinner-state:hover {
  background: #1b2231;
  border-color: #38445a;
}
.btn-spinner-state:hover::before {
  width: 13px;
  height: 13px;
  margin-right: 9px;
  border-width: 2px;
  opacity: 1;
  animation: btn-spinner-state-spin 0.7s linear infinite;
}
.btn-spinner-state:active {
  background: #121722;
}
@keyframes btn-spinner-state-spin {
  to {
    transform: rotate(360deg);
  }
}
.btn-spinner-state:focus-visible {
  outline: 2px solid #2a3140;
  outline-offset: 3px;
}
Self-contained · MIT · no build step.btn-spinner-state
Dark UIRoundedLoadingIcon FX

Implementation notes

About the Spinner State CSS button

Spinner State uses controlled contrast and elevation tuned for dark product surfaces. Its rounded corners balance product-friendly softness with a clear boundary. Motion comes from a 700ms keyframe animation. The loading, icon fx details are included in the copy-paste CSS.

Usage

<button class="btn-spinner-state">Saving</button>

Pair it with the CSS tab above — the class is self-contained.

Before shipping: keep the semantic button element, verify contrast on your actual background and add a visible:focus-visible state. If you retain motion, include a prefers-reduced-motion override.
Built with
HTML + plain CSS
Shape
Rounded
Exports
CSS, Tailwind, React
License
MIT · commercial use
Complete the look

Build the interface around this button

We matched its palette, surface, geometry and motion to a complete UI system — like composing an outfit, not browsing unrelated parts.

Style DNA · v1
How matching works →
Pro preview
Modal93% match

Midnight System Decision Modal

Midnight System kit

Dark UI characterblue palette
Unlock with Pro →
Free sample
Input93% match

Midnight System Smart Input

Midnight System kit

Dark UI characterblue palette
Pro preview
Toggle93% match

Midnight System Preference Toggle

Midnight System kit

Dark UI characterblue palette
Unlock with Pro →
Pro preview
Card93% match

Midnight System Feature Card

Midnight System kit

Dark UI characterblue palette
Unlock with Pro →
Pro preview
Dropdown93% match

Midnight System Action Menu

Midnight System kit

Dark UI characterblue palette
Unlock with Pro →
Pro preview
Form93% match

Midnight System Signup Form

Midnight System kit

Dark UI characterblue palette
Unlock with Pro →
Get the complete Midnight System kit
Six coordinated component types, commercial license and future kit updates.
Explore Pro · $39

More styles that match

Carbon Weave

Dark Elevated

Dark Ghost Line

Smoke Glass

Blink Cursor

Dark Success Soft

Two optional extras load only if you allow them. Every button, preview and line of code works exactly the same either way. What each one does