Skip to main content

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

CloseButton inherits all utility props supported by the Prime component, 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​

PropTypeDefaultDescription
whitebooleanfalseEnables the white close button variant.
disabledbooleanfalseDisables user interaction.
onClick(event: MouseEvent<HTMLButtonElement>) => voidnullCallback fired when the button is clicked.
classNamestring | objectnullAdditional CSS classes.
styleobjectnullInline styles.