Toastive

Toastive is a native web component for toasts. showToastive() from any stack. About 6 kB. No runtime dependencies.

Toastive is a native web component for toasts. Call showToastive() from React, Vue, Svelte, Angular, or nothing. About 6 kB. No runtime dependencies.

Open docs

The box is the page. Click a corner to put a toast there.

The problem

Each view library ships its own toast kit. Change stack, change notifications. The message should not care which renderer you picked this year.

The usual extras pile up: a store, a portal, a theme provider. You wanted a sentence in a corner.

The approach

A custom element plus one function. Esc closes it. Hover or focus pauses the timer. Reduced motion skips the animation. Theme is per toast so the host page stays in charge.

the lot with --toastive-* variables. Install from npm.

One call showToastive({ message, position }) appends it. clearToasts() removes the stack. Accessible defaults Info and success are polite. Error and warning are assertive. Keyboard and reduced motion are built in. Any stack It is a web component. React and Vue consume it the same way vanilla does. Update in place Keep the instance. Call update() when a loading toast becomes a result.