Job board

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

Preview

Modal, default variant as designedModal, default variant as designed
Default variant as designed, light modedark modeOpen in Figma

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_Modal - dialogModalModal

Built from

Level checks

Draft · next level blocked by Errors open

The ladder's checks for Modal
CheckLevelResult
AuditedReadyPasses
No errors openReady1 error open
Has a descriptionReadyPasses
Usage and Don't writtenReadyChecked at the next audit
Every layer namedReadyPasses
In codeReadyPasses
No warnings openStableNot yet
Code gen notes writtenStableChecked at the next audit
Auto layout throughoutStableChecked at the next audit
Matches the designStableNot yet

Anatomy

1
Every option switched on: what the component can contain, not how it is usually used
#PartShownComponent
1_Modal - dialogAlways_Modal - dialog

Properties

Modal: each property, its type, values and default
PropertyTypeValuesDefault
BreakpointVariant
mdsm
md

Implementation

What code builds differently from the drawing, and why
FigmaCodeWhy
Header, Footer, inside strokeborder 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 positionposition: absolute in a positioned parentOut of the flow: it neither pushes siblings nor sizes the parent.
Breakpoint: md, smMedia or container queriesOne component responds to its width; the variants are the widths drawn.
Container, set to fill its parent, but capped at 1440pxCap the grid track or the containerOpen 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.

Changes on 9 Nov
ChangeTypeFigma filesCodeDetails
Footer: position · 2 variantsRestyledMinorMinor

Changes on 4 Nov
ChangeTypeFigma filesCodeDetails
Title: text styleRestyledMinorMinor
Button: widthRestyledMinorMinor
Button: position · 2 variantsRestyledMinorMinor
Button#2: widthRestyledMinorMinor
Button#2: position · 2 variantsRestyledMinorMinor
Title: heightRestyledMinorMinor
Title: positionRestyledMinorMinor

Changes on 27 Sept
ChangeTypeFigma filesCodeDetails
DescriptionDocsPatchPatch
Layer HeaderAddedMinorPatch
Layer TitleAddedMinorPatch
Layer Interactive iconAddedMinorPatch
Layer FooterAddedMinorPatch
Layer ButtonAddedMinorPatch
Layer Button#2AddedMinorPatch
Layer ContentAddedMinorPatch
Layer Content slotAddedMinorPatch
_Modal - dialog: overridesRestyledMinorMinor
Title: line heightRestyledMinorMinor

Changes on 23 Sept
ChangeTypeFigma filesCodeDetails
DescriptionDocsPatchPatch
Layer HeaderAddedMinorPatch
Layer TitleAddedMinorPatch
Layer Interactive iconAddedMinorPatch
Layer FooterAddedMinorPatch
Layer ButtonAddedMinorPatch
Layer Button#2AddedMinorPatch
Layer ContentAddedMinorPatch
Layer Content slotAddedMinorPatch
_Modal - dialog: overridesRestyledMinorMinor
Title: line heightRestyledMinorMinor

Changes on 19 Sept
ChangeTypeFigma filesCodeDetails
DescriptionDocsPatchPatch

Changes on 6 Sept
ChangeTypeFigma filesCodeDetails
Header: strokeRestyledMinorMinor
Footer: strokeRestyledMinorMinor

Changes on 1 Sept
ChangeTypeFigma filesCodeDetails
_Modal - dialog: instance of · 2 variantsChangedBreakingMinor
Header: strokeRestyledMinorMinor
Footer: strokeRestyledMinorMinor
_Modal - dialog: props · 2 variantsRestyledMinorMinor

Changes on 25 Aug
ChangeTypeFigma filesCodeDetails
Property BreakpointAddedMinorMinor
VariantsNot gradedNot gradedNot graded

Changes on 21 Aug
ChangeTypeFigma filesCodeDetails
Its values movedRestyledMinorMinor
ComponentAddedMinorMinor