Button
A clickable element that triggers an action. Buttons can be used to submit forms, open modals, or navigate to different pages.
Import
Usage
Solid
The default button style, which has a solid background color.
Ghost
Ghost buttons are transparent and have no background color.
Outline
Outline buttons have a transparent background and a border.
Danger
Danger buttons are red and are used to indicate a destructive action.
Link
Link buttons are styled to look like a hyperlink.
Rounded
Rounded buttons have rounded corners.
Icon Button
Buttons can include an icon.
Props
- color?
-
"primary"
"secondary"
"slate"
"gray"
"zinc"
"neutral"
"stone"
"red"
"orange"
"amber"
"yellow"
"lime"
"green"
"emerald"
"teal"
"cyan"
"sky"
"blue"
"indigo"
"violet"
"purple"
"fuchsia"
"pink"
"rose"
The button color.
- rounded?
-
boolean
Whether the button should be rounded.
Default:
false
- variant?
-
"solid"
"outline"
"link"
"danger"
"ghost"
The button variant.
Default:
solid
- size?
-
"xs"
"sm"
"md"
"lg"
"xl"
The button size.
Default:
md
API Interface: ButtonProps