9.5k

Button

A button or a component that looks like a button.

Installation

Usage

You can use the render prop to make another component look like a button. Here's an example of a link that looks like a button.

API Reference

This is a custom component using Base UI's useRender hook, not a direct Base UI wrapper.

Button

A button component with variant, size, and loading states.

When loading is true, the component:

  • Renders a spinner (data-slot="button-loading-indicator")
  • Adds data-loading on the button root
  • Forces the native disabled attribute
  • Sets aria-disabled="true"
  • Preserves button width by hiding content visually instead of unmounting it

Examples

Default

Outline

Secondary

Destructive

Destructive Outline

Ghost

Extra-small Size

Small Size

Large Size

Extra-large Size

Disabled

Icon

Icon Small Size

Icon Large Size

With Icon

Loading (Built-in Prop)

Loading (Custom Composition)

coss.com ui

Built by and for the team of Cal.com, Inc. — the leading commercial open source company (“coss”).