Button
A basic component that is used to trigger an action.
This component extends the buttonelement and accepts all its props.
Type:
"solid" | "ghost" | "danger"Defines the button style variant
Default:
solidType:
"md" | "lg" | "xl"Defines the button size
Default:
mdType:
stringSpecifies the width of the button. If provided, it sets the button’s width to the specified value.
Default:
autoType:
"md" | "lg" | "xl" | "full"Defines the border radius which the button will inherit
Default:
lgType:
booleanDisables the button
Default:
falseType:
booleanShows a loading state on the button
Default:
falseType:
JSX.ElementAn icon element displayed on the side side of the Button
Default:
nullType:
JSX.ElementAn icon element displayed on the left side of the Button
Default:
nullType:
stringThe background color of the button
Default:
defaultType:
stringSets the custom text color
Default:
defaultType:
booleanIf true, the button will take up the full width of its container.
Default:
falseType:
"light" | "dark"Sets the theme mode for the button component.
Default:
lightType:
stringThe border style for the button when in outline variant
Default:
defaultType:
stringThe background color of the button when hovered.
Default:
colors.blue[600]If you encounter any bugs or issues while using Spectrum UI, please report them by creating a new issue. Your feedback is invaluable and helps improve the library.