DialogOptions: {
    closeOnBackdrop?: boolean;
    defaultOpen?: boolean;
    onOpenChange?: (open: boolean) => void;
}

Shared options for the modal and drawer dialog enhancers.

Type declaration

  • OptionalcloseOnBackdrop?: boolean

    Enable native light-dismiss (Escape and backdrop click) by setting the closedby="any" attribute. Defaults to true. Authors can set closedby directly in markup so dismissal works with no JavaScript at all.

  • OptionaldefaultOpen?: boolean

    Open the dialog immediately on enhance. Defaults to false.

  • OptionalonOpenChange?: (open: boolean) => void

    Called after the dialog opens or closes (including native Escape).