Button - Aspect UI

The Button component triggers user interactions such as form submissions, actions, or navigations. It supports various styles, sizes, icons, disabled states, and loading indicators to fit any context.

Table of Contents#

Default Button#


Button Variants#


Button Sizes#


Buttons with Icons#


Loading Buttons#


Disabled Buttons#


Button Props#


PropTypeDefaultDescription
variant'primary' 'secondary' 'success' 'warning' 'link' 'outline' 'ghost' 'icon'primaryControls the visual style of the button
size'sm' 'default' 'lg' 'icon'defaultControls the size of the button
isLoadingbooleanfalseShows a loading spinner
loadingTextstringText to display while loading
asChildbooleanfalseAllows rendering as a different element (like a link)
disabledbooleanfalseDisables the button
childrenReact.ReactNodeThe content to be rendered inside the button