Button

Triggers an action or event when activated.

Overview

The Button component provides a versatile and customizable button system with multiple variants, appearances, sizes, and shapes. It supports polymorphic rendering with the render prop (Base UI pattern), as well as special features like pending states and URL state management.

Use Button.Wrapper to visually attach adjacent buttons for split-button layouts while keeping each inner action as a real Button.

Usage

import { Button } from "@tilt-legal/cubitt-components/primitives";
<Button>Click me</Button>

Examples

Secondary

Frost

Destructive

Outline

Ghost

With Icon

Icon Only

Pending

Shows a loading spinner while an action is in progress.

With Badge

Combine buttons with badges for notifications and counters.

Sizes

Style buttons as links using variant="link".

Split Button

Use Button.Wrapper when you want a primary action and an adjacent secondary trigger to read as a single control.

Disabled

URL State

Sync button clicks with URL parameters. Click a button to see the URL update with the corresponding action.

API Reference

Button

The root component for creating buttons with multiple variants, appearances, sizes, and shapes. Supports polymorphic rendering via the render prop and URL state management.

Prop

Type

URL State Props

When provided with a paramName, the button will set URL parameters when clicked.

Prop

Type

On this page