Oros UI

Search documentation

Search Oros UI pages and components.

Dialog

Focuses attention on content or a task in an overlay.

Installation

Install Dialog from Oros with shadcn CLI 4.13.0.

pnpm dlx shadcn@4.13.0 add @oros/dialog

Usage

import {
  Dialog,
  DialogClose,
  DialogContent,
  DialogDescription,
  DialogFooter,
  DialogHeader,
} from "@/components/ui/dialog"

Open the Source tab in the preview for a complete working example.

Anatomy

ExportResponsibility
DialogThe root component that owns the primary structure and state.
DialogCloseCloses the current overlay or disclosure.
DialogContentContains the primary visible content.
DialogDescriptionProvides supporting context for the current region.
DialogFooterGroups supporting actions or metadata.
DialogHeaderGroups heading and introductory content.
DialogOverlayCovers background content while an overlay is active.
DialogPortalMoves overlay content to a stable document layer.
DialogTitleProvides the visible heading for the current region.
DialogTriggerControls opening, selection, or disclosure behavior.

API Reference

Dialog exports 10 named entries. Component exports accept the props of their underlying HTML element or Base UI component, plus an optional className, unless the source defines a more focused type.

  • Dialog Component
  • DialogClose Component
  • DialogContent Component
  • DialogDescription Component
  • DialogFooter Component
  • DialogHeader Component
  • DialogOverlay Component
  • DialogPortal Component
  • DialogTitle Component
  • DialogTrigger Component

Accessibility

  • Dialog inherits focus management and keyboard support from Base UI; keep the provided trigger and content parts together.
  • Give icon-only triggers an accessible name, retain visible focus styles, and verify Escape and focus-return behavior in the final composition.

Source

Dialog uses the standard shadcn API and is distributed through Oros. Installing it adds the component source and required dependencies to your app. The Source tab above shows a complete usage example.