Skip to content

Modal

ReleasedShipped in 0.3.0StorybookFigma canvas 57:1650Source
  • Use type dialog to confirm an action before it happens, such as “Remove Luis Correia?”, or for a short task that must finish before going back, such as an invite.
  • Use tone destructive when the action deletes or can’t be undone; show what changes in the content rows, such as “Can be undone: No”.
  • Use type sheet on mobile for filters, pickers and short choices that slide up from the bottom.

3 more lines in use_when in src/components/Modal/Modal.intent.json (items 4 to 6) are Figma’s Best Practice lines, word for word. They are listed once, under “Best practice” below.

  • Centred on a color/bg/overlay backdrop (the OnOverlay story); on screen, opened from a Button as a native modal dialog (the Open* stories).
  • For information people should read while they keep working: show it on the page, or in a toast.
    The Figma page names no alternative.
  • For long forms or anything with more than one step: use a page with Stepper.
    Instead: Stepper
  • Open a modal from another modal.
    The Figma page names no alternative.

Open item: no alternative named for items 1 and 3. Those items have an empty instead in Modal.intent.json. The Figma page names no Horizon component for them: “show it on the page, or in a toast” names a pattern, and “Open a modal from another modal” names none. This page shows “The Figma page names no alternative” and does not fill the gap.

From the release review, under “Warnings”, as written:

C2: two dont_use_when entries have an empty instead: “For information people should read while they keep working: show it on the page, or in a toast.” and “Open a modal from another modal.” Figma names no Horizon component for either.

Not enforced in code. Item 3 is Figma’s wording, kept in Modal.intent.json. Modal.tsx has no nesting guard: each <Modal open> calls showModal() on its own element (Modal.tsx:115), so two open Modals are not prevented. Treat it as guidance for the person using the component.

From the release review, under “Warnings”, as written:

“Open a modal from another modal” is not enforced in code (see above).

From the Figma documentation page (usage node 244:154), as written. Modal.intent.json carries these same lines as items 4 to 6 of use_when, word for word; they are listed here once.

  • Ask a question in the title and name the thing, such as “Remove Luis Correia?”, and put the result of the action on the main button, such as “Remove admin”, not “OK”.
  • Always give a way out: Cancel, the close ×, the Escape key and a click on the backdrop.
  • Place the dialog in the centre on a color/bg/overlay backdrop; place the sheet at the bottom, full width.
Property Value What it is for
type dialog confirm an action before it happens, such as “Remove Luis Correia?”, or for a short task that must finish before going back, such as an invite
type sheet on mobile for filters, pickers and short choices that slide up from the bottom
tone default Figma doesn’t say.
tone destructive when the action deletes or can’t be undone; show what changes in the content rows, such as “Can be undone: No”

Open item: nothing for tone default. variant_intent.default is empty in Modal.intent.json because the Figma page says nothing about when to use the default tone; the other three values take their text from the Figma usage lines. This page does not write one.

From the release review, under “Warnings”, as written:

variant_intent.default is empty. Figma gap.

The 2026-10-07 ruling leaves these to a human (“Not ruled”). They are open items, not waived.

Close target. The close × is 20px wide and 20px high (Modal.css:124, Modal.css:125), below the 24px minimum of WCAG 2.2 AA (success criterion 2.5.8). The size is a Figma value the 2026-10-07 ruling accepts for the stylesheet gate; the ruling does not cover the accessibility shortfall.

From the release review, under “Warnings”, as written:

Close target is 20x20 px (Modal.css:124-125), under the 24x24 px minimum of WCAG 2.2 AA success criterion 2.5.8. The size itself is accepted for gate 2 by the ruling, but the accessibility shortfall is not. [designer, then engineer; a human settles]

Initial focus. Modal.tsx sets no autoFocus and calls no focus(), so initial focus is left to the browser’s showModal() (Modal.tsx:115); QA and the release review record it landing on the close ×. For the destructive tone, focus on Cancel is the usual practice. Figma draws no focus behaviour.

From the release review, under “Warnings”, as written:

Initial focus lands on the close button. For the destructive tone, focusing Cancel first is the usual practice, so a stray Enter or Space does not confirm a deletion. Figma draws no focus behaviour. [designer to specify, then engineer]

No alertdialog role. The root is a plain <dialog> for both tones; alertdialog appears nowhere in Modal.tsx.

From the release review, under “Warnings”, as written:

No role=“alertdialog” for the destructive tone. The root is a plain <dialog> for both tones (Modal.tsx:120). [designer and engineer]

The title is not a heading. It is a <p> (Modal.tsx:160), named through aria-labelledby, so it is not in the page’s heading outline.

From the release review, under “Warnings”, as written:

The title is a <p> (Modal.tsx:160), named through aria-labelledby, not a heading, so it is not in the page’s heading outline. [engineer]

Not tested. The Tab focus trap, the real Escape key, a real backdrop click and screen-reader output were never tested: QA had no real input and no screen reader, and the release review had no browser. The facts above that describe them cite the code that should produce them; they are not evidence of the behaviour.

From the release review, under “Warnings”, as written:

Unverified accessibility behaviour: Tab focus trap, real Escape key, real backdrop click, screen-reader output. Not tested by QA, not testable here. The a11y entries that describe them cite correct code but are not evidence of behaviour. A human or a session with real input should test them. [qa, with real input]

The stories compose Modal with: Button.

From the code. Modal.tsx is built from ButtonGroup: it imports it (Modal.tsx:4) and renders <ButtonGroup> for the actions (Modal.tsx:192), and the registry’s Composes column records it. pairs_with in Modal.intent.json lists only Button, which the stories show as the opener beside the modal (Modal.stories.tsx:106), not inside it. No story renders ButtonGroup on its own next to Modal; it appears only through Modal. This page states the composition and does not assert a pairing that the stories do not show.

From the release review, under “Warnings”, as written:

pairs_with omits ButtonGroup, which Modal composes and the board records.

From Versioning (VERSIONING.md at b9ffb76):

0.3.0 adds six components on top of 0.2.1: Calendar, Card, Form, Modal, SideBar and Table. It contains twenty-three components, each exported from the package root with its props type: Avatar, Breadcrumbs, Button, ButtonGroup, Calendar, Card, Checkbox, Chip, Dropdown, File, Form, Header, Image, Link, Logo, Modal, ProgressBar, RadioCard, SearchBar, SideBar, Stepper, Table, Toggle. Textfield is exported from the package root as well, with TextfieldProps and TextfieldState, and is public like the others (see decisions.md, 2026-10-07, Textfield). It commits you to their props, prop values and defaults, their hz- class names, the tokens in tokens.css and the three entry points (., ./styles.css, ./tokens.css). Everything in 0.3.0 beyond 0.2.1 is an addition: nothing from 0.2.1 was changed, removed or renamed. A change that breaks any of these on 0.x bumps the version to 0.4.0.

Two things about this release are worth knowing:

  • Form, Modal and Table each passed release review with their literal sizes covered by a ruling in decisions.md (Card, SideBar and Calendar have their own), because no size tokens exist for them. Those literals are accepted until the designer adds matching tokens, so a later change to use tokens at the same rendered sizes would be a patch, not a breaking change.
  • Dark theme is not verified for Table, and its warning tag has low contrast. The Table docs page says so. Neither is a breaking-change risk, but a fix that changes a token’s value is a patch and is listed in the changelog.