Skip to content

Button

Buttons are interactive elements that allow users to perform actions or navigate to different parts of an application.

Loading Code Block...

To get started, install Butterfly DS via aqua:

Loading Code Block...
Loading Code Block...
Loading Code Block...
Loading Code Block...
Loading Code Block...
Loading Code Block...
Loading Code Block...
Loading Code Block...

PropsDefaultTypeDescription
variantdefault'default ' | 'secondary' | 'ghost' | 'link'The visual style variant of the button
sizemd'xs' | 'sm' | 'md' | 'lg'The size of the button
disabledfalsebooleanDisables the button, preventing user interaction
isOutlinefalsebooleanApplies an outline style to the button
icon-ReactNodeIcon to display on the button
iconPosition'left''left' | 'right'Position of the icon relative to the text
fullWidthfalsebooleanMakes the button take the full width of its container
text-stringText content of the button
onClick-functionFunction to call when the button is clicked
fontCase-'uppercase' | 'sentence'Controls the text casing of the button
isLoadingfalsebooleanShows a loading spinner on the button
loadingText-stringText to display when the button is in loading state
hideLoadingSpinnerfalsebooleanHides the loading spinner while keeping the loading state
href-stringURL to navigate to when the button is clicked
destructivefalsebooleanApplies a destructive style to the button, typically used for delete actions
icon
icon icon icon icon