SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

On this page

toastStack

Keeps a toast region's --ui-toast-front-size equal to the newest toast's height.

tsx
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

typescript
toastStack(): MixinDescriptor<
	HTMLElement,
	[callback: (node: HTMLElement, signal: AbortSignal) => void],
	ElementProps
>

Returns a mixin ready for a toast region's mix prop.

Examples

tsx
<div data-slot="region" mix={[toastStack()]}>{toasts}</div>
@sdxc/ui

Can’t find it? Contact us