Skip to content
nexubDesign System
v2.4.0

Components · Overlays

Dialog

StableSince v0.0.1

Modal dialog built on Radix UI. Fully accessible with focus trapping and ARIA roles.

import { Dialog } from '@nexub/react';

Usage

Use it for
  • Confirming a destructive or irreversible action

  • Collecting a small form without leaving the current page

  • Displaying critical information that requires acknowledgement

  • Previewing content before taking an action

Use something else for
  • Long multi-step flows — use a Drawer or a dedicated page instead

  • Quick contextual info — use a Tooltip or Popover

  • Non-blocking side panels — use Sheet or Drawer

  • Stacking multiple dialogs — always limit to one at a time

Examples

Default

Props

Props
PropTypeDefaultDescription
openboolean—Controlled open state.
onOpenChange(open: boolean) => void—Callback when open state changes.
defaultOpenbooleanfalseUncontrolled initial open state.
surface'solid' | 'glass''solid'Glass material on Dialog.Content — see Foundations → Materials.