Skip to content

Material 3

Components

Dialog

Dialogs provide important prompts in a user flow.

9:30
Media volumeMusic, videos and games
Call volumeCalls on this phone
Phone ringtoneCallisto
Default notification soundPixie Dust
Default alarm soundBright Morning
Vibration & hapticsOn
Dial pad tonesOff
Phone ringtone

Dialogs provide important prompts in a user flow. Use a dialog to make sure that people act on information, such as to confirm a high-risk action like deleting progress.

A dialog is a modal window that appears in front of the app's content to give critical information or to ask for a decision. While it is open, the rest of the app cannot be used, and it stays on screen until it is confirmed, dismissed, or a required action has been taken. Dedicate each dialog to a single task.

For a brief message that needs no response, use a snackbar instead.

A dialog is composed of these parts:

PartUse
DialogTriggerThe trigger. Wraps the button that opens the dialog and the Dialog, with the button first. The button can be a Button, an IconButton or any other React Aria button.
DialogThe scrim and the dialog's container: a basic dialog (the default) or, with isFullScreen, a full-screen dialog
Heading with slot="title"The headline, which names the dialog
Text with slot="description"The supporting text, which describes the dialog
A button with slot="close"An action, which closes the dialog
import { Dialog, DialogTrigger } from '@material-web/react'
import { Heading, Text } from 'react-aria-components'

Basic dialog

Wrap the button that opens the dialog and the Dialog in a DialogTrigger, and write the dialog's parts as its children, each with its slot.

import { Button, Dialog, DialogTrigger } from '@material-web/react'
import { Heading, Text } from 'react-aria-components'

export default function Basic() {
  return (
    <DialogTrigger>
      <Button variant="tonal">Use location</Button>
      <Dialog>
        <Heading
          slot="title"
          className="m-0 px-space-300 pb-space-200 text-headline-sm text-on-surface"
        >
          Use location service?
        </Heading>
        <Text
          slot="description"
          elementType="p"
          className="m-0 min-h-0 grow overflow-y-auto px-space-300 pb-space-100"
        >
          Let this service help other apps determine your location. This means sharing anonymous
          location data, even when no apps are running.
        </Text>
        <div className="flex shrink-0 flex-wrap-reverse justify-end gap-space-100 px-space-300 pt-space-200">
          <Button variant="text" slot="close">
            Disagree
          </Button>
          <Button variant="text" slot="close">
            Agree
          </Button>
        </div>
      </Dialog>
    </DialogTrigger>
  )
}

Style the headline, the supporting text and the actions with your own classes, as listed under Headline, content and actions. For where Heading and Text come from, see Imports.

Slots

  1. title
  2. description
  3. close
SlotChildUse
titleA HeadingThe headline, which names the dialog
descriptionA TextThe supporting text, which describes the dialog
closeAny buttonAn action that closes the dialog

Headline, content and actions

A basic dialog has 24dp of padding above and below its content and none at the sides, so a Divider in it spans the dialog. Lay it out in these parts:

PartUse
HeadlineOptional
ContentAdd min-h-0 grow overflow-y-auto to scroll between the headline and the actions, as in Scrolling long content. The dialog sets the type style and color of the supporting text.
ActionsWrite the buttons in reading order, with the dismissing action first.
DividersOptional. Put a Divider between the parts.

Style the parts with the theme's classes:

<Dialog>
  <Heading slot="title" className="px-space-300 pb-space-200 text-headline-sm text-on-surface">
    …
  </Heading>
  <div className="px-space-300 pb-space-100">…</div>
  <div className="flex shrink-0 flex-wrap-reverse justify-end gap-space-100 px-space-300 pt-space-200">
    …
  </div>
</Dialog>

Buttons that do not fit side by side stack with the confirming action on top. In a right-to-left page, the actions are at the left edge.

import { Button, Dialog, DialogTrigger } from '@material-web/react'
import { Heading, Text } from 'react-aria-components'

export default function StackedActions() {
  return (
    <DialogTrigger>
      <Button variant="tonal">Speed boost</Button>
      <Dialog className="max-w-70">
        <Heading
          slot="title"
          className="m-0 px-space-300 pb-space-200 text-headline-sm text-on-surface"
        >
          Turn on speed boost?
        </Heading>
        <Text
          slot="description"
          elementType="p"
          className="m-0 min-h-0 grow overflow-y-auto px-space-300 pb-space-100"
        >
          Speed boost compresses data sent to and from your phone to load maps and directions
          faster.
        </Text>
        <div className="flex shrink-0 flex-wrap-reverse justify-end gap-space-100 px-space-300 pt-space-200">
          <Button variant="text" slot="close">
            No thanks
          </Button>
          <Button variant="text" slot="close">
            Turn on speed boost
          </Button>
        </div>
      </Dialog>
    </DialogTrigger>
  )
}

