tsimport {XDSDialogHeader} from '@xds/core/Dialog'
| Guidance | Practices |
|---|---|
| Do | Choose the right purpose: info for dismissable content, form to prevent accidental backdrop dismissal, required when the user must respond. |
| Do | Include a clear title in the header so users immediately understand what the dialog is asking. |
| Do | Use purpose="form" for dialogs with inputs so the user can't accidentally lose data by clicking the backdrop. |
| Do | Keep dialogs focused on a single task — if the content grows beyond what fits, consider a full page instead. |
| Don't | Use a dialog for simple messages that could be shown inline or as a toast notification. |
| Don't | Nest dialogs inside other dialogs — restructure the flow into steps within a single dialog instead. |
| Don't | Use the fullscreen variant for simple confirmations — it is meant for complex content like editors or long forms. |
tsx'use client';import {XDSDialog, XDSDialogHeader} from '@xds/core/Dialog';import {XDSLayout, XDSLayoutContent, XDSCard} from '@xds/core/Layout';import {XDSText} from '@xds/core/Text';export default function DialogHeaderShowcase() {return (<XDSDialog isOpen isInline onOpenChange={() => {}}><XDSLayoutheader={<XDSDialogHeadertitle="Edit Profile"subtitle="Update your personal information"onOpenChange={() => {}}/>}content={<XDSLayoutContent><XDSCard variant="muted"><XDSText type="body" color="secondary">Dialog body content goes here.</XDSText></XDSCard></XDSLayoutContent>}/></XDSDialog>);}