All styles
3D & Tactile

Floating Pill CSS Button

Free26 lines · no JS · WCAG AA large 4.2
Open in Studio
Theme

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

States
default
hover
focus-visible
active
disabled
not declared
.btn-floating-pill {
  display: inline-block;
  padding: 13px 30px;
  border: none;
  border-radius: 999px;
  background: #8b5cf6;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 24px -8px rgba(139, 92, 246, 0.7);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-floating-pill:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 32px -10px rgba(139, 92, 246, 0.8);
}
.btn-floating-pill:active {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px -6px rgba(139, 92, 246, 0.7);
}
.btn-floating-pill:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 3px;
}
Self-contained · MIT · no build step.btn-floating-pill
3D & TactilePill

Implementation notes

About the Floating Pill CSS button

Floating Pill uses visible depth and press feedback that makes interaction feel physical. Its pill silhouette makes the label easy to scan in compact layouts. Interaction feedback comes from a 250ms hover lift. The interaction stays intentionally restrained.

Usage

<button class="btn-floating-pill">Button</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
Pill
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
Modal83% match

Tactile Citrus Decision Modal

Tactile Citrus kit

3D & Tactile charactersolid surface
Unlock with Pro →
Free sample
Input83% match

Tactile Citrus Smart Input

Tactile Citrus kit

3D & Tactile charactersolid surface
Pro preview
Toggle83% match

Tactile Citrus Preference Toggle

Tactile Citrus kit

3D & Tactile charactersolid surface
Unlock with Pro →
Pro preview
Card83% match

Tactile Citrus Feature Card

Tactile Citrus kit

3D & Tactile charactersolid surface
Unlock with Pro →
Pro preview
Dropdown83% match

Tactile Citrus Action Menu

Tactile Citrus kit

3D & Tactile charactersolid surface
Unlock with Pro →
Pro preview
Form83% match

Tactile Citrus Signup Form

Tactile Citrus kit

3D & Tactile charactersolid surface
Unlock with Pro →
Get the complete Tactile Citrus kit
Six coordinated component types, commercial license and future kit updates.
Explore Pro · $39

More styles that match

Balloon Float

Pushable Azure

Bevel Classic

Cube Pop

Deep Press

Gel Lime

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