Skip to main content

Overlays and compound components

These components provide structure, styling, ARIA roles, and state data attributes. They are deliberately stateless: your application owns interaction, focus management, keyboard handling, and portal behaviour. For production modal behaviour, add your own focus trap, Escape handling, background inertness, and portal strategy around the visual primitives.

Tabs

Tabs are stateless. Keep the selected value in application state, set data-active on the current tab, and hide inactive panels.

Dialog

Dialog provides modal structure and data-state; your app controls open, focus management, Escape handling, background inertness, and portal placement.

AlertDialog

AlertDialog is the confirmation-oriented dialog family. Use its action and cancel primitives for destructive decisions.

Popover

Popover composes a trigger with a positioned content panel. Drive data-state and dismiss behaviour from your application.

Sheet

Sheet is a modal side panel. It accepts open; content supports side="top" | "bottom" | "left" | "right".

Tooltip

Tooltip provides the trigger/content structure. Use data-state and your own hover, focus, and dismissal logic when client behaviour is needed.

Toast

ToastProvider positions notifications; Toast supports default, success, error, and warning variants.
Menu exposes structural trigger, content, item, separator, label, and group primitives. Control visibility with data-state.

ContextMenu

ContextMenu has the same compound structure as Menu; attach your application’s contextmenu handler to open it at the pointer position.

Accordion

Accordion is stateless. Apply data-state="open" | "closed" to each item, trigger, and content from your own state.