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
Badgeinherits all utility props supported by thePrimecomponent, 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.
Link button​
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​
| Prop | Type | Default | Description |
|---|---|---|---|
as | elementType | "button" | HTML element used for rendering. |
children | ReactNode | — | Component content. |
className | string | — | Additional CSS classes. |
style | object | — | Inline styles. |
to | string | "#" | 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. |
outline | boolean | false | Enables the outline style. |
value | string | — | Input value. |
size | "sm" | "lg" | — | Button size. |
disabled | boolean | false | Disables user interaction. |
pressed | boolean | false | Indicates the active state. |
onClick | function | — | Click event handler. |