Button
A clickable element that triggers actions when interacted with. Can be customized in terms of style, size, and behavior.
Usage
Basic usage example to quickly see how the Button
works.
Properties
Interactive configurator to explore customization options for the Button
component.
UnstyledButton
UnstyledButton allows to provide its own style independent of all the styles and variant properties of Button
.
This can be very useful when you want to use it as a trigger for a tooltip or another toggle.
Used as asChild
it helps to pass the button property to its single child.
API References
Styles API
type Variant = "default" | "destructive" | "constructive" | "conservative" | "primitive" | "outline" | "ghost" | "link";
type Colors = "base" | "blue" | "green" | "red" | "default" | "grape" | "gradient-blue" | "gradient-orange" | "outline-base" | "outline-indigo" | "outline-teal";
type Size = "default" | "icon" | "sm" | "lg" | "badge";
Styles API | Type | Default | Annotation |
---|---|---|---|
unstyled? | boolean | false | if true , all default styles will be removed |
variant? | Variant | default | Set variant of button |
color? | Colors | undefined | Set color of button |
size? | Variant | default | Set size of button with tailwindcss |
Source Codes
Full working code example, including necessary markup and styles. You can copy and paste this code directly to start using the component immediately.