CloseButton
The CloseButton component renders a compact dismiss control commonly used for closing alerts, modals, and other interactive elements. It supports white variant styling, disabled state, click handling, and Bootstrap-compatible utility props.
Import​
import { CloseButton } from "@promethey/bsui";
Note
CloseButtoninherits all utility props supported by thePrimecomponent, including layout, spacing, typography, colors, borders, sizing, positioning, and other Bootstrap utility APIs.
Basic usage​
Click handler​
Use onClick to handle close actions.
White variant​
Use the white prop when displaying the close button on dark backgrounds.
Disabled​
Use the disabled prop to prevent interaction.
Usage with content​
CloseButton can be combined with other components that require dismiss functionality.
Utility props​
All utility props provided by Prime are supported.
API​
CloseButton​
| Prop | Type | Default | Description |
|---|---|---|---|
white | boolean | false | Enables the white close button variant. |
disabled | boolean | false | Disables user interaction. |
onClick | (event: MouseEvent<HTMLButtonElement>) => void | null | Callback fired when the button is clicked. |
className | string | object | null | Additional CSS classes. |
style | object | null | Inline styles. |