Menu
Esc
DocsGitHub TR

Components

Modal

A dialog in the middle of the page, over a dimmed overlay: a confirmation, a short form, a message that needs an answer.

Open in Figma

Playground

Delete project

The project and its files are removed for everyone.

You can restore it from the trash for 30 days.

Figma variant

👕 Size=Medium
Footer=True
.Modal Header › Description=True

Sizes

Small, Medium and Large follow the modal size tokens: 433, 657 and 1105px on desktop, the full width minus a margin on mobile. The header has the title, an optional description and the close button; the footer holds the actions, the main one last.

Tokens

PartToken
Width--modal-small-size / --modal-medium-size / --modal-large-size
Surface--color-surface-level-1
Overlay--color-component-modal-overlay
Shadow--shadow-depth-xl
Radius--radius-card
Padding--space-modal (body top: --space-modal-horizontal)
Title / description--text-ui-page-title / --text-ui-text-regular

Figma to code

FigmaReact
👕 Size = Small / Medium / Largesize='small' / 'medium' / 'large'
.Modal Header › Titletitle="…"
.Modal Header › Descriptiondescription="…"
Footer (.Modal Footer)footer={<>…</>}
Body › Contentchildren