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:
| Name | Type | Description | Default |
|---|---|---|---|
| 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>) => void | Click handler function. | |
| label | React.ReactNode | Content inside the button. | |
| className | string | Optional CSS className to apply custom styles. | |
| sx | any | Optional style overrides (for custom design system usage). | |
| icon | React.ReactNode | Icon component to render inside the button. | |
| loading | boolean | Shows a loading spinner when true. | false |
| disabled | boolean | Disables the button when true. | false |