Docs
Button
Button
Displays a button or a component that looks like a button.
Usage
Example Code
1import { Button } from "inc-design-system/button";
Example Code
1<Button>Button</Button>
Props
Button
Prop | Type | Description | Default |
---|---|---|---|
className | string | Additional CSS classes to apply to the button. | - |
variant | "primary" | "secondary" | "dashed" | "link" | "text" | The variant of the button. | "primary" |
size | "default" | "sm" | "lg" | "icon" | The size of the button. | "default" |
asChild | boolean | Render the button as a child component. Default is false. | false |
disabled | boolean | Whether the button is disabled. Default is false. | false |
onClick | (event: React.MouseEvent<HTMLButtonElement>) => void | The function to call when the button is clicked. | - |
isLoading | boolean | When true, a loading spinner will be shown, and the button will be disabled. | false |