# Overlays

Dialog, Sheet, Popover, DropdownMenu, HoverCard and Tooltip: how much each one interrupts, and what it becomes on a phone.

API [Dialog](/ui/storybook/?path=/docs/ui-primitives-dialog--docs) [Sheet](/ui/storybook/?path=/docs/ui-primitives-sheet--docs) [Popover](/ui/storybook/?path=/docs/ui-primitives-popover--docs) [InfoPopover](/ui/storybook/?path=/docs/ui-primitives-infopopover--docs) [DropdownMenu](/ui/storybook/?path=/docs/ui-primitives-dropdownmenu--docs) [FilterMenu](/ui/storybook/?path=/docs/ui-filtermenu--docs) [Select](/ui/storybook/?path=/docs/ui-primitives-select--docs) [HoverCard](/ui/storybook/?path=/docs/ui-primitives-hovercard--docs) [Tooltip](/ui/storybook/?path=/docs/ui-primitives-tooltip--docs) [ConfirmDialog](/ui/storybook/?path=/docs/ui-confirmdialog--docs) [Toaster](/ui/storybook/?path=/docs/ui-primitives-toaster--docs) [AttachmentViewerProvider](/ui/storybook/?path=/docs/ui-content-attachmentviewerprovider--docs)

**Pick the overlay that interrupts least. A Popover or a menu keeps the page in reach; a Sheet sets it aside; a Dialog stops it until the question is answered.**

