UI component
BaseModal
BaseModal gives you a reusable dialog shell for confirmation flows, editors, and detail views without tying the content to a specific workflow.
Installation
Install the package in your app.
pnpm add @rapidset/rapidkitUsage
Import components from the package entrypoint.
import { BaseModal, ButtonVariant } from '@rapidset/rapidkit';Examples
Preview the component and copy the snippet.
API Reference
Commonly used props at a glance.
| Prop | Description |
|---|---|
| isOpen | Controls whether the dialog is currently shown. |
| onClose | Closes the dialog from escape, overlay, or button actions. |
| title and description | Adds a clear heading and supporting context for the dialog content. |
| onSave and onCancel | Wires the default footer actions without custom markup. |
| customButtons | Adds extra footer actions when your flow needs more than save and cancel. |
| preventOutsideClose | Keeps the dialog open when the surrounding workflow should not be dismissed accidentally. |
Accessibility
The dialog uses accessible modal primitives for focus trapping, escape handling, and announced title and description content.
Optional access rules
Optional access props let you hide the dialog entirely or gate save and custom actions without moving that logic into the modal itself.