Skip to content

Flux Toast Stack

Notifications that expand on hover and dismiss individually.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import FluxToastStack from "./FluxToastStack";
export default function Example() {
return (
<FluxToastStack
items={[
{
"id": "saved",
"title": "Changes saved",
"message": "Your project is up to date.",
"time": "Now",
"variant": "success"
},
{
"id": "export",
"title": "Export ready",
"message": "Your files are ready to download.",
"time": "2m ago",
"variant": "info"
},
{
"id": "invite",
"title": "Invite accepted",
"message": "Alex joined your workspace.",
"time": "5m ago",
"variant": "info"
}
]}
colors={[
"#020617",
"#38bdf8",
"#a855f7"
]}
intensity={0.9}
tilt={1}
parallax={1}
stackGap={18}
expandedGap={110}
stackDepth={28}
minHeight={440}
/>
);
}

Using Flux Toast Stack

Pass the current notifications through items and remove the corresponding item when onDismiss runs.

Use stackDepth to limit how many notifications are visually exposed. Keep notification text concise so the expanded stack remains easy to scan.

Props

NameTypeRequiredDefaultDescription
items{ id: string; title: string; message: string; time: string; variant?: 'info' | 'success' | 'warning' }[]No[]Toast definitions rendered in the stacked list.
onDismiss(id: string) => voidNoundefinedCalled with the notification id after its dismiss animation.
colorsstring[]No["#020617", "#38bdf8", "#a855f7"]Array of up to three hex colors used for the background and glow accents.
intensitynumberNo0.9Overall glow strength for the stack.
tiltnumberNo1How much the stack tilts in 3D as you move the pointer.
parallaxnumberNo1How far the glow shifts with pointer movement.
stackGapnumberNo18Base spacing between stacked toasts in pixels.
expandedGapnumberNo110Spacing between toasts when the stack is expanded.
stackDepthnumberNo28Depth offset applied to each toast in the stack.
minHeightnumber | stringNo420Minimum height for the component container. Accepts a number (pixels) or any valid CSS height string.
classNamestringNoundefinedAdditional CSS class names, merged with base component styles.

Related components

Fine radial segments illuminate around a precise numeric readout.

Signal Bars

Feedback

Sculpted signal bars rise and fall in a staggered rhythmic wave.

A quiet spectrum of rounded bars rises and falls in a travelling rhythm.

Fluid Meter

Feedback

A circular gauge fills with two gently moving layers of liquid.