Alerts

A basic dialog has the alertdialog role: it interrupts the flow to give a message and to get a response. A full-screen dialog has the dialog role. The role follows the variant and cannot be set.

The headline is optional, so an alert can ask its question in the supporting text alone. Without a title, the dialog is named by its trigger's text. Set an aria-label to give it a name of its own, or when it has no trigger.

import { Button, Dialog, DialogTrigger } from '@material-web/react'
import { Text } from 'react-aria-components'

export default function Alert() {
  return (
    <DialogTrigger>
      <Button variant="tonal">Discard draft</Button>
      <Dialog>
        <Text
          slot="description"
          elementType="p"
          className="m-0 min-h-0 grow overflow-y-auto px-space-300 pb-space-100"
        >
          Discard draft?
        </Text>
        <div className="flex shrink-0 flex-wrap-reverse justify-end gap-space-100 px-space-300 pt-space-200">
          <Button variant="text" slot="close">
            Cancel
          </Button>
          <Button variant="text" slot="close">
            Discard
          </Button>
        </div>
      </Dialog>
    </DialogTrigger>
  )
}

Opening and closing

The DialogTrigger opens the dialog when its button is pressed. It keeps the open state itself unless you control it with isOpen and onOpenChange. Set defaultOpen to start with the dialog open. While the dialog is open, the button stays pressed, so a Button with hasShapeMorph keeps its pressed shape until the dialog closes.

A button in the dialog with slot="close" closes it, and the button's own onPress is still called. To close the dialog from your own code, pass a function as the Dialog's children and call state.close(): {({ state }) => …}.

To open a dialog from your own code, write a Dialog without a trigger and control it with isOpen and onOpenChange. Without a title, such a dialog needs an aria-label. The Dialog takes these props, and defaultOpen, as React Aria's Modal does.

import { Button, Dialog } from '@material-web/react'
import { useState } from 'react'
import { Heading, Text } from 'react-aria-components'

export default function Controlled() {
  const [isOpen, setOpen] = useState(false)
  const [isDeleted, setDeleted] = useState(false)
  return (
    <>
      <Button variant="tonal" isDisabled={isDeleted} onPress={() => setOpen(true)}>
        {isDeleted ? 'Photos deleted' : 'Delete photos'}
      </Button>
      <Dialog isOpen={isOpen} onOpenChange={setOpen}>
        <Heading
          slot="title"
          className="m-0 px-space-300 pb-space-200 text-headline-sm text-on-surface"
        >
          Permanently delete?
        </Heading>
        <Text
          slot="description"
          elementType="p"
          className="m-0 min-h-0 grow overflow-y-auto px-space-300 pb-space-100"
        >
          Deleting the selected photos will also remove them from all synced devices.
        </Text>
        <div className="flex shrink-0 flex-wrap-reverse justify-end gap-space-100 px-space-300 pt-space-200">
          <Button variant="text" slot="close">
            Cancel
          </Button>
          <Button variant="text" slot="close" onPress={() => setDeleted(true)}>
            Delete
          </Button>
        </div>
      </Dialog>
    </>
  )
}

Dismissal

Escape and a click on the scrim close a dialog, and onOpenChange is called with false. Set isDismissable={false} to keep a click on the scrim from closing it, and isKeyboardDismissDisabled to keep Escape from closing it. In this example, only the actions close the dialog.

import { Button, Dialog, DialogTrigger } from '@material-web/react'
import { Heading, Text } from 'react-aria-components'

export default function Dismissal() {
  return (
    <DialogTrigger>
      <Button variant="tonal">Reset settings</Button>
      <Dialog isDismissable={false} isKeyboardDismissDisabled>
        <Heading
          slot="title"
          className="m-0 px-space-300 pb-space-200 text-headline-sm text-on-surface"
        >
          Reset settings?
        </Heading>
        <Text
          slot="description"
          elementType="p"
          className="m-0 min-h-0 grow overflow-y-auto px-space-300 pb-space-100"
        >
          This will reset your app preferences back to their default settings.
        </Text>
        <div className="flex shrink-0 flex-wrap-reverse justify-end gap-space-100 px-space-300 pt-space-200">
          <Button variant="text" slot="close">
            Cancel
          </Button>
          <Button variant="text" slot="close">
            Reset
          </Button>
        </div>
      </Dialog>
    </DialogTrigger>
  )
}

