Shared overlay root management for portal-based components. Provides document-level fixed layers that escape CSS stacking contexts.
Shared overlay root management for portal-based components. Provides document-level fixed layers that escape CSS stacking contexts.
(attach-listener! layer target event-name handler capture)Attach handler to target for event-name and remember the binding
on layer so remove-layer! will detach it. target is usually the
layer itself, but may be any node reachable from it (panel, close
button, etc.). capture is the addEventListener capture flag.
Attach `handler` to `target` for `event-name` and remember the binding on `layer` so `remove-layer!` will detach it. `target` is usually the layer itself, but may be any node reachable from it (panel, close button, etc.). `capture` is the `addEventListener` capture flag.
(ensure-overlay-root! trigger-el)Return (or create) the fixed overlay container. When an x-theme wrapper exists, the root is placed inside it so theme tokens cascade into panels.
Return (or create) the fixed overlay container. When an x-theme wrapper exists, the root is placed inside it so theme tokens cascade into panels.
(find-theme-host el)Walk up from el to find the nearest x-theme ancestor, or fall back to body.
Walk up from el to find the nearest x-theme ancestor, or fall back to body.
(get-panel layer)Query the layer's shadow root for the panel element.
Query the layer's shadow root for the panel element.
(make-layer! trigger-el style-text z-index)Create a fixed-position layer with its own shadow DOM inside the overlay root. style-text is the CSS for the layer's shadow root. Returns the layer element.
Create a fixed-position layer with its own shadow DOM inside the overlay root. style-text is the CSS for the layer's shadow root. Returns the layer element.
(remove-layer! layer)Detach every listener attached via attach-listener! and remove the
layer from the DOM.
Detach every listener attached via `attach-listener!` and remove the layer from the DOM.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |