Skip to main content
Urbicon UI
source

Button

Versatile, accessible buttons with variants, loading states, and micro-interactions.

Loading...
Loading syntax highlighting...

01 Examples

States Matrix

Same visual state, different semantics: active = persistent selection (e.g., a radio-style segment), pressed = transient toggle (e.g., bold/italic in a toolbar), loading = busy. ARIA mirrors the chosen prop — active → aria-pressed=true; pressed → aria-pressed=true; both off → omitted.
Loading...
Loading syntax highlighting...

02 Mint Micro-Interactions

Mint (Micro-interactions) adds subtle motion feedback to any component. Each effect is triggered on hover or click and automatically respects prefers-reduced-motion.

Hover Effects

Triggered when the user hovers over the button.
Loading...
Loading syntax highlighting...

Click Effects

Triggered on click/tap interaction.
Loading...
Loading syntax highlighting...

Combined Effects

Pass an array to layer multiple effects on the same element.
Loading...
Loading syntax highlighting...

Configured Effects

Fine-tune individual effects with config objects.
Loading...
Loading syntax highlighting...

03 Customization

Gradient CTA

A single slotClasses override turns a standard button into a vibrant call-to-action.
Loading...
Loading syntax highlighting...

Pill & Icon-only

Override the base slot's border-radius with slotClasses – tailwind-merge resolves the conflict automatically.
Loading...
Loading syntax highlighting...

Neon Outline

For custom glow shadows, unstyled gives full control – no conflicts with the variant's built-in shadow tokens.
Loading...
Loading syntax highlighting...

Fully Custom (unstyled)

Drop all default styles and build from scratch. Loading, disabled, mint – all behavioral props still work.
Loading...
Loading syntax highlighting...

04 Accessibility

Built-in ARIA

Automatically manages aria-pressed for toggle buttons, aria-busy during loading, and aria-disabled when disabled. Focus indication uses focus-visible: so mouse users see no ring.

State Semantics

active = persistent selection (a radio-style segment, the current sort column, the selected tool). Set this when the button represents an enduring chosen state. pressed = transient toggle (bold/italic in a toolbar, mute/unmute). Set this on a button that flips between two complementary states. loading = busy; suppresses interaction without removing focus.

Keyboard

Tab to focus, Enter / Space to activate. Loading state disables interaction automatically while keeping the button focusable.

Reduced Motion

All Mint effects are suppressed when the user enables prefers-reduced-motion. Transitions, transforms, and ripple animations are removed entirely.

05 API Reference

20 props
20 props

No matching properties

No matching properties

06 Installation

Import

Loading...
Loading syntax highlighting...