marclayuiv0.4.0
Components

Toast

Notifications from anywhere via useToast. They stack (max four), slide in softly, auto-dismiss after ~4s and live in an aria-live region.

tsx
import { ToastProvider, useToast } from "marclayui";

Setup

Wrap your app once — the toasts render in a fixed stack and this page already has the provider mounted, so try the buttons below.

Variants

PropTypeDefaultDescription
placement"top-right" | "top-center" | "bottom-right" | "bottom-left""bottom-right"Where the stack renders (fixed).
toast(options)(o: ToastOptions) => void—Push a toast; options are variant, title, message, duration.
durationnumber4200Auto-dismiss delay in ms; 0 sticks until closed.