Button

To Trigger an Operation. Buttons allow users to take actions, and make choices, with a single tap.Buttons communicate actions that users can take. They are typically placed throughout your UI.

ImportImport{ Button }from"libraricals"

Sourcecomponents/button

Button Size

Code

Button Variant

Code

Button Colors

Code

Loading Button

Code

Left Icon Button

Code

Right Icon Button

Code

Button With Border Radius

Code

Button With Disabled

Code

Button With Full Width

Code

Icon Button

Code

API

PropTypeDefaultDescription
variant"filled" | "outlined" | "dashed" | "solid" | "text" 'primary'The visual style variant of the button.
color'primary' | 'secondary' | 'danger' | 'success' | 'info' | 'light' | 'dark''primary'The visual colors of the button.
size'small' | 'medium' | 'large''md'The size of the button.
radius'none' | 'xs'| 'sm' | 'md' | 'lg' | 'full''md'The border radius of the button.
isLoadingbooleanfalseIf true, shows a loading state with a loading icon.
isFullWidthbooleanfalseIf true, the button will take the full width of its container.
iconOnlybooleanfalseIf true, the button will take the icon only.
leftIconReact.ReactElement<></>An optional icon to display on the left side of the button text.
rightIconReact.ReactElement<></>An optional icon to display on the right side of the button text.
disabledbooleanfalseIf true, button will be disable by default is false.
iconOnlybooleanfalseIf true, only the icon will be displayed without text.
valuestring''This is value of your button.
classNamestring''The className props use to pass as props your custom className is button.
stylesobject{ body? : React.CSSProperties, loading? : React.CSSProperties, loader?: React.CSSProperties, loaderText?: React.CSSProperties, leftIconStyle?:React.CSSProperties, rightIconStyle?:React.CSSProperties, iconOnlyStyle?:React.CSSPropperties }The styles props use to passing your custom css in button component as per need.