Button

Examples

Button Variants

Copied to clipboard

Block Button

Copied to clipboard

Links

Links with button styling. Semantic buttons and links are important for usability as well as accessibility. Using an "a" instead of a "button" element to perform user initiated actions should be avoided, unless absolutely necessary.

Copied to clipboard

Button Props

The Button component accepts the following props.

NameTypeRequiredDefaultDescription
children
node
''content rendered inside the button
className
string
''additional classes added to the button
component
custom
'button'Sets the base component to render. defaults to button
isActive
bool
falseAdds active styling to button.
isBlock
bool
falseAdds block styling to button
isDisabled
bool
falseDisables the button and adds disabled styling
isFocus
bool
falseAdds focus styling to the button
isHover
bool
falseAdds hove styling to the button
type
enum: button, submit
'button'Sets button type
variant
enum: primary, secondary, tertiary, danger, link, plain
'primary'Adds button variant styles
aria-label
custom
nullAdds accessible text to the button. Required for plain buttons