BASuite

BAButton

A customizable button component with various styles and sizes.

Example:


import { BAButton } from "basuite";

<> 
    <BAButton type="primary" label="Primary" /> 
    <BAButton type="default" label="Default" /> 
    <BAButton type="dashed" label="Dashed" /> 
    <BAButton type="link" label="Link" /> 
    <BAButton type="text" label="Text" /> 
</>
        

Props:

NameTypeDescriptionDefault
type"primary" | "default" | "dashed" | "link" | "text"Defines the visual style of the button."primary"
htmlType"submit" | "button" | "reset"Specifies the native HTML button type."button"
onClick(event: React.MouseEvent<HTMLButtonElement>) => voidClick handler function.
labelReact.ReactNodeContent inside the button.
classNamestringOptional CSS className to apply custom styles.
sxanyOptional style overrides (for custom design system usage).
iconReact.ReactNodeIcon component to render inside the button.
loadingbooleanShows a loading spinner when true.false
disabledbooleanDisables the button when true.false