Button

A versatile button component supporting multiple variants, sizes, and states for user interactions.

Installation

npx chilli@latest add button

Variants

Sizes

With Icons

Loading & Disabled

Glass Style

Social Login

Component preview

Add your Button component here

API Reference

Button

PropTypeDefaultDescription
variant"brand" | "primary" | "secondary" | "ghost" | "danger" | "danger-soft""primary"The visual style variant of the button.
size"xsm" | "sm" | "md" | "lg""md"The size of the button.
glassbooleanfalseEnables glass morphism style with backdrop blur and semi-transparent background.
loadingbooleanfalseShows a spinning loader icon and disables the button.
leftIconLucideIconIcon component displayed before the button text.
rightIconLucideIconIcon component displayed after the button text.
disabledbooleanfalseWhether the button is disabled.
asChildbooleanfalseRenders as the child element instead of a button.
childrenReactNodeThe content of the button.
classNamestringAdditional CSS classes to merge.

SocialButton

PropTypeDefaultDescription
provider"apple" | "google" | "facebook" | "apple-pay"Required. The social provider.
variant"primary" | "secondary"auto (based on provider)Visual style override.
disabledbooleanfalseDisables the button.
classNamestringAdditional CSS classes.