The library is still in early development. Breaking changes and bugs may occur without prior notice. Thanks for your interest in using the library!

v0.2.49Beta

Search

Button

Source

A versatile component used to trigger actions or events.

Usage

Import the Button component from @bun-ui/react and use it in your project:

import { Button } from "@bun-ui/react"
<Button>Click me</Button>

Examples

Variant

Use the variant prop to change the visual style of the Button.

Link

Color

Primary

Secondary

Accent

Neutral

Success

Destructive

Sizes

The Button component supports the following sizes:

Disabled

Loading

Props

Button

PropTypeDefaultDescription
asChild
booleanfalse

Whether to render the button as a child component.

color
"primary" | "secondary" | "destructive" | "accent" | "neutral" | "success""primary"

The color scheme of the button.

size
"sm" | "md" | "lg""md"

Size of the button.

The "icon" size is deprecated.

variant
"text" | "outlined" | "contained""contained"

The visual style variant of the button.