Bottom sheet
The phone container of a dialog: a modal panel that rises from the bottom edge for one small job, below 768px.
When to use
- Below 768px, for everything a dialog holds from 768px: one question, one small form, a destructive confirm, a short piece of information. The content is the same; only the container changes (D-CSN-22).
- For tall phone tasks that still belong on the page they start from, such as the listing's filters ("Filters" opens a sheet that grows to 90dvh with "Show {n} results"; canonical §11 row 4).
- For a popover's content below 640px (D-CSN-23).
When not to use
- From 768px: use the dialog, or write the responsive modal (
.oa-modal, dialog.md), which is a bottom sheet below 768px and a dialog from 768px. - Navigation and the admin drawer on phones: the side sheet.
- A confirmation after the fact: the snackbar.
- A task that needs more than about three fields or a long scroll: a page (canonical §10.19).
Anatomy
- Scrim: black at 32%,
--color-scrim, as for dialogs. - Container (
.oa-sheet):surface-raised,shadow-elevation-3, a transparent 1px edge; the two top cornersrounded-sheet(28px), the bottom square because it touches the screen edge (D-SEM-05). - Handle (
.oa-sheet__handle): a 32 × 4px pill inoutlineat 40%, 16px from the top, centered,[aria-hidden="true"]. It is decoration unless the product builds swipe-to-dismiss. - Header: the dialog's parts. Title (
.oa-dialog__title,headline-sm), description (.oa-dialog__desc,body-md,on-surface-variant), close button (.oa-dialog__close, 48px, 8px from the top and the inline end). - Body (
.oa-dialog__body): scrolls when the content is taller than the sheet. - Action row (
.oa-dialog__actionswith.oa-actions.oa-actions--sheet): both buttons lg (56px), sharing the width, Cancel outlined, 8px apart.
Variants
| Variant | Use for | Key classes and tokens |
|---|---|---|
| Form | A one-field edit or a small form on a phone | <form class="oa-dialog__body">; "Cancel" outlined lg + "Save" filled lg with the check icon |
| Confirm destructive | An action that cannot be undone | [role="alertdialog"]; "Cancel" outlined lg + the verb on .oa-btn--danger lg |
| Information | Something to read, then one button | one filled lg button ("Done") at the full width |
| Tall content | Filters and lists that need the height | the same sheet; it stops at 90dvh and the body scrolls |
| Responsive modal | Content that opens at every width | .oa-modal (dialog.md) |
Sizes
| Part | Size | Token |
|---|---|---|
| Width | the window, at most 560px, centered | --container-dialog (max-w-dialog) |
| Height | its content, at most 90% of the window | max-h-[90dvh] (canonical §4.10) |
| Padding | 36px at the top (16px to the handle, the 4px handle, 16px under it), 24px at the sides, 24px plus the bottom safe area at the end | --space-4, --space-card-medium, --oa-safe-bottom (env(safe-area-inset-bottom) in Tailwind) |
| Handle | 32 × 4px, 16px from the top | component constants (D-ARC-24) |
| Gaps | 24px between header, body, and actions; 8px between title and description | --space-stack-loose, --space-stack-tight |
| Buttons | lg, 56px, each taking half of the row (flex: 1) |
--size-button-lg |
| Close button | 48 × 48px, 24px icon, 8px from the top and inline end | --size-button-md, --size-icon-lg, --space-2 |
Tokens
| Part | Property | Token (CSS · Tailwind) |
|---|---|---|
| Container | background, text | --color-surface-raised · bg-surface-raised; --color-on-surface |
| Container | shadow, edge | --shadow-elevation-3; 1px transparent, none at the bottom |
| Container | corners | --radius-sheet on the top corners · rounded-t-sheet |
| Container | layer | --z-modal · z-50; a native modal sits in the top layer |
| Handle | color, shape | --color-outline at 40% · bg-outline/40; --radius-full · rounded-full |
| Scrim | background | --color-scrim · bg-scrim |
| Title, description | type and color | --text-headline-sm, --color-on-surface; --text-body-md, --color-on-surface-variant |
| Motion | enter | translate: 0 100% to 0 over --duration-short-4 with --ease-emphasized |
| Motion | exit | back down over --duration-short-3 with --ease-emphasized-accelerate |
States
| State | What changes |
|---|---|
| Opening | Slides up from below the screen over duration-short-4 with ease-emphasized; the scrim fades in over duration-short-3 (D-SEM-16). |
| Open | Focus inside and held; the page inert and still. |
| Closing | Slides down over duration-short-3 with ease-emphasized-accelerate; focus returns to the opener. |
| Busy | The main button shows "Saving…" with a spinner and takes [aria-busy="true"] and [aria-disabled="true"]; Cancel stays (D-CAI-06). |
| Error | Field errors in the form; a server problem as an error banner above the actions (role="alert"). |
| Dragged (only if swipe is built) | The sheet follows the finger; released past the product's threshold it closes, otherwise it settles back. Nothing else changes. |
Behavior
- Modal, exactly as the dialog: a native
<dialog class="oa-sheet">opened withshowModal(), or Radix Dialog; the scrim, the inert page, and Escape come with it. The script contract is in dialog.md. - Initial focus: the first field (form), Cancel (destructive), the main button (information), marked with
autofocus(canonical §10.19). - Ways out: Escape (a hardware keyboard), a press on the scrim, the close button, and Cancel. Focus returns to the opener.
- Swipe-to-dismiss is optional and never the only way out: Cancel and the close button stay, so a single tap does the same thing (WCAG 2.5.7, D-CSN-22).
- The body scrolls inside the sheet; forms on phones never sit in a fixed-height box (canonical §4.10). The bottom padding includes the bottom inset (
--oa-safe-bottom), so the buttons clear the home indicator. - On-screen keyboard. Where the keyboard covers the page instead of resizing it (iOS, WKWebView, Capacitor with resize mode
none), a product script sets--oa-keyboard-inseton<html>from the visual viewport; the sheet then sits on top of the keyboard and its height shrinks by the same amount, so the focused field and the buttons stay in view (D-APP-36; the script is in Layout: keyboard, focus, and scrolling). Without the script the property is 0 and nothing changes. - The width rule: below 768px a sheet, from 768px a dialog. Products choose the container when they open it (Global ID's
useIsWide), or write.oa-modaland let CSS switch it. - Reduced motion: the sheet appears and leaves at once (D-SEM-21).
Accessibility
- Role and names as the dialog:
<dialog>(or[role="alertdialog"]for a destructive confirm),[aria-labelledby]to the title,[aria-describedby]to the description. - The handle is
[aria-hidden="true"]and not focusable; it is not a control. - Dragging (if built) always has a single-pointer alternative: Cancel or Close (WCAG 2.5.7).
- Targets: 56px buttons and the 48px close button (D-LAY-12).
- Contrast on
surface-raisedas for dialogs:on-surface17.12:1 light and 11.10:1 dark; the outlined Cancel's edge (outline) 4.51:1 and 4.53:1 against the sheet (tokens/contrast.md). - Focus stays inside; the ring is the global one.
RTL and languages
- The header mirrors: the close button at the top left in Arabic. The two buttons share the row; Cancel comes first, at the inline start (the right in Arabic) (D-BCP-30).
- Arabic titles in
headline-smat line height 1.6; descriptions at 1.75 (D-TYP-14). - French runs about 26% longer overall and up to 32% for short labels. When "Annuler" and "Se déconnecter" do not fit side by side, the row wraps and each button takes the full width; labels never truncate (D-TYP-15).
- In French write U+00A0 before ":" and inside « », and U+202F before ";", "!", and "?" (D-TYP-15). Product names stay in Latin, never translated, inside
<bdi lang="en" translate="no">so they never break across lines (D-BCP-03).
Content
The dialog's rules (dialog.md): a title that names the thing, one or two sentences, verb-first buttons from the glossary, a destructive verb repeated from the question.
| Type | English | Arabic | French |
|---|---|---|---|
| Form (Global ID) | "Change your personal email" · "We’ll send a link to confirm it." · "Cancel" + "Save" | "غيّر بريدك الإلكتروني الشخصي" · "إلغاء" + "حفظ" | "Modifier votre adresse e-mail personnelle" · "Annuler" + "Enregistrer" |
| Confirm destructive (Global ID) | "Sign out of Global ID on this phone?" · "Your pass turns off on this phone, and what Global ID keeps here is cleared. Sign in again to use it here." · "Sign out" | "تسجيل الخروج من Global ID على هذا الهاتف؟" | "Se déconnecter de Global ID sur ce téléphone ?" |
| Confirm destructive (Global ID) | "Sign out everywhere else?" · "You’ll stay signed in on this device. Your other devices will have to sign in again." | "هل تريد تسجيل الخروج من كل مكان آخر؟" | "Se déconnecter partout ailleurs ?" |
Do and don't
- Do give both buttons half of the row at 56px. Don't shrink them to 48px or push them to one side on a phone.
- Do keep Cancel and the close button even when the sheet can be swiped. Don't make swiping the only way out.
- Do let the body scroll inside the sheet. Don't let the sheet grow past 90dvh or hide its buttons under the home indicator.
- Do use the same title and words as the dialog version. Don't write a second copy for phones.
Code
HTML (reference CSS)
The snippet's examples (reference/snippets/overlays.html). The .oa-scrim--demo frame and the [open] attribute are for documentation only: in a product, open the <dialog> with showModal() and add autofocus to the element that takes focus first.
Form:
<div class="oa-scrim oa-scrim--demo">
<dialog class="oa-sheet" open aria-labelledby="ov-email-title" aria-describedby="ov-email-desc">
<span class="oa-sheet__handle" aria-hidden="true"></span>
<div class="oa-dialog__header">
<h2 class="oa-dialog__title" id="ov-email-title">Change your personal email</h2>
<p class="oa-dialog__desc" id="ov-email-desc">We use it to help you get back in if you ever lose access. We’ll send a link to confirm it.</p>
<button class="oa-icon-btn oa-dialog__close" type="button" aria-label="Close">
<span class="oa-icon" aria-hidden="true" translate="no">close</span>
</button>
</div>
<form class="oa-dialog__body" id="ov-email-form" novalidate>
<div class="oa-field">
<label class="oa-field__label" for="ov-email-input">Personal email</label>
<div class="oa-field__control">
<input class="oa-field__input" id="ov-email-input" name="personal_email" type="email" inputmode="email" autocomplete="email" dir="ltr" value="name@example.com">
</div>
</div>
</form>
<div class="oa-dialog__actions oa-actions oa-actions--sheet">
<button class="oa-btn oa-btn--outlined oa-btn--lg" type="button">Cancel</button>
<button class="oa-btn oa-btn--filled oa-btn--lg" type="submit" form="ov-email-form">
<span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">check</span>
<span class="oa-btn__label">Save</span>
</button>
</div>
</dialog>
</div>Confirm destructive:
<div class="oa-scrim oa-scrim--demo">
<dialog class="oa-sheet" role="alertdialog" open aria-labelledby="ov-phone-title" aria-describedby="ov-phone-desc">
<span class="oa-sheet__handle" aria-hidden="true"></span>
<div class="oa-dialog__header">
<h2 class="oa-dialog__title" id="ov-phone-title">Sign out of <bdi lang="en" translate="no">Global ID</bdi> on this phone?</h2>
<p class="oa-dialog__desc" id="ov-phone-desc">Your pass turns off on this phone, and what <bdi lang="en" translate="no">Global ID</bdi> keeps here is cleared. Sign in again to use it here.</p>
<button class="oa-icon-btn oa-dialog__close" type="button" aria-label="Close">
<span class="oa-icon" aria-hidden="true" translate="no">close</span>
</button>
</div>
<div class="oa-dialog__actions oa-actions oa-actions--sheet">
<button class="oa-btn oa-btn--outlined oa-btn--lg" type="button">Cancel</button>
<button class="oa-btn oa-btn--danger oa-btn--lg" type="button">Sign out</button>
</div>
</dialog>
</div>French, where the two labels share the row until they no longer fit:
<div class="oa-scrim oa-scrim--demo">
<dialog class="oa-sheet" role="alertdialog" open aria-labelledby="ov-phone-fr-title" aria-describedby="ov-phone-fr-desc">
<span class="oa-sheet__handle" aria-hidden="true"></span>
<div class="oa-dialog__header">
<h2 class="oa-dialog__title" id="ov-phone-fr-title">Se déconnecter de <bdi lang="en" translate="no">Global ID</bdi> sur ce téléphone ?</h2>
<p class="oa-dialog__desc" id="ov-phone-fr-desc">Votre pass est désactivé sur ce téléphone, et ce que <bdi lang="en" translate="no">Global ID</bdi> y conserve est effacé. Reconnectez-vous pour l’utiliser ici.</p>
<button class="oa-icon-btn oa-dialog__close" type="button" aria-label="Fermer">
<span class="oa-icon" aria-hidden="true" translate="no">close</span>
</button>
</div>
<div class="oa-dialog__actions oa-actions oa-actions--sheet">
<button class="oa-btn oa-btn--outlined oa-btn--lg" type="button">Annuler</button>
<button class="oa-btn oa-btn--danger oa-btn--lg" type="button">Se déconnecter</button>
</div>
</dialog>
</div>Arabic, on a page with <html lang="ar" dir="rtl">:
<div class="oa-scrim oa-scrim--demo">
<dialog class="oa-sheet" role="alertdialog" open aria-labelledby="ov-everywhere-title" aria-describedby="ov-everywhere-desc">
<span class="oa-sheet__handle" aria-hidden="true"></span>
<div class="oa-dialog__header">
<h2 class="oa-dialog__title" id="ov-everywhere-title">هل تريد تسجيل الخروج من كل مكان آخر؟</h2>
<p class="oa-dialog__desc" id="ov-everywhere-desc">ستبقى مسجّل الدخول على هذا الجهاز. على أجهزتك الأخرى أن تسجّل الدخول من جديد.</p>
<button class="oa-icon-btn oa-dialog__close" type="button" aria-label="إغلاق">
<span class="oa-icon" aria-hidden="true" translate="no">close</span>
</button>
</div>
<div class="oa-dialog__actions oa-actions oa-actions--sheet">
<button class="oa-btn oa-btn--outlined oa-btn--lg" type="button">إلغاء</button>
<button class="oa-btn oa-btn--danger oa-btn--lg" type="button">تسجيل الخروج</button>
</div>
</dialog>
</div>Tailwind CSS v4
<!-- Dialog.Content as a bottom sheet; the overlay is the dialog's (bg-scrim) -->
<div class="fixed inset-x-0 bottom-0 z-50 mx-auto flex h-fit max-h-[90dvh] w-full max-w-dialog flex-col gap-stack-loose overflow-auto overscroll-contain rounded-t-sheet border border-b-0 border-transparent bg-surface-raised px-card-medium pt-9 pb-[calc(var(--space-card-medium)+env(safe-area-inset-bottom))] text-on-surface shadow-elevation-3 transition-[translate] duration-short-4 ease-emphasized starting:translate-y-full">
<span class="absolute inset-x-0 top-4 mx-auto h-1 w-8 rounded-full bg-outline/40" aria-hidden="true"></span>
<div class="flex flex-col gap-stack-tight pe-10">
<h2 class="text-headline-sm text-on-surface">Sign out of <bdi lang="en" translate="no" class="whitespace-nowrap">Global ID</bdi> on this phone?</h2>
<p class="text-body-md text-on-surface-variant">Your pass turns off on this phone, and what <bdi lang="en" translate="no" class="whitespace-nowrap">Global ID</bdi> keeps here is cleared. Sign in again to use it here.</p>
</div>
<div class="flex flex-none flex-wrap items-center justify-end gap-2">
<!-- Cancel (outlined, lg) and Sign out (danger, lg), each with flex-1 -->
</div>
</div>The close button is the icon-button recipe with absolute top-2 end-2. The product name takes whitespace-nowrap on its <bdi> here; the reference CSS gives every <bdi translate="no"> the same rule. The exit slide needs the content to stay mounted while it runs (see dialog.md).
React
Global ID's BottomSheet takes the dialog's props (Dialog and BottomSheet share ModalProps); FormModal, ConfirmModal, and InfoModal choose between them with useIsWide(), so product code rarely names the sheet.
| Prop | Type | Default | Description |
|---|---|---|---|
open |
boolean |
required | Keep it mounted and flip this; focus returns to the opener on close. |
onOpenChange |
(open: boolean) => void |
required | Called with false on Escape, a scrim press, Close, and Cancel. |
title |
string |
required | The sheet's name. |
description |
string |
none | One or two sentences. |
children |
ReactNode |
none | The body. |
actions |
ReactNode |
none | Two lg buttons with flex-1: Cancel outlined, then the main one. |
closeLabel |
string |
required | The close button's name and tooltip ("Close"). Added in 1.0.0 (ID-2.06). |
const wide = useIsWide() // (min-width: 768px)
const Modal = wide ? Dialog : BottomSheet
<Modal open={open} onOpenChange={setOpen} title={copy.title} description={copy.help} closeLabel={t('close')}
actions={<>
<Button variant={wide ? 'text' : 'outlined'} size={wide ? 'md' : 'lg'} className={wide ? undefined : 'flex-1'} onClick={close}>{t('cancel')}</Button>
<Button type="submit" form={formId} icon="check" size={wide ? 'md' : 'lg'} className={wide ? undefined : 'flex-1'}>{t('save')}</Button>
</>}>
<SingleFieldForm id={formId} />
</Modal>