Dialog

A focused modal for reviewing details, editing information, and confirming actions.

Installation

npx shadcn@latest add @navui/dialog

Usage

Compose a trigger, backdrop, and named content inside Dialog. Install NavUI Button for the trigger and footer actions shown here.

Examples

Project details

Confirm member removal

Use UI SDK Alert Dialog to require a deliberate decision.

Rename project

Uses NavUI Field and Input with native form validation.

Current project: Launch dashboard

Generate a report

The first attempt simulates a connection error. Retry to complete the report.

Scrollable release checklist

Keep the header and actions visible while the checklist scrolls.

Controlled dialog

1 unread release update

API reference

Foundation component built on UI SDK Dialog. See the UI SDK Dialog documentation for the complete inherited API.

Component parts properties
PropTypeDefaultDescription
DialogHeader / DialogFooterNative div propsโ€”Lay out the title and description together, and group footer actions with consistent spacing.

Accessibility

  • Use DialogTitle to give the dialog an accessible name and DialogDescription for supporting context.
  • Tab and Shift+Tab stay within modal content. Escape closes a dismissible dialog and focus returns to the opening trigger; initialFocus and finalFocus customize this policy.
  • Long content scrolls within the dialog. The neutral opacity transition is disabled when reduced motion is requested.