SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

toastStackStyle

The peek stack a toast region draws.

tsx
import { toastStackStyle } from "@sdxc/ui/app";

Usage

Styles a toast region's children as a capped peek stack. The newest toast is the last child; children past max from the end take no space, and folded toasts match the front one's height through --ui-toast-front-size.

Signature

typescript
toastStackStyle<Node extends Element = Element>(max: number): MixinDescriptor<Node, [styles: CSSStyles], ElementProps>

Returns a mixin ready for the region element's mix prop.

Parameters

ParameterTypeRequiredDescription
maxnumberYesMost toasts shown at once.

Examples

tsx
<div data-stack="peek" data-placement="bottom-end" mix={[toastStackStyle(3)]}>{toasts}</div>
@sdxc/ui

Can’t find it? Contact us