Angular Modal-Komponente | ng-hub-ui-modal
Barrierefreie Angular Modal-Komponente mit Stapelung, Fullscreen-Modus, Templates, Tastatursteuerung und CSS-Variablen für standalone Apps.
Interaktive Beispiele
Erkunde Live-Beispiele, die zeigen, wie sich die Bibliothek in gängigen Angular-Anwendungsfällen verhält.
Modal-Inhaltstypen
The open() method accepts various content types:
Ein Dialog ohne freien Ausweg
Look at the top-right corner of each one. In the second dialog the button is not hidden — it is not there.
Konfigurationsoptionen
Modal-Platzierungen
Offcanvas: eine Schublade, die ihre Kante berührt
With the switch off, look at the bottom edge and at the corners on the side it slid out of.
Steuerung über Modal-Referenz
Aktives Modal (selbstschließend)
This example opens a component (not a template) that injects HubActiveModal.
Typisierte Daten-Payload
Gestapelte Modals
HubModal supports multiple stacked modals. The last modal has focus.
Vollbild-Modal
Content Projection
This example demonstrates how to create reusable wrapper components for modal content.
Naming the header and footer slots is also what makes the library draw its own header, dismiss button included. That button ships named "Close", in English, and the library translates nothing: closeAriaLabel is how the application passes the string it has already translated — per call, as here, or once for the whole application on HubModalConfig.
Benannter Body-Slot
The body used to be the one slot with no name — whatever survived the header and the footer being taken out. bodySelector gives it one, so the order the content happens to be written in stops deciding what the body is.
Nothing is ever dropped: what no selector claims still follows the named body.
Semantische Varianten: ein Akzent, der ganze Dialog
The nine on the first row are the built-ins. brand is not one of them: it is six declarations in this example's own stylesheet, five of which only name another --hub-modal-accent-* role.
Styling mit CSS-Variablen
Open a modal themed with --hub-modal-* variables.