To decide for each press outside the dialog whether it closes the dialog, pass a function as shouldCloseOnInteractOutside. It receives the pressed element, and the dialog stays open when it returns false.

Forms

To put a form in a dialog, wrap all of the dialog's content in a <form>. The parts are laid out in the form as they are in the dialog. The form is submitted by its confirming action, a button with type="submit", and by Enter in a field. Close the dialog from the form's onSubmit with state.close(). In this example, the content has pt-space-100 so that the label of the outlined field is not clipped.

import { Button, Dialog, DialogTrigger, TextField } from '@material-web/react'
import { Heading } from 'react-aria-components'

export default function Form() {
  return (
    <DialogTrigger>
      <Button variant="tonal">Rename</Button>
      <Dialog>
        {({ state }) => (
          <form
            onSubmit={(event) => {
              event.preventDefault()
              state.close()
            }}
          >
            <Heading
              slot="title"
              className="m-0 px-space-300 pb-space-200 text-headline-sm text-on-surface"
            >
              Rename file
            </Heading>
            <div className="min-h-0 grow overflow-y-auto px-space-300 pt-space-100 pb-space-100">
              <TextField
                label="File name"
                name="name"
                variant="outlined"
                defaultValue="Budget 2026"
                className="w-full"
              />
            </div>
            <div className="flex shrink-0 flex-wrap-reverse justify-end gap-space-100 px-space-300 pt-space-200">
              <Button variant="text" slot="close">
                Cancel
              </Button>
              <Button variant="text" type="submit">
                Rename
              </Button>
            </div>
          </form>
        )}
      </Dialog>
    </DialogTrigger>
  )
}

For the fields of a form and their validation, see Forms.

Size and scrolling

A basic dialog is centered in the window. It is as wide as its text, between 280dp and 560dp, and as tall as its content, up to the height the window allows.

The dialog is a flex item in a box that covers the window. Use the Dialog's className to move it from the center (ms-auto self-end) or to narrow it (max-w-80).

import { Button, Dialog, DialogTrigger } from '@material-web/react'
import { Heading, Text } from 'react-aria-components'

export default function Position() {
  return (
    <DialogTrigger>
      <Button variant="tonal">Turn on backup</Button>
      <Dialog className="ms-auto max-w-80 self-end">
        <Heading
          slot="title"
          className="m-0 px-space-300 pb-space-200 text-headline-sm text-on-surface"
        >
          Back up photos?
        </Heading>
        <Text
          slot="description"
          elementType="p"
          className="m-0 min-h-0 grow overflow-y-auto px-space-300 pb-space-100"
        >
          Photos you take on this device are saved to your account.
        </Text>
        <div className="flex shrink-0 flex-wrap-reverse justify-end gap-space-100 px-space-300 pt-space-200">
          <Button variant="text" slot="close">
            Not now
          </Button>
          <Button variant="text" slot="close">
            Turn on
          </Button>
        </div>
      </Dialog>
    </DialogTrigger>
  )
}

Scrolling long content

The content of a basic dialog is laid out in a column no taller than the dialog. Give the part that should scroll min-h-0 grow overflow-y-auto, and it scrolls between the parts above and below it. A box with a set height and no content shrinks in the column unless you give it shrink-0.

import { Button, Dialog, DialogTrigger } from '@material-web/react'
import { Heading } from 'react-aria-components'

const terms = [
  'These terms cover your use of the service. By creating an account, you agree to them.',
  'You keep the rights to what you upload. You let the service store it and show it to others.',
  'You are responsible for your account. Keep your password to yourself.',
  'We may change the service. When a change affects what you have stored, we tell you first.',
  'You can close your account at any time. What you have stored is deleted 30 days later.',
  'When these terms change, we ask you to accept the new terms before you continue.',
]

