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

PropTypeDescriptionDefault
classNamestringAdditional 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"
asChildbooleanRender the button as a child component. Default is false.false
disabledbooleanWhether the button is disabled. Default is false.false
onClick(event: React.MouseEvent<HTMLButtonElement>) => voidThe function to call when the button is clicked.-
isLoadingbooleanWhen true, a loading spinner will be shown, and the button will be disabled.false