Skip to main content

Button

The Button component is used to trigger actions, submit forms, or navigate between pages. It provides a consistent API built on top of Bootstrap 5 and supports utility props through the Prime primitive.

Import​

import { Button } from "@promethey/bsui";

Note

Badge inherits all utility props supported by the Prime component, including layout, spacing, typography, colors, borders, sizing, positioning, and other Bootstrap utility APIs.

Basic usage​

Tones​

Use the tone prop to change the visual appearance of the button.

Outline buttons​

Set outline to render the outline variant.

Sizes​

Use the size prop to change the button size.

Disabled state​

Disable user interaction with the disabled prop.

Active state​

Use pressed to indicate the active state.

Render the component as an anchor element.

Input button​

Render the component as an input element.

Utility props​

All utility props provided by Prime are supported.

API​

PropTypeDefaultDescription
aselementType"button"HTML element used for rendering.
childrenReactNode—Component content.
classNamestring—Additional CSS classes.
styleobject—Inline styles.
tostring"#"Navigation target for anchor elements.
type"button" | "submit" | "reset""button"Native button type.
tone"primary" | "secondary" | "success" | "danger" | "warning" | "info" | "light" | "dark" | "link""primary"Visual appearance.
outlinebooleanfalseEnables the outline style.
valuestring—Input value.
size"sm" | "lg"—Button size.
disabledbooleanfalseDisables user interaction.
pressedbooleanfalseIndicates the active state.
onClickfunction—Click event handler.