export default function LongContent() {
  return (
    <DialogTrigger>
      <Button variant="tonal">Terms of service</Button>
      <Dialog className="max-h-100">
        <Heading
          slot="title"
          className="m-0 px-space-300 pb-space-200 text-headline-sm text-on-surface"
        >
          Terms of service
        </Heading>
        <div className="min-h-0 grow overflow-y-auto px-space-300 pb-space-100">
          {terms.map((term) => (
            <p key={term} className="mt-0 mb-space-200">
              {term}
            </p>
          ))}
        </div>
        <div className="flex shrink-0 flex-wrap-reverse justify-end gap-space-100 px-space-300 pt-space-200">
          <Button variant="text" slot="close">
            Decline
          </Button>
          <Button variant="text" slot="close">
            Accept
          </Button>
        </div>
      </Dialog>
    </DialogTrigger>
  )
}

Note: A scrolling part clips what extends past its top edge. Give it pt-space-100 when it starts with an outlined TextField or with a control that shows a focus ring.

A full-screen dialog scrolls as a whole, under its app bar.

Full-screen

Set isFullScreen for a full-screen dialog. It fills the window, up to 560dp wide, and scrolls as a whole.

A full-screen dialog holds a series of tasks, such as creating a calendar entry with its title, date, location and time. Use one when the dialog has fields that take keyboard input, when changes are not saved instantly, or when its parts open other dialogs.

Write its header as a small app bar, first in the Dialog: the close button in the leading slot, the headline in the headline slot, and the confirming text button in the trailing slot. These buttons cannot take slot="close": close the dialog from each button's onPress. The app bar stays at the top as the dialog scrolls.

Write the content after the header, with px-space-300 pt-space-300. It does not need to scroll on its own. Put a long headline in the content, as a Heading in the title slot at its start, and keep the header's headline short or leave it out.

import {
  AppBar,
  Button,
  Dialog,
  DialogTrigger,
  Icon,
  IconButton,
  TextField,
} from '@material-web/react'
import { Heading } from 'react-aria-components'

export default function FullScreen() {
  return (
    <DialogTrigger>
      <Button variant="tonal">New event</Button>
      <Dialog isFullScreen>
        {({ state }) => (
          <>
            <AppBar>
              <IconButton slot="leading" aria-label="Close" onPress={() => state.close()}>
                <Icon name="close" />
              </IconButton>
              <Heading slot="headline">New event</Heading>
              <Button slot="trailing" variant="text" onPress={() => state.close()}>
                Save
              </Button>
            </AppBar>
            <div className="flex flex-col gap-space-200 px-space-300 pt-space-300">
              {['Event name', 'Location', 'Guests', 'Description'].map((label) => (
                <TextField key={label} label={label} variant="outlined" className="w-full" />
              ))}
            </div>
          </>
        )}
      </Dialog>
    </DialogTrigger>
  )
}

Responsive

Use a full-screen dialog in compact windows only. To change it into a basic dialog in wider windows, set isFullScreen from your own breakpoint, and write the parts of each variant: the app bar of a full-screen dialog, or the headline and the actions of a basic one.

In this example, the dialog is full-screen in a window narrower than 600dp, the theme's medium breakpoint.

import {
  AppBar,
  Button,
  Dialog,
  DialogTrigger,
  Icon,
  IconButton,
  TextField,
} from '@material-web/react'
import { useSyncExternalStore } from 'react'
import { Heading } from 'react-aria-components'

// A compact window: one narrower than the theme's medium breakpoint.
const compact = '(width < 600px)'

function subscribe(onChange: () => void) {
  const query = window.matchMedia(compact)
  query.addEventListener('change', onChange)
  return () => query.removeEventListener('change', onChange)
}

export default function Responsive() {
  const isCompact = useSyncExternalStore(
    subscribe,
    () => window.matchMedia(compact).matches,
    () => false,
  )
  const field = <TextField label="Album name" variant="outlined" className="w-full" />
  return (
    <DialogTrigger>
      <Button variant="tonal">New album</Button>
      <Dialog isFullScreen={isCompact}>
        {({ state }) =>
          isCompact ? (
            <>
              <AppBar>
                <IconButton slot="leading" aria-label="Close" onPress={() => state.close()}>
                  <Icon name="close" />
                </IconButton>
                <Heading slot="headline">New album</Heading>
                <Button slot="trailing" variant="text" onPress={() => state.close()}>
                  Create
                </Button>
              </AppBar>
              <div className="px-space-300 pt-space-300">{field}</div>
            </>
          ) : (
            <>
              <Heading
                slot="title"
                className="m-0 px-space-300 pb-space-200 text-headline-sm text-on-surface"
              >
                New album
              </Heading>
              <div className="min-h-0 grow overflow-y-auto px-space-300 pt-space-100 pb-space-100">
                {field}
              </div>
              <div className="flex shrink-0 flex-wrap-reverse justify-end gap-space-100 px-space-300 pt-space-200">
                <Button variant="text" slot="close">
                  Cancel
                </Button>
                <Button variant="text" slot="close">
                  Create
                </Button>
              </div>
            </>
          )
        }
      </Dialog>
    </DialogTrigger>
  )
}