```tsx
import { TOKENS } from "@orz/fixtures/account.ts";
import {
  INBOX_LABEL_COLORS,
  INBOX_LABELS,
  INBOX_THREADS,
} from "@orz/fixtures/inbox.ts";
import { PULL_REQUEST } from "@orz/fixtures/pull-request.ts";
import { Badge } from "@orz/ui/components/badge";
import { Button } from "@orz/ui/components/button";
import { ConfirmDialog } from "@orz/ui/components/confirm-dialog";
import {
  DropdownMenu,
  DropdownMenuCheckboxItem,
  DropdownMenuContent,
  DropdownMenuLabel,
  DropdownMenuTrigger,
} from "@orz/ui/components/dropdown-menu";
import { EmptyState } from "@orz/ui/components/empty-state";
import { Frame } from "@orz/ui/components/frame";
import { GroupHeading } from "@orz/ui/components/group-heading";
import {
  HoverCard,
  HoverCardContent,
  HoverCardTrigger,
} from "@orz/ui/components/hover-card";
import { Input } from "@orz/ui/components/input";
import { Label } from "@orz/ui/components/label";
import { NavList, NavListItem, NavListLink } from "@orz/ui/components/nav-list";
import { Pane } from "@orz/ui/components/pane";
import {
  Popover,
  PopoverContent,
  PopoverTrigger,
} from "@orz/ui/components/popover";
import {
  Sheet,
  SheetClose,
  SheetContent,
  SheetHeader,
  SheetTitle,
  SheetTrigger,
} from "@orz/ui/components/sheet";
import { TextLink } from "@orz/ui/components/text-link";
import { ToolbarButton } from "@orz/ui/components/toolbar";
import {
  Tooltip,
  TooltipContent,
  TooltipProvider,
  TooltipTrigger,
} from "@orz/ui/components/tooltip";
import {
  ArchiveIcon,
  FileTextIcon,
  InboxIcon,
  KeyRoundIcon,
  PanelLeftIcon,
  PencilIcon,
  SendIcon,
  StarIcon,
  TagIcon,
  Trash2Icon,
} from "lucide-react";
import { type ReactNode, useState } from "react";
import { toast } from "sonner";

const FOLDERS = [
  { title: "Inbox", Icon: InboxIcon },
  { title: "Starred", Icon: StarIcon },
  { title: "Sent", Icon: SendIcon },
  { title: "Drafts", Icon: FileTextIcon },
  { title: "Archive", Icon: ArchiveIcon },
  { title: "Trash", Icon: Trash2Icon },
];

const THREAD = INBOX_THREADS.find(({ id }) => id === "touch-sizes");

function Panel({ title, children }: { title: string; children: ReactNode }) {
  return (
    <section className="grid min-w-0 gap-1.5">
      <GroupHeading asChild>
        <h3>{title}</h3>
      </GroupHeading>
      <Frame asChild>
        <Pane purpose="panel" className="min-w-0 p-2">
          {children}
        </Pane>
      </Frame>
    </section>
  );
}

export function OverlayKinds() {
  const [starred, setStarred] = useState(THREAD?.starred ?? false);
  const [labels, setLabels] = useState(THREAD?.labels ?? []);
  const [token, setToken] = useState(TOKENS[0]?.name ?? "");
  const [renaming, setRenaming] = useState(false);
  const [revoking, setRevoking] = useState(false);
  const [revoked, setRevoked] = useState(false);
  return (
    <TooltipProvider>
      <div className="grid min-w-0 gap-4">
        <Panel title="Mail">
          <Pane purpose="toolbar" className="flex items-center gap-0.5">
            <Sheet>
              <Tooltip>
                <TooltipTrigger asChild>
                  <SheetTrigger asChild>
                    <ToolbarButton aria-label="Folders">
                      <PanelLeftIcon />
                    </ToolbarButton>
                  </SheetTrigger>
                </TooltipTrigger>
                <TooltipContent>Folders</TooltipContent>
              </Tooltip>
              <SheetContent side="left" className="w-72">
                <SheetHeader>
                  <SheetTitle>Folders</SheetTitle>
                </SheetHeader>
                <nav aria-label="Folders" className="px-2">
                  <NavList>
                    {FOLDERS.map(({ title, Icon }) => (
                      <NavListItem key={title}>
                        <SheetClose asChild>
                          <NavListLink current={title === "Inbox"} asChild>
                            <button type="button">
                              <Icon />
                              {title}
                            </button>
                          </NavListLink>
                        </SheetClose>
                      </NavListItem>
                    ))}
                  </NavList>
                </nav>
              </SheetContent>
            </Sheet>
            <Tooltip>
              <TooltipTrigger asChild>
                <ToolbarButton
                  aria-label="Star"
                  aria-pressed={starred}
                  onClick={() => setStarred(!starred)}
                >
                  <StarIcon className={starred ? "fill-current" : undefined} />
                </ToolbarButton>
              </TooltipTrigger>
              <TooltipContent>Star</TooltipContent>
            </Tooltip>
            <DropdownMenu>
              <Tooltip>
                <TooltipTrigger asChild>
                  <DropdownMenuTrigger asChild>
                    <ToolbarButton aria-label="Labels">
                      <TagIcon />
                    </ToolbarButton>
                  </DropdownMenuTrigger>
                </TooltipTrigger>
                <TooltipContent>Labels</TooltipContent>
              </Tooltip>
              <DropdownMenuContent align="start" className="w-44">
                <DropdownMenuLabel>Labels</DropdownMenuLabel>
                {INBOX_LABELS.map((label) => (
                  <DropdownMenuCheckboxItem
                    key={label}
                    checked={labels.includes(label)}
                    onCheckedChange={(on) =>
                      setLabels((was) =>
                        on ? [...was, label] : was.filter((l) => l !== label),
                      )
                    }
                    onSelect={(event) => event.preventDefault()}
                  >
                    <Badge variant="marker" color={INBOX_LABEL_COLORS[label]}>
                      {label}
                    </Badge>
                  </DropdownMenuCheckboxItem>
                ))}
              </DropdownMenuContent>
            </DropdownMenu>
            <span className="min-w-0 truncate px-1 text-ui">
              {THREAD?.subject}
            </span>
          </Pane>
        </Panel>
        <Panel title="Access tokens">
          {revoked ? (
            <EmptyState title="No access tokens" className="p-1">
              Scripts and bots that need one get it from the command line.
            </EmptyState>
          ) : (
            <div className="flex items-center gap-2">
              <KeyRoundIcon className="size-4 shrink-0 text-muted-foreground" />
              <span className="min-w-0 flex-1 truncate font-mono text-ui">
                {token}
              </span>
              <Popover open={renaming} onOpenChange={setRenaming}>
                <Tooltip>
                  <TooltipTrigger asChild>
                    <PopoverTrigger asChild>
                      <Button
                        variant="ghost"
                        size="icon"
                        aria-label={`Rename ${token}`}
                      >
                        <PencilIcon />
                      </Button>
                    </PopoverTrigger>
                  </TooltipTrigger>
                  <TooltipContent>Rename</TooltipContent>
                </Tooltip>
                <PopoverContent align="end" className="w-64">
                  <form
                    className="grid gap-2"
                    onSubmit={(event) => {
                      event.preventDefault();
                      const name = new FormData(event.currentTarget).get(
                        "name",
                      );
                      if (typeof name === "string" && name.trim() !== "") {
                        setToken(name.trim());
                        toast(`Renamed the token to ${name.trim()}`);
                      }
                      setRenaming(false);
                    }}
                  >
                    <Label htmlFor="overlay-token-name">Token name</Label>
                    <Input
                      id="overlay-token-name"
                      name="name"
                      defaultValue={token}
                      autoComplete="off"
                    />
                    <Button
                      type="submit"
                      size="sm"
                      className="justify-self-end"
                    >
                      Rename
                    </Button>
                  </form>
                </PopoverContent>
              </Popover>
              <Button variant="destructive" onClick={() => setRevoking(true)}>
                Revoke…
              </Button>
              <ConfirmDialog
                open={revoking}
                onOpenChange={setRevoking}
                title={`Revoke the token for ${token}?`}
                description="Anything that signs in with it stops working at once. A revoked token cannot be restored: you would create a new one and update everything that used the old."
                confirmLabel="Revoke"
                destructive
                onConfirm={() => {
                  setRevoking(false);
                  setRevoked(true);
                  toast(`Revoked the token for ${token}`);
                }}
              />
            </div>
          )}
        </Panel>
        <Panel title="Pull request">
          <p className="px-1 text-muted-foreground text-ui">
            <HoverCard>
              <HoverCardTrigger asChild>
                <TextLink href={`#${PULL_REQUEST.author}`}>
                  {PULL_REQUEST.author}
                </TextLink>
              </HoverCardTrigger>
              <HoverCardContent className="w-72">
                <p className="font-medium text-ui">{PULL_REQUEST.author}</p>
                <p className="text-muted-foreground text-ui">
                  Opened #{PULL_REQUEST.number} in {PULL_REQUEST.repo.owner}/
                  {PULL_REQUEST.repo.name}: {PULL_REQUEST.title}
                </p>
              </HoverCardContent>
            </HoverCard>{" "}
            opened this pull request
          </p>
        </Panel>
      </div>
    </TooltipProvider>
  );
}
```

Each control opens a different overlay. In Mail, the panel icon opens the folders in a `Sheet`, the star is named by its `Tooltip`, and the tag icon opens the labels in a `DropdownMenu` that stays open for the next tick. On the token, the pencil edits its name in a `Popover`, and **Revoke…** asks in a `Dialog`. Hover **alice** for a `HoverCard`. Press **Touch** above the preview: the Tooltip and the HoverCard no longer open, and every other control still works.

## Which one

| You need to                                                            | Use                                  | Blocks the page             | On a phone                                                                                           |
| ---------------------------------------------------------------------- | ------------------------------------ | --------------------------- | ---------------------------------------------------------------------------------------------------- |
| Ask one question, or take one short input, before going on             | `Dialog`                             | Yes                         | Centred, nearly full width; the footer buttons stack, primary on top                                 |
| Show a panel of settings, filters or a navigation list beside the work | `Sheet` (`side="right"` or `"left"`) | Yes, dimmed                 | Three quarters of the width, from the edge                                                           |
| Offer a short list of actions or one choice from a few                 | `DropdownMenu`                       | Yes, until a pick or Escape | Rises from the bottom edge, the whole width, under a title bar; rows grow to touch size              |
| Edit one value in place, where the trigger is                          | `Popover`                            | No                          | Opens under its trigger, never wider than the screen                                                 |
| Explain a label, a setting or a section in a sentence or two           | `InfoPopover`                        | No                          | Opens on a press, as on a click; see [Writing](/ui/guidelines/content/writing/index.md#explanations) |
| Preview what a link points to                                          | `HoverCard`                          | No                          | Does not open: the link itself must be enough                                                        |
| Name an icon button                                                    | `Tooltip`                            | No                          | Does not open: the `aria-label` names it, the icon must be clear                                     |

Open one overlay from another at most once: a menu or a Popover inside a dialog is fine. A dialog that opens another dialog is a flow; make it a page, or one dialog with steps.

A dialog or a sheet never grows past the screen. Wrap the part that can grow, a list, a diff or a long form, in `DialogBody` or `SheetBody`: on a short screen or a phone held sideways, that part scrolls and the question and its answer stay in view. One without it scrolls whole, which still reaches the footer but scrolls the title away.

## Long submenus

A submenu that lists what people add themselves, such as projects, people or labels, can grow past a screen. Give its `DropdownMenuSubContent` a `query` and `onQueryChange`, and pass only the rows the query matches: a filter box tops the submenu, typing filters rather than jumping to a row by its first letter, and the arrow keys walk the matches. `matchText` and `MatchedText`, which `FilterMenu` uses, match and mark the rows the same way. A short list that never grows, such as the ways to sort, needs no box.

```tsx
import { PROJECTS } from "@orz/fixtures/projects.ts";
import { TASKS } from "@orz/fixtures/tasks.ts";
import { Button } from "@orz/ui/components/button";
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuItem,
  DropdownMenuRadioGroup,
  DropdownMenuRadioItem,
  DropdownMenuSub,
  DropdownMenuSubContent,
  DropdownMenuSubTrigger,
  DropdownMenuTrigger,
} from "@orz/ui/components/dropdown-menu";
import { MatchedText, matchText } from "@orz/ui/components/filter-menu";
import { List, ListItem } from "@orz/ui/components/list";
import { EllipsisIcon } from "lucide-react";
import { useState } from "react";

