Skip to content
Component passports token-kit

Modal

Modal on native dialog. showModal() for top-layer + focus trap; Escape and backdrop close; focus returns to the opener. Enter/exit motion is CSS on --tk-motion-enter / exit (see modal.css).

Evidence

What the kit's own checks measured on this component, from their committed records. A result is what was found, not a certificate.

CheckWhat it measuresResultWhen
Controlsevery prop reachable from a story's controls10 stories opened; none flagged2026-11-28
Radiuscorner radii from the kit's scale only10 stories opened; none flagged2026-11-28
Attributesonly valid data-tk attributes and values10 stories opened; none flagged2026-11-28
Titleseach story has a heading and a title10 stories opened; none flagged2026-11-28
Accessibility (axe)axe-core on each story, at desktop and phone width10 stories opened; none flagged2026-11-28
Reflow at 320pxeach story at 320px wide: no sideways scroll10 stories opened; none flagged2026-11-28
Forced colourseach story in Windows high contrast10 stories opened; none flagged2026-11-28
Reduced motioneach story with reduced motion: nothing keeps moving10 stories opened; none flagged2026-11-28
Events (what it reports)each event its contract declares, triggered and checked; nothing undeclared, no vendor called2 of 2 declared events arrive as declared2026-11-28
Right to lefteach story set right to left: nothing pushed off the page10 stories opened; none flagged2026-11-28
Text 40% longerevery text made about 40% longer: no words cut, no sideways scroll10 stories opened; none flagged2026-11-28
Keyboard (its contract's keys)each key its contract promises, pressed on a fresh story2 keys pressed; each does what the contract says2026-11-28
Design matches codethe Figma component laid over the rendered code, per skinModal: mean Δ 5.63, worst 6.94 over 3 skins; ModalDescription: mean Δ 3.15, worst 3.15 over 1 skin2026-10-19
Figmawhere it is drawn in the Figma library2 components in the library; Code Connect linked; 7 Figma properties paired or decided
Tokensthe tk slots its CSS readsreads 30 tk slots

Not checked yet

Props

PropTypeRequiredIn Figma
openbooleanyesnot drawn
onCloseeventyesnot drawn
titletextyesModal.Title
descriptioncontentnoModal.Description
alertbooleannonot drawn
childrencontentnoModal.Body
actionsothernonot drawn
footercontentnoModal.Show footer
closeOnBackdropbooleannonot drawn
dismissiblebooleannoModal.Dismissible
sizesm | md | lgnoModal.Size
returnFocusToothernonot drawn

Figma properties no prop takes

Keyboard and screen readers

What it reports

The kit sends nothing anywhere: a component dispatches one DOM event, tk:event, and only a page that listens forwards it. Never sent: typed text, an option's label or value, names, emails.

Tokens it reads

control-min, duration-base, focus-offset, focus-width, leading-tight, line-default, measure, measure-dialog-lg, measure-dialog-md, measure-dialog-sm, motion-enter, motion-exit, radius-nested, radius-xl, scrim-ink, shadow-lg, size-base, size-sm, size-xl, space-1, space-2, space-3, space-4, space-5, space-6, surface-raised, text-primary, text-secondary, tracking-snug, weight-semibold