Confirmation dialogs

For a choice that people confirm with an action, write the choices as the dialog's content. In this example, a list of choices scrolls between two dividers, while the headline and the actions stay in place. OK is disabled until a choice is made.

import { Button, Dialog, DialogTrigger, Divider, Radio, RadioGroup } from '@material-web/react'
import { useState } from 'react'
import { Heading } from 'react-aria-components'

const ringtones = ['None', 'Callisto', 'Ganymede', 'Luna', 'Europa', 'Titan', 'Io', 'Oberon']

export default function Scrolling() {
  const [ringtone, setRingtone] = useState<string | null>(null)
  return (
    <DialogTrigger>
      <Button variant="tonal">Phone ringtone</Button>
      <Dialog className="max-h-100">
        <Heading
          slot="title"
          className="m-0 px-space-300 pb-space-200 text-headline-sm text-on-surface"
        >
          Phone ringtone
        </Heading>
        <Divider />
        <RadioGroup
          aria-label="Phone ringtone"
          value={ringtone}
          onChange={setRingtone}
          className="flex min-h-0 grow flex-col overflow-y-auto px-space-300"
        >
          {ringtones.map((name) => (
            <Radio
              key={name}
              value={name}
              className="flex h-12 items-center text-body-lg text-on-surface"
            >
              {name}
            </Radio>
          ))}
        </RadioGroup>
        <Divider />
        <div className="flex shrink-0 flex-wrap-reverse justify-end gap-space-100 px-space-300 pt-space-200">
          <Button variant="text" slot="close">
            Cancel
          </Button>
          <Button variant="text" slot="close" isDisabled={ringtone === null}>
            OK
          </Button>
        </div>
      </Dialog>
    </DialogTrigger>
  )
}

Nested dialogs

A dialog opened from another shows in front of it, and Escape closes the one in front. Write the second dialog beside the DialogTrigger, or give it its own DialogTrigger. Do the same for a modal sheet opened from a dialog. A full-screen dialog is the only dialog that another should appear over.

A modal bottom sheet or side sheet stacks the same way: one opened from a dialog, or a dialog opened from one, shows in front of the other, and Escape closes the one in front. The page cannot be used or scrolled until both have closed. A menu in a dialog opens in front of it.

In this example, the full-screen dialog is controlled with the DialogTrigger's isOpen. When it is closed with changes made, by its close button, Escape or the scrim, a basic dialog opens in front of it and asks whether to discard them.

import {
  AppBar,
  Button,
  Dialog,
  DialogTrigger,
  Icon,
  IconButton,
  TextField,
} from '@material-web/react'
import { useState } from 'react'
import { Heading, Text } from 'react-aria-components'

export default function Nested() {
  const [isEditing, setEditing] = useState(false)
  const [isChanged, setChanged] = useState(false)
  const [isConfirming, setConfirming] = useState(false)
  const close = () => {
    setEditing(false)
    setConfirming(false)
    setChanged(false)
  }
  const leave = () => (isChanged ? setConfirming(true) : close())
  return (
    <>
      <DialogTrigger
        isOpen={isEditing}
        onOpenChange={(isOpen) => (isOpen ? setEditing(true) : leave())}
      >
        <Button variant="tonal">Write a note</Button>
        <Dialog isFullScreen>
          <AppBar>
            <IconButton slot="leading" aria-label="Close" onPress={leave}>
              <Icon name="close" />
            </IconButton>
            <Heading slot="headline">New note</Heading>
            <Button slot="trailing" variant="text" onPress={close}>
              Save
            </Button>
          </AppBar>
          <div className="px-space-300 pt-space-300">
            <TextField
              label="Note"
              variant="outlined"
              className="w-full"
              onChange={() => setChanged(true)}
            />
          </div>
        </Dialog>
      </DialogTrigger>
      <Dialog isOpen={isConfirming} onOpenChange={setConfirming} aria-label="Discard draft">
        <Text
          slot="description"
          elementType="p"
          className="m-0 min-h-0 grow overflow-y-auto px-space-300 pb-space-100"
        >
          Discard draft?
        </Text>
        <div className="flex shrink-0 flex-wrap-reverse justify-end gap-space-100 px-space-300 pt-space-200">
          <Button variant="text" slot="close">
            Cancel
          </Button>
          <Button variant="text" onPress={close}>
            Discard
          </Button>
        </div>
      </Dialog>
    </>
  )
}