const START = TASKS.slice(0, 3).map((task, i) => ({
  id: task.id,
  title: task.title,
  project: PROJECTS[i * 4]?.key ?? "",
}));

export function MoveToProject() {
  const [tasks, setTasks] = useState(START);
  // One query serves every row's menu: one opens at a time, and each
  // opening of the submenu clears it.
  const [query, setQuery] = useState("");
  const shown = PROJECTS.filter(
    (project) =>
      matchText(project.name, query) || matchText(project.key, query),
  );
  return (
    <List purpose="collection" framed className="max-w-lg">
      <ul>
        {tasks.map((task) => (
          <ListItem key={task.id} asChild>
            <li className="flex min-h-row items-center gap-2 pr-1 pl-3 text-ui">
              <span className="min-w-0 flex-1 truncate">{task.title}</span>
              <span className="text-ui-sm text-muted-foreground">
                {task.project}
              </span>
              <DropdownMenu>
                <DropdownMenuTrigger asChild>
                  <Button
                    variant="ghost"
                    size="icon-xs"
                    aria-label={`More actions for “${task.title}”`}
                  >
                    <EllipsisIcon />
                  </Button>
                </DropdownMenuTrigger>
                <DropdownMenuContent align="end" className="w-48">
                  <DropdownMenuItem>Edit…</DropdownMenuItem>
                  <DropdownMenuSub>
                    <DropdownMenuSubTrigger>
                      Move to project
                    </DropdownMenuSubTrigger>
                    <DropdownMenuSubContent
                      query={query}
                      onQueryChange={setQuery}
                      placeholder="Filter projects…"
                      inputLabel="Filter projects"
                    >
                      <DropdownMenuRadioGroup
                        value={task.project}
                        onValueChange={(key) =>
                          setTasks((all) =>
                            all.map((t) =>
                              t.id === task.id ? { ...t, project: key } : t,
                            ),
                          )
                        }
                      >
                        {shown.map((project) => (
                          <DropdownMenuRadioItem
                            key={project.key}
                            value={project.key}
                          >
                            <MatchedText text={project.name} query={query} />
                            <span className="ml-auto text-ui-sm text-muted-foreground">
                              <MatchedText text={project.key} query={query} />
                            </span>
                          </DropdownMenuRadioItem>
                        ))}
                      </DropdownMenuRadioGroup>
                    </DropdownMenuSubContent>
                  </DropdownMenuSub>
                </DropdownMenuContent>
              </DropdownMenu>
            </li>
          </ListItem>
        ))}
      </ul>
    </List>
  );
}
```

Open a task's ⋯ menu and press → on **Move to project**, or rest the pointer on it: either way the box takes what you type, and Enter moves the task to the highlighted project. Escape closes the submenu and leaves the menu open. Press **Touch** above the preview: the box now waits for a tap, so the on-screen keyboard does not rise over the projects. On a phone the submenu takes the place of the menu's sheet, its box under the title bar, and the sheet sits on the keyboard once it rises.

## Ticks and picks

A menu that ticks marks each item with a box before its words, empty while it is off: a `DropdownMenuCheckboxItem` and a `FilterMenu` row under `selection="multiple"` draw the same box, with a dash in it for what is on only some of what is picked. A menu that picks one marks the pick with a check at the end of its row: a `DropdownMenuRadioItem`, and a `FilterMenu` row under single selection. So a menu that ticks says so before anything in it is ticked, and an item that toggles, **Watch**, reads apart from one that acts, **Copy link**, beside it.

A short set the app fixes, such as Mail's few labels or a release's tags, is a `DropdownMenu` of check items; prevent each item's `onSelect` and the menu stays open for the next tick. One that is long, or grows with people's own data, such as a project's labels or its people, is a `FilterMenu` with `selection="multiple"`, which adds a box to filter it ([Choosing a control](/ui/guidelines/patterns/choosing-a-control/index.md)). Either way the rows tick alike.

## Do and don't

**Do**

Title a dialog with its question, "Delete … forever?", and put the action that answers it in the footer, named with the same verb: **Delete forever**.

**Don't**

Use a dialog to show information that needs no answer: a toast, an inline note or a Popover interrupts less.

**Do**

Put anything a HoverCard or Tooltip shows somewhere reachable without hover too: the page the link opens, or a visible label.

**Don't**

Hide an action inside a HoverCard: a phone cannot hover, and a keyboard reaches the card only through its trigger's focus.

## Closing

Every overlay closes on Escape, and a Dialog, Sheet, Popover and menu on a click or tap outside them. A toast is outside none of them: pressing one, or its action, closes no overlay, and Escape pressed among the toasts takes the focus back to the overlay rather than closing it. Focus returns to the trigger that opened them; from a Dialog or Sheet a menu's item opened, it returns where the menu hands it back, its trigger unless the menu says otherwise, since the item went with the menu. A Dialog, a Sheet, a `DropdownMenu`, a `Select` and any menu open as a sheet hold the page still while they are open, and the click or tap that closes one does nothing else: it follows no link and opens no other menu. A tap closes it as the finger lifts. A Popover, and a `FilterMenu` beside its trigger, leave the page live: the click that closes one also does what it would have done, so it can go straight to the next field. A Dialog or Sheet also has its own close button in the corner, so it can be closed with one tap on a phone, where there is no Escape key.

A Dialog whose title shares a row with commands on its subject (download, zoom, paging) puts them in a `DialogTitleBar`, ending with a `DialogCloseButton` in place of the corner one. The row is a toolbar: the title keeps its first 20 characters, the commands that do not fit go into a `⋯` before the close button, and the close button always stays.

A click outside a Dialog that holds typed input should not throw the input away: keep it for the next opening, or ask first. The click most likely meant to look at the page behind.

An overlay the reader reads in rather than answers, such as the attachment viewer, which takes most of a phone's screen, or a Sheet of a task's details, is a place to them, and Back is how they leave a place. Opening it takes an entry in the browser's history, so Back closes it rather than leaving the page behind. Paging, or opening another file from inside it, replaces that entry, so Back never walks through every file looked at. Its own close button steps back over the entry it took; opened from a link, it has none, and closing replaces the address instead. Where the app can find what it shows again, the address names it, so a reload or a shared link reopens it. `AttachmentViewerProvider` takes `state` and `onStateChange` for this: it reports each opening, page and close, and shows what the app gives it.

## In another window

An app may draw part of itself in a second window, such as a Picture-in-Picture window that keeps a call or a form in view over other apps. An overlay opened from there belongs there: a `CommandTooltip`, `ConfirmDialog`, `DialogContent`, `DropdownMenuContent`, `PopoverContent`, `SelectContent` or `TooltipContent` takes that window's `document.body` as its `container`. Without it the overlay opens in the main window, behind the one the person is working in, and they are left waiting on a question they cannot see. Any other overlay, such as a `SheetContent` or `HoverCardContent`, opens only in the main window, so the part drawn in the other window asks with a Dialog or a Popover instead.

A Dialog there is modal to that window alone: it keeps the focus, closes on a press of its scrim and holds that window's page still, while the main window scrolls as before. Wrapping the part in a `PortalContainerContext` with that body does for every overlay in it what each `container` does.

Closed, a menu, a Popover or a `FilterMenu` there hands the focus back to what opened it in that window, as it does here, and so does a dialog one of a menu's items opened: Escape or **Cancel** in a `Toolbar`'s `⋯` lands on the `⋯`, and the main window keeps whatever it had.

A `DropdownMenu` there works as it does here: opened from the keys, it starts on its first item, the arrow keys and a typed letter move through it, → enters a submenu, and a press outside closes it. While it is open it holds that window as it would hold this one, its page still and out of the pointer's reach, and leaves the main window alone.

## On each platform

### Desktop & pointer

- A Popover, HoverCard or Tooltip opens beside its trigger and flips to the other side when there is no room; nothing needs placing by hand.
- A HoverCard opens after a short hover and stays open while the pointer is over the card, so its links can be clicked.
- Menus are fully keyboard-driven: arrows move, Enter picks, typing a letter jumps to an item. In a submenu with a filter box, typing filters it instead.
- A menu people pick from, a `DropdownMenu` of radio or check items and a `FilterMenu` alike, opens at one width and never narrower than its trigger, so two pickers side by side open alike and one under a short button keeps its rows whole; a `DropdownMenu`'s longer rows widen it, up to the room there is. A menu of actions is as wide as its trigger.
- A `Select` opens its list over the field, the picked item on the value and its words where the value's were, so the choices around it are a short move away. Its rows stand in from the list's edge as a menu's do. `position="popper"` drops the list below the field instead, as a menu drops, where it should leave what is around the field in view.
- A menu item that goes somewhere is a link, a `DropdownMenuItem` with `asChild` around an `a`. A plain click goes there and closes the menu; a click with a modifier, a middle click or a right click is the browser's (a new tab, a window, a download), and the menu stays open. A `FilterMenu` row that goes somewhere is a link the same way, through `rowLink`.
- A submenu's trigger can go somewhere too, a `DropdownMenuSubTrigger` with `asChild` around an `a`, such as **New task** going to a new task in this project and its submenu to one in another. Hovering it or pressing → opens the submenu; a click goes there as a menu item's link does.

### Touch

- On a phone, narrower than `md` (768px) with no fine pointer, a `DropdownMenu`, a `FilterMenu` and a `Select` open as a sheet that rises from the bottom edge, the whole width, rather than beside their trigger, which a thumb would have to reach for and a keyboard would cover. The rows are the same rows. A title bar names the menu, after its content's `aria-label`, a `FilterMenu`'s `listLabel` or the field's label, else the trigger's name; when the trigger shows only a value, such as a sort button reading **Newest**, give the content an `aria-label`. Its close button, a tap on the page above and Escape close it. A tablet, most phones held sideways and a narrow window under a mouse keep the menu beside its trigger, and **Touch** above a preview changes the pointer, not the width. The width is that of the window the menu opens in: in a narrow frame, or a Picture-in-Picture window, under a finger, the sheet rises from that window's bottom edge.
- A submenu takes the sheet's place: its row's words in the title bar, and ‹ before them to go back, as ← and Escape do. A `FilterMenu` row's › half opens its submenu the same way, and its ▾ opens rows kept in place under it (`submenus="inline"`) right there in the sheet. A sheet opened from a toolbar's ⋯ menu takes over from that menu's sheet, and its ‹ hands back.
- Nothing opens on hover. A HoverCard and a Tooltip never appear, so neither may carry the only copy of anything.
- A submenu's filter box takes the focus only when tapped, so the on-screen keyboard does not rise over the rows it filters.
- A tap on a submenu's trigger opens the submenu, even when the trigger is a link: a finger has no hover to open it with. Make the trigger's own place the submenu's first row, so a phone still reaches it.
- A Sheet is the phone's side panel: the site's own navigation on a phone is one. Prefer it over a Popover for anything longer than a field or two, where the on-screen keyboard would cover a Popover.
- A Dialog sits in the middle of the screen with the keyboard below it. Keep it short enough to fit above the keyboard: one or two fields.

## In the demos

- [Releases](/ui/demos/releases/index.md): A row's ⋯ opens a menu and keeps the list in reach; Settings is a sheet from the right edge, and on a phone the places are a sheet from the left.
- [Tasks](/ui/demos/tasks/index.md): Each row's menu has a submenu for the assignee, and hovering an assignee previews them in a HoverCard. New task… opens a Dialog. Below lg, a task's details slide in as a Sheet.
- [Mail](/ui/demos/mail/index.md): On a phone the folders slide in as a Sheet. Labels and More actions are menus, ? opens a Dialog, and Delete forever… a ConfirmDialog. Compose docks in a corner and blocks nothing.
- [Pull request](/ui/demos/pull-request/index.md): Recording, and each artifact on the Checks page, opens in the attachment viewer over the page. Escape closes it.
- [Config editor](/ui/demos/config-editor/index.md): Review changes opens the diff in a Dialog, with the actions that answer it in its footer. Switching files over unsaved edits asks in UnsavedChangesDialog.
- [Binary inspector](/ui/demos/binary-inspector/index.md): Below lg the inspector waits in a Sheet from the bottom bar. Revert… asks in a ConfirmDialog, and opening another file over edits asks in UnsavedChangesDialog.
