When to use
An overlay opens over the page when a task needs a moment of focus but should not cost people their place: choosing a store before ordering, a request to a business team, the menu filters on a phone, the cookie preview and cart. Everything else stays on the page.
The website has four overlay shapes, all built from the same paper panel:
- Dialog: centred, rounded on every corner. The store chooser on Food & Drink, the For Business contact popups, the cookie preview from md.
- Bottom sheet: meets the bottom edge of a phone, rounded on top. The menu filters, and the cookie preview and cart on phones.
- Drawer: full height on the right. The cookie cart from md.
- Corner card: the Home promo from md, small and without dimming, so the page stays usable.
Feedback never floats. A result appears where the action happened, an empty list explains itself in the space of the list, and a problem says what to do next. The website has no toasts and no loading spinners.
Anatomy
| Part | Rule |
|---|---|
| Surface | paper, ink text, a 1 px ink border. The only edge: no shadow, as everywhere on the site. |
| Corners | Panel radius, 24 px. Sheets keep it on the top corners only; the drawer is square. |
| Title | Lilita One at the display-s size (24 to 28 px), in capitals. An intro under it in body-s when the overlay needs one. |
| Header | Either open (title and intro, 24 px padding, 32 px from md) or ruled: an ink line under the title row. |
| Close | A 44 px circle with a 1 px ink ring and an 18 px X, named for screen readers (Close, Close filters). In the store chooser and the filters sheet it fills with ink on hover. |
| Dimming | night at 60 % behind every modal overlay (the native ::backdrop). |
| Height | At most 92 % of the screen (88 % for the filters sheet). The body scrolls inside. |
Dialogs
Every dialog is the browser’s native modal <dialog>, sized with min(100% - 2rem, width): on a phone it keeps 16 px of page on each side.
| Dialog | Width | Header | Opened from |
|---|---|---|---|
| Store chooser | 560 px | Ruled, 16 px (20 px from md) | Change store and the store gate on Food & Drink |
| For Business contact | 640 px | Open, title and intro | Contact the fleet team, Request a quote and the other team buttons |
| Cookie preview | 960 px from md | Ruled, title and a caption | Preview in the cookie flow and the cart |
The For Business popup remounts its form on every opening, so a sent or failed state never greets the next visitor. Its buttons, Send and Cancel, sit side by side.
Bottom sheets and drawer
Phones and tablets get a sheet wherever desktop shows the same controls in place: the menu filters live in a sidebar from lg and in a sheet below it.
| Part | Rule |
|---|---|
| Header | Title and close over an ink rule: 12 px vertical padding in the filters sheet, 16 px in the cookie sheets and drawer. |
| Body | Scrolls on its own and carries data-lenis-prevent, so smooth scrolling never fights it. Page gutter at the sides on phones, 32 px from md. |
| Footer | Under an ink rule, 16 px padding, and it stays in place. Filters: Show 12 items in ink (it closes the sheet: filters apply as they change) and Clear all outlined, both 48 px. Cart: the totals and Continue to checkout in red, the one primary action. |
| Cookie preview | On phones a sheet at most 92 % tall; from md a 960 px dialog. |
| Cart | On phones a sheet 92 % tall; from md a drawer the height of the screen, at most 480 px wide. |
Corner card
The Home promo opens once per browser session, four seconds after the Home loads, and never during the first render. Escape, the close button and No thanks close it; on phones a tap on the dimmed page does too. Automated browsers do not see it unless the address carries ?popup, so tests and crawlers are never blocked.
Page dimming
| Layer | Value | Motion |
|---|---|---|
| Modal backdrop | night at 60 % | Appears with the dialog, at once. |
| Mega-menu scrim | night at 50 % | Fades in over 300 ms on the expo-out curve, cubic-bezier(0.16, 1, 0.3, 1); out over 200 ms. The panel fades in while moving down 8 px over 400 ms. |
| Photo scrim | night from 80 % to clear, bottom two fifths of the Home slider | The one gradient on the site, under the slider tabs (Graphic System). |
Dimming is always night, never black or ink, and never on a corner card.
Store gate
The store gate is not an overlay, but it does an overlay’s job in place: on a first visit to Food & Drink it asks for a store before the menu loads, without covering anything.
| Part | Rule |
|---|---|
| Band | surface, 1 px ink rules above and below, the small section padding (40 to 48 px). |
| Eyebrow | 16 px map pin and Choose your store. |
| Search | A 56 px field with 16 px corners and a 56 px ink Find stores button with an 18 px search icon. It opens the store chooser filtered by what was typed. |
| Recent | Recent: in caption type and the stores chosen before as 44 px outlined chips that fill with ink on hover. They are read after the page loads, so the first render never shows them. |
Messages
A message replaces or tops the thing it reports on, in a full sentence.
| Message | Fill | Edge | Corners | Padding | Type |
|---|---|---|---|---|---|
| Sent | pastel | none | 24 px | 32 px | Lilita One heading, body |
| Entered | surface | none | 24 px | 20 px | Body L |
| Not sent | surface | none | 24 px | 24 px | Body |
| Error summary | none | 2 px ink | 24 px | 24 px | Lilita One heading, UI links underlined at 2 px |
| Added to cart | surface | none | 16 px | 12 by 16 px | Check icon, UI type |
Field-level errors and every form message are covered on the Forms page.
Empty states
| Part | Rule |
|---|---|
| Panel | surface, 24 px corners, 32 px padding. |
| Heading | Lilita One, display-s. It says what did not match, with the search and filters when there are any. |
| Text | Body type, 12 px under the heading. With a fuel filter on, it names the nearest store with that fuel as a link. |
| Way out | One underlined UI-type button, 44 px tall, 20 px below. |
Site search is the exception: with nothing found it keeps its count line (0 results for “…”) and the closing line that points to the Help Center and Find a Store, with no panel.
Notices and warnings
The warning triangle appears in two places only: this alert (18 px) and the low print quality line under an uploaded cookie photo (14 px, caption type, next to the text Print quality: low. A larger photo will print sharper.). A good photo gets a check instead. There is no red message: red is for the primary action alone.
Loading
The website has no spinners and no skeletons. Waiting is said in words, in place:
Live store status keeps an empty line of its own height until the device clock is read, so nothing shifts when Open 24 hours appears. The cookie order and confirmation pages hold their space (60 % of the screen, marked busy) until the saved order is read.
States
| Overlay | Opens | Closes | Scroll lock |
|---|---|---|---|
| Store chooser | Change store, the store gate | Escape, close, the backdrop, choosing a store | Yes |
| For Business popup | The team button | Escape, close, Cancel, the backdrop | Yes |
| Filters sheet | Filters | Escape, close, the backdrop, Show N items, Clear all | Yes |
| Promo, md and up | Four seconds after the Home loads, once a session | Escape, close, No thanks | No |
| Promo, phone | The same | Also the backdrop | Yes |
| Cookie preview, cart | Preview, the cart button | Escape, close, the backdrop | No; the body is data-lenis-prevent |
| Mega-menu | Hover (after 120 ms) or the chevron | Escape, a click outside, leaving the item (after 220 ms), a route change | No |
Modal overlays appear and disappear at once: there is no slide or fade. Only the mega-menu animates.
Scroll lock. useLockBodyScroll puts overflow: hidden on the root element, not on the body, so the sticky header stays put; it pads the root by the scrollbar’s width so the layout does not jump on desktop browsers with classic scrollbars, and it pauses Lenis smooth scrolling with stopSmoothScroll() until the overlay closes. Any panel that scrolls on its own carries data-lenis-prevent.
Sizes
| Element | Measure |
|---|---|
| Close button | 44 px circle, 18 px icon |
| Store chooser | At most 560 px wide |
| For Business popup | At most 640 px wide |
| Promo | 380 px corner card from md; at most 448 px on phones |
| Filters sheet | Full width on phones, at most 640 px from md, at most 88 % tall |
| Cookie preview | Full-width sheet on phones, 960 px dialog from md, at most 92 % tall |
| Cart | Full-width sheet 92 % tall on phones, 480 px full-height drawer from md |
| Buttons inside overlays | 48 px in the filters sheet, the store chooser and the cookie dialogs; 44 px in the promo form, the cart alert and the For Business popup (its submit grows to 48 px from lg) |
| Phone margin | 16 px each side for every centred dialog |
Usage
- Stack only within one task. The cookie preview may open over the cart, because it previews a line of that cart. Nothing else opens over an overlay.
- Always a way out. Escape and a visible close button, plus Cancel or No thanks where there is a form.
- Red stays on the action. Inside an overlay the primary button is ink, except the cart checkout, which is the page’s one red action.
- Say it in place. Results, errors and confirmations appear where the action happened, in full sentences.
Accessibility
- Dialogs and sheets are native modal
<dialog>elements: the rest of the page is inert while they are open, Escape closes them, and focus returns to the button that opened them. Each is named by its title (aria-labelledby) and the For Business popup also by its intro. - Opening buttons say what they open (
aria-haspopup="dialog"on the business buttons and Find stores). - The promo card from md is non-modal, so the page stays usable; Escape still closes it.
- Successes and quiet updates are status messages; failures, the error summary and the pickup warning are alerts. After a submit, focus moves to the summary or the result.
- Result counts (3 stores near you) are polite live regions, so filtering is announced without moving focus.
- Close buttons and every action inside overlays are at least 44 px. Nothing depends on animation: under reduced motion the mega-menu panel no longer moves and its chevron turns at once.
Source
- Website
-
components/locations/StoreChooserDialog.tsxcomponents/locations/StoreChooser.tsxcomponents/forms/BusinessFormDialog.tsxcomponents/forms/BusinessForm.tsxcomponents/sections/MenuFilterSheet.tsxcomponents/sections/HomePromoPopup.tsxcomponents/custom-cookies/CookieDialogs.tsxcomponents/navigation/MegaMenuItem.tsxcomponents/sections/StoreGate.tsxcomponents/locations/StoreFinder.tsxcomponents/locations/LocationsExplorer.tsxcomponents/sections/SearchResults.tsxhooks/useLockBodyScroll.tslib/smooth-scroll.ts