Skip to content

components/button

@fungi.computer/caps


@fungi.computer/caps / components/button

ButtonVariant = "primary" | "secondary" | "accent" | "destructive" | "outline" | "ghost" | "link"

Supported Button visual variants.


ButtonSize = "xs" | "sm" | "default" | "lg" | "icon"

Supported ButtonSize values.


ButtonProps = object & ButtonHTMLAttributes<HTMLButtonElement>>

Props accepted by Button.

optional asChild?: boolean

optional loading?: boolean

optional size?: ButtonSize

optional variant?: ButtonVariant


ButtonElement = ElementRef<"button">>

The native element type used by Button.

const Button: ForwardRefExoticComponent<object & ButtonHTMLAttributes<HTMLButtonElement> > & RefAttributes<HTMLButtonElement>>>>

A reusable button with caller-controlled native behavior and intrinsic loading presentation.