Button

Button is used to start an instant operation and is used when triggers an action or event

Variant

There's few variant of appearance of the button, you can set the variant prop value to default, twoTone, solid, or plain.

Size

Buttons come with four type of size, xs, sm, md & lg, The default size is md.

Color

You can customize button styles by overriding Tailwind CSS.

Disabled

Disabled Button prevents user interaction, set disabled prop to true to disabled a button.

Shape

Button shape can be set to none or circle, the default shape is round

Icon

Button can contain an icon by insert an icon to icon prop

Button With Icon

Icons also can be added to buttons and combined with text as the examples below.

Loading

Set loading prop to true to shows a loading indicator, it will disabled the button as well.

Block

Buttons can stretch to fill the width by adding block prop

API

Button
PropDescriptionTypeDefault
variantThe variant of the button'solid' | 'plain' | 'default''default'
sizeSize of the button.'lg' | 'md' | 'sm' | 'xs''md'
clickFeedbackFeedback effect upon button clickedbooleantrue
customColorClassCallback function to create a custom color for button(state: {active: boolean, unclickable: boolean}) => string-
shapeBorder radius of the button'round' | 'circle' | 'none''round'
disabledPrevents user interact with the buttonbooleanfalse
iconRender iconstring | ReactNode-
activeSet button to active statusbooleanfalse
loadingShow a loading spinner & disable the buttonbooleanfalse
blockMake button fill to its container widthbooleanfalse