Button API
Import
Props
All props are optional unless otherwise specified.
Additionally, it can receive all attributes/props of a button
element.
color
The color variant of the button.
Type: 'primary' | 'secondary' | 'error' | 'info' | 'warning' | 'success'
disableShadow
Whether the shadow is disabled.
Type: boolean
fullRounded
The full rounded variant of the button.
Type: boolean
roundedSide
The rounded variant of the button.
Type: 'top' | 'bottom' | 'left' | 'right'
size
The size variant of the button.
Type: 'small' | 'large'
variant
The aspect variant of the button.
Type: 'outline' | 'text'
className
Additional class names for extending styles.
Type: string
iconStart
Icon placed before the text.
Type: ReactNode
iconEnd
Icon placed after the text.
Type: ReactNode
CSS Variables
You can customize the style of <Button />
component by using the following CSS
variables (custom properties):
CSS Classes
.button
The base styles for <Button />
component.
.button--primary
Styles for the primary
color variant.
.button--secondary
Styles for the secondary
color variant.
.button--error
Styles for the error
color variant.
.button--warning
Styles for the warning
color variant.
.button--info
Styles for the info
color variant.
.button--success
Styles for the success
variant.
.button--no-shadow
Styles for the no shadow
variant.
.button--small
Styles for the small
size variant.
.button--large
Styles for the large
size variant.
.button--top-rounded
Styles for the top
rounded variant.
.button--right-rounded
Styles for the right
rounded variant.
.button--bottom-rounded
Styles for the bottom
rounded variant.
.button--left-rounded
Styles for the left
rounded variant.
.button--full-rounded
Styles for the full
rounded variant.
.button--outline
Styles for the outline
aspect variant.
.button--text
Styles for the text
aspect variant.