Modal — component.modal
Dialog mit Backdrop (surface.backdrop + layer.modal) — Schließen über X, Backdrop-Klick und Escape; inline-Modus für Demo/Builder; Icon-Ordner mit bearbeitbarem Titel und App-Raster; v1.4 (opt-in): source file = Dateivorschau (PDF, Bild, Text) des Auslöser-Links; v1.5 (opt-in): Inhalt aus der Seite
Beispiele
Dialog mit Footer (inline-Darstellung; X klickbar → schließt)
Der Auftrag 4711 wird unwiderruflich gelöscht.
Nicht umkehrbarRückfrage (confirm) mit Begründung, Ton Gefahr
Die Buchung wird storniert und der Gast per E-Mail informiert.
Großer Dialog mit Formular
1.26: Dialog mit Adresse beim Schließen (closeHref) und festem Titel (triggerTitle explicit)
Eigenschaften
| Prop | Typ | Default |
|---|---|---|
triggerSelector | string | "" |
title * | string | — |
open | boolean | false |
size | string: sm | md | lg | xl | "md" |
inline | boolean | false |
tone | string: default | danger | "default" |
scrollBody | boolean | false |
trigger | string | "" |
source | string: slot | link | file | view | "slot" |
contentSelector | string | "main" |
fallbackText | string | "Dieser Inhalt ist gerade nicht verfügba… |
openLabel | string | "In neuem Tab öffnen" |
openTarget | string: tab | window | "tab" |
openHref | string | "" |
closeLabel | string | "Schließen" |
padding | string: standard | none | sm | md | lg | xl | "standard" |
margin | string: standard | none | sm | md | lg | xl | "standard" |
border | string: standard | none | hairline | strong | "standard" |
radius | string: standard | none | control | surface | pill | "standard" |
textColor | string | "" |
backgroundColor | string | "" |
shadow | string: standard | none | sm | md | lg | "standard" |
width | string: standard | full | "standard" |
alignSelf | string: standard | start | center | end | "standard" |
anchor | string | "" |
presentation | string: dialog | icon-folder | window | launcher | embed | "dialog" |
contentFrom | string | "" |
autoOpen | string: none | delay | scroll | exit | "none" |
autoOpenDelay | number | 8 |
autoOpenScroll | number | 40 |
cooldownDays | number | 14 |
storageKey | string | "" |
document | boolean | false |
pauseMedia | boolean | false |
closeHref | string | "" |
triggerTitle | string: text | explicit | none | "text" |
confirm | object | [] |
submitInline | boolean | false |
closeControl | string: standard | icon-button | "standard" |
Events & Slots
Events: close
Slot default: akzeptiert ui.*, component.*, layout.*
Slot footer: akzeptiert ui.button, layout.cluster
Slot aside: akzeptiert ui.*, component.*, layout.*
Stellschrauben (Komponenten-Tokens)
| Token | Default |
|---|---|
--modal-width | var(--container-sm) |
--icon-folder-scale | 1 |
--icon-folder-origin-x | 50vw |
--modal-background | transparent |
--dock-launcher-side | var(--size-6) |
--dock-launcher-max-width | var(--container-2xl) |
--widget-grid-gap | var(--size-3) |
--wizard-muted | var(--color-text-muted) |
--color-text-default | var(--dock-launcher-label-ink) |
--color-text-muted | color-mix(in srgb, var(--dock-launcher-label-ink) 75%, transparent) |
Genutzte Design-Tokens
border.hairline color.action.on-primary color.action.primary color.border.default color.border.subtle color.status.danger color.surface.backdrop color.surface.default color.surface.overlay color.surface.sunken color.text.default color.text.muted container.2xl container.2xs container.lg container.md container.sm container.xs duration.base duration.fast duration.slow easing.out easing.standard elevation.modal focus.ring-color focus.ring-offset focus.ring-width font.family.default layer.modal leading.base leading.tight motion.pop-scale palette.neutral.0 radius.control radius.full radius.overlay radius.surface size.1 size.10 size.12 size.16 size.2 size.24 size.3 size.4 size.5 size.6 size.8 size.9 text.2xl text.3xl text.lg text.md text.sm text.xl text.xs weight.bold weight.medium weight.semibold