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, setdata-active on the current tab, and hide inactive panels.
- Preview
- Code
Dialog
Dialog provides modal structure and data-state; your app controls open, focus management, Escape handling, background inertness, and portal placement.
- Preview
- Code
AlertDialog
AlertDialog is the confirmation-oriented dialog family. Use its action and cancel primitives for destructive decisions.
- Preview
- Code
Popover
Popover composes a trigger with a positioned content panel. Drive data-state and dismiss behaviour from your application.
- Preview
- Code
Sheet
Sheet is a modal side panel. It accepts open; content supports side="top" | "bottom" | "left" | "right".
- Preview
- Code
Tooltip
Tooltip provides the trigger/content structure. Use data-state and your own hover, focus, and dismissal logic when client behaviour is needed.
- Preview
- Code
Toast
ToastProvider positions notifications; Toast supports default, success, error, and warning variants.
- Preview
- Code
Menu
Menu exposes structural trigger, content, item, separator, label, and group primitives. Control visibility with data-state.
- Preview
- Code
ContextMenu
ContextMenu has the same compound structure as Menu; attach your application’s contextmenu handler to open it at the pointer position.
- Preview
- Code
Accordion
Accordion is stateless. Apply data-state="open" | "closed" to each item, trigger, and content from your own state.
- Preview
- Code