Rebar UI

1.0

opinion

Dialog

A focused modal that asks for one decision.

Rename projectOpens over the page; focus lands on the field
Destructive
Loading
Error
Auto-dismiss

In context

Leave a projectA confirm on a phone, and a card that asks before deleting

Projects

Harbour rebrand84% done · Maya Chen
Tideline mobile61% done · Jonas Weber
Crew interviews33% done · Priya Nair
Depot signage

Wayfinding for the three northern depots. 48% done, due 21 Nov.

Promise confirm()

confirm()Resolves true on confirm, false on cancel, mask tap or Escape

Nothing asked yet.

    Props

    PropTypeRequiredDefault
    openboolean | undefinedNo—
    defaultOpenboolean | undefinedNo—
    onOpenChange((open: boolean) => void) | undefinedNo—
    triggerReactNodeNo—
    titleReactNodeYes—
    descriptionReactNodeNo—
    footerReactNodeNo—
    classNamestring | undefinedNo—
    bionicboolean | undefinedNo—
    bionicOptionsBionicOptions | undefinedNo—
    activeBorderboolean | undefinedNo—
    autoDismissnumber | undefinedNo—
    fullscreenboolean | undefinedNo—
    containerHTMLElement | null | undefinedNo—

    Accessibility

    role="dialog" with aria-modal="true" set explicitly (this Radix version does not set it itself). Esc closes it, Tab cycles focus only within the dialog while open, and focus returns to the trigger on close.

    data-rebar-* attributes

    data-rebar-component="dialog" on the content; data-rebar-part="title" | "description" | "body" | "footer" | "close". Radix's own data-state="open"|"closed" is read directly, not duplicated.

    Migrating to Ant Design

    @rebar-ui/migrate-antd renames the element to Modal (open, title and footer are already compatible names). onOpenChange becomes onCancel, flagged with a review comment since AntD's onCancel takes no argument. description is promoted into a child paragraph rather than dropped.