Customization

Pass classes in className to restyle one dialog. className, style and ref apply to the dialog's container, inside the scrim, and what the dialog holds is yours to lay out. See Styling for the classes, the states and the theme.

In this example, the dialog is no wider than 400dp, its headline shares a row with a close icon button, and dividers separate its content.

import { Button, Dialog, DialogTrigger, Divider, Icon, IconButton } from '@material-web/react'
import { Heading, Text } from 'react-aria-components'

export default function Custom() {
  return (
    <DialogTrigger>
      <Button variant="tonal">What's new</Button>
      <Dialog className="max-w-100">
        <div className="flex shrink-0 items-center gap-space-200 ps-space-300 pe-space-200 pb-space-200">
          <Heading slot="title" className="m-0 grow text-headline-sm text-on-surface">
            What's new
          </Heading>
          <IconButton slot="close" aria-label="Close">
            <Icon name="close" />
          </IconButton>
        </div>
        <Divider />
        <Text
          slot="description"
          elementType="p"
          className="m-0 min-h-0 grow overflow-y-auto px-space-300 py-space-200"
        >
          Shared albums now show who added each photo, and you can sort an album by the date a photo
          was taken or added.
        </Text>
        <Divider />
        <div className="flex shrink-0 flex-wrap-reverse justify-end gap-space-100 px-space-300 pt-space-200">
          <Button variant="text" slot="close">
            Got it
          </Button>
        </div>
      </Dialog>
    </DialogTrigger>
  )
}
  • States: Style the dialog as it opens and closes with the entering: and exiting: variants. See Transitions.
  • Functions: className, style and children can be functions of the dialog's state: isEntering, isExiting and state. See Children as a function.
  • Ancestors: A dialog is rendered at the end of the page, not inside the element it is written in. A class or a data-theme on an element around it does not reach it: set it on the Dialog itself, or on the root element. See Theme.

Transitions

While a dialog opens and closes, its container has data-entering and data-exiting. Target them in your own classes with the entering: and exiting: variants: entering: styles what the dialog opens from, and exiting: what it closes to, as with React Aria's CSS transitions. In this example, the dialog comes up from below as it opens, and goes back down as it closes.

import { Button, Dialog, DialogTrigger } from '@material-web/react'
import { Heading, Text } from 'react-aria-components'

export default function Transition() {
  return (
    <DialogTrigger>
      <Button variant="tonal">Sign out</Button>
      <Dialog className="entering:translate-y-12 exiting:translate-y-12">
        <Heading
          slot="title"
          className="m-0 px-space-300 pb-space-200 text-headline-sm text-on-surface"
        >
          Sign out?
        </Heading>
        <Text
          slot="description"
          elementType="p"
          className="m-0 min-h-0 grow overflow-y-auto px-space-300 pb-space-100"
        >
          You will need your password to sign in again on this device.
        </Text>
        <div className="flex shrink-0 flex-wrap-reverse justify-end gap-space-100 px-space-300 pt-space-200">
          <Button variant="text" slot="close">
            Cancel
          </Button>
          <Button variant="text" slot="close">
            Sign out
          </Button>
        </div>
      </Dialog>
    </DialogTrigger>
  )
}

To animate a dialog from your own code, such as with an animation library, set isEntering while the entry animation runs and isExiting while the exit animation runs. isExiting keeps a closed dialog on the page until you clear it. See React Aria's Animation guide.

Limitations

Close buttons in an app bar

The buttons in the app bar of a full-screen dialog take the app bar's slots, so they cannot also take slot="close". Close the dialog from each button's onPress, with the state.close() of the Dialog's children function or with your own open state.

Non-modal dialogs

A Dialog is always modal. For a surface that leaves the page in use while it is open, use a standard side sheet or bottom sheet.