Modal

Dialog overlay for confirmations and focused tasks. Figma V8.0: Stacked / Horizontal × Default / Warning / Destructive, Desktop + Mobile breakpoints.

import{ Modal } from "@pepulux/ui"

Type: Stacked left aligned (default)

Type: Horizontal

Color: Warning — stacked + horizontal

Destructive: True — stacked + horizontal

Color: Success

Header: Center aligned

Header: With maximize button

Actions: Vertical fill container

Actions: Horizontal right aligned (checkbox)

Actions: divider=false

With custom content (children)

Props

PropTypeDefaultDescription
open*booleanControls modal visibility
onClose*() => voidCalled when backdrop or × is clicked
title*stringModal heading
descriptionReactNodeSupporting text below the title
variant"stacked" | "horizontal""stacked"Figma Header Type — Stacked (icon above text) | Horizontal (icon beside text)
align"left" | "center""left"Figma Header Type — Left aligned | Center aligned. Only applies when variant="stacked"
showMaximizebooleanfalseFigma Header — shows an expand/fullscreen button next to the close button
onMaximize() => voidCalled when the maximize button is clicked
color"default" | "success" | "warning" | "error" | "brand""default"Figma color — controls featured icon color
destructivebooleanfalseFigma Destructive=True — shorthand for color=error + red primary button
actionsLayout"horizontal" | "vertical" | "spread""horizontal"Figma Actions Type — Horizontal fill container | Vertical fill container | Horizontal right aligned (checkbox)
dividerbooleantrueFigma Actions "divider" — shows the divider line above the footer actions
primaryActionModalAction{ label, onClick, loading?, disabled? } — main CTA button
secondaryActionModalAction{ label, onClick, loading?, disabled? } — cancel/secondary button
tertiaryActionModalTertiaryAction{ label, onClick, icon?, disabled? } — "Settings"-style button, rendered only with actionsLayout="spread"
showDontShowAgainbooleanfalseShows the "Don't show again" checkbox, rendered only with actionsLayout="spread"
dontShowAgainCheckedbooleanControlled checked state for the "Don't show again" checkbox
onDontShowAgainChange(checked: boolean) => voidCalled when the "Don't show again" checkbox changes
dontShowAgainLabelstring"Don't show again"Label text for the "Don't show again" checkbox
childrenReactNodeCustom body content rendered between header and footer
maxWidthstring"400px"Max width of the modal panel