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
Variants
Use the variant prop to change the visual style of the Button.
Sizes
The Button
component supports the following sizes:
Disabled
Accessibility
The Button
component is built with accessibility in mind. Ensure that buttons
have accessible labels and are keyboard-navigable. Use the aria-*
attributes
where necessary to provide additional context.
<Button aria-label="Submit form">Submit</Button>
Customization
The Button
component can be customized using the className
prop or by
extending its styles with your design system.
<Button className="bg-purple-500 text-white hover:bg-purple-600">
Custom Button
</Button>