Skip to content

Button

<bh-button> | BharatButton

Button component provides a customizable button with various sizes, variants, and styles.

Open in flex-shrink: 0; flex-shrink: 0;
ButtonPrimarySecondarySuccessWarningDanger

Basic Usage

Sizes

Use the size attribute to set the button’s sizing.

Variants

Use the variant attribute to set the button’s semantic variant.

Open in flex-shrink: 0; flex-shrink: 0;
PrimarySecondarySuccessWarningDanger

Icon Buttons

Open in flex-shrink: 0; flex-shrink: 0;
Sign in with GoogleSign in with Apple

States

Buttons can have different states like disabled, loading, etc.

Properties

PropertyTypeDescription
variantstringButton style variant (default, primary,secondary,success,warning,danger)
sizestringButton size (small, medium, large)
disabledbooleanWhether the button is disabled
loadingbooleanWhether to show a loading indicator
typestringHTML button type (button, submit, reset)
onClickfunctionClick event handler