toastStack
Keeps a toast region's --ui-toast-front-size equal to the newest toast's height.
import { toastStack } from "@sdxc/ui/app";Usage
Measures the region's last child (the toast in front) whenever it changes size or a toast arrives or leaves, writing its height onto the region.
Signature
toastStack(): MixinDescriptor<
HTMLElement,
[callback: (node: HTMLElement, signal: AbortSignal) => void],
ElementProps
>Returns a mixin ready for a toast region's mix prop.
Examples
<div data-slot="region" mix={[toastStack()]}>{toasts}</div>