Modal
A modal is the overlay a page opens for a task that interrupts it — the job filters on a phone and the contact form. It dims the page and centres a \_Modal - dialog; Breakpoint (md, sm) matches the page.
- Design
- Finished
- Level
- Draft
- Audit
- 2 open findingsat the audit of
- Last changed
- Resources
- Figma Propose a change
Preview


Usage
Do
- Use for a task the reader completes and returns from — "Filter jobs", "Contact us"
- Set the title, the content and the buttons on the nested \_Modal - dialog
- Give it one Primary action and at most one Secondary
Don't
- Use for a message that needs no decision: use Empty state in place
- Open one modal from another
- Remove the close control
Behaviour
- Breakpoint=sm fills the phone width; md centres the dialog over the page
Composition
- Contains \_Modal - dialog, which carries the title, the content and the actions
- Contains Interactive icon with x for closing, and Button for the actions, both through the dialog
Accessibility
Follows the WAI-ARIA dialog modal pattern: roles, keyboard and focus behaviour.
Dependencies in Figma
Built from
- _Modal - dialog · brings Interactive icon, Button
Level checks
Draft · next level blocked by Errors open
| Check | Level | Result |
|---|---|---|
| Audited | Ready | Passes |
| No errors open | Ready | 1 error open |
| Has a description | Ready | Passes |
| Usage and Don't written | Ready | Checked at the next audit |
| Every layer named | Ready | Passes |
| In code | Ready | Passes |
| No warnings open | Stable | Not yet |
| Code gen notes written | Stable | Checked at the next audit |
| Auto layout throughout | Stable | Checked at the next audit |
| Matches the design | Stable | Not yet |
Anatomy
| # | Part | Shown | Component |
|---|---|---|---|
| 1 | _Modal - dialog | Always | _Modal - dialog |
Properties
| Property | Type | Values | Default |
|---|---|---|---|
| Breakpoint | Variant | mdsm | md |
Implementation
| Figma | Code | Why |
|---|---|---|
| Header, Footer, inside stroke | border with box-sizing: border-box and padding less the stroke, or box-shadow: inset 0 0 0 <width> | Figma's inside stroke takes no space; a border does. |
| Header, Footer, absolute position | position: absolute in a positioned parent | Out of the flow: it neither pushes siblings nor sizes the parent. |
Breakpoint: md, sm | Media or container queries | One component responds to its width; the variants are the widths drawn. |
| Container, set to fill its parent, but capped at 1440px | Cap the grid track or the container | Open with the designer, who may instead: say in the description that the cap belongs to the container, not this layer — otherwise the build puts the limit in the wrong place and the layer stops stretching. |
Design and code
Not measured · last run
No parity mapping yet, and no reason recorded.
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Footer: position · 2 variants | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Title: text style | Restyled | Minor | Minor | |
| Button: width | Restyled | Minor | Minor | |
| Button: position · 2 variants | Restyled | Minor | Minor | |
| Button#2: width | Restyled | Minor | Minor | |
| Button#2: position · 2 variants | Restyled | Minor | Minor | |
| Title: height | Restyled | Minor | Minor | |
| Title: position | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Description | Docs | Patch | Patch | |
| Layer Header | Added | Minor | Patch | |
| Layer Title | Added | Minor | Patch | |
| Layer Interactive icon | Added | Minor | Patch | |
| Layer Footer | Added | Minor | Patch | |
| Layer Button | Added | Minor | Patch | |
| Layer Button#2 | Added | Minor | Patch | |
| Layer Content | Added | Minor | Patch | |
| Layer Content slot | Added | Minor | Patch | |
| _Modal - dialog: overrides | Restyled | Minor | Minor | |
| Title: line height | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Description | Docs | Patch | Patch | |
| Layer Header | Added | Minor | Patch | |
| Layer Title | Added | Minor | Patch | |
| Layer Interactive icon | Added | Minor | Patch | |
| Layer Footer | Added | Minor | Patch | |
| Layer Button | Added | Minor | Patch | |
| Layer Button#2 | Added | Minor | Patch | |
| Layer Content | Added | Minor | Patch | |
| Layer Content slot | Added | Minor | Patch | |
| _Modal - dialog: overrides | Restyled | Minor | Minor | |
| Title: line height | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Description | Docs | Patch | Patch |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Header: stroke | Restyled | Minor | Minor | |
| Footer: stroke | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| _Modal - dialog: instance of · 2 variants | Changed | Breaking | Minor | |
| Header: stroke | Restyled | Minor | Minor | |
| Footer: stroke | Restyled | Minor | Minor | |
| _Modal - dialog: props · 2 variants | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Property Breakpoint | Added | Minor | Minor | |
| Variants | Not graded | Not graded | Not graded |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Its values moved | Restyled | Minor | Minor | |
| Component | Added | Minor | Minor |