Dialog
Imports
import {Dialog} from 'material-expressive-react';
import {Dialog} from 'material-expressive-react/dialog';
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
| getCloseAnimation | (() => unknown) | No | ||
| getOpenAnimation | (() => unknown) | No | ||
| noFocusTrap | boolean | No | ||
| onCancel | ((event: Event) => void) | No | ||
| onClose | ((event: Event) => void) | No | ||
| onClosed | ((event: Event) => void) | No | ||
| onOpen | ((event: Event) => void) | No | ||
| onOpened | ((event: Event) => void) | No | ||
| open | boolean | No | ||
| quick | boolean | No | ||
| returnValue | string | No | ||
| type | string | No |
Events
onOpen→ DOM eventopenonOpened→ DOM eventopenedonClose→ DOM eventcloseonClosed→ DOM eventclosedonCancel→ DOM eventcancel
Slots
Material Web components frequently use named slots. In React, you can pass slot="..." on children (e.g. <Icon slot="icon" />).
If you need to slot a child component that does not accept a slot prop, use the Slotted utility (see Utilities → Slotted).
Examples
See Storybook for live examples and variants.