FreeMIT License

Toast Stack — Stacked, Swipeable Toast Notifications for React Native & Expo

A complete toast system for React Native: toast.success('Saved') from anywhere, a collapsed stack that fans open, promise toasts that morph from spinner to check, Undo actions, upload progress, swipe to dismiss and timers that pause while you read. Light and dark, touch and…

by UpFork, built by Ramin ValadanMobile componentUpdated 14 Oct 2026

Watch0
Preview of Toast Stack — Stacked, Swipeable Toast Notifications for React Native & Expo

Code

6 files · 6 packages

import Svg, { Circle, Path } from 'react-native-svg';

// The toasts' icons, drawn here: 24-unit boxes, 1.75 strokes. Any of them can go in a toast's `icon`.

type IconProps = { color: string; size?: number };

const stroke = { strokeWidth: 1.75, strokeLinecap: 'round', strokeLinejoin: 'round', fill: 'none' } as const;

export function CheckCircleIcon({ color, size = 18 }: IconProps) {
  return (
    <Svg width={size} height={size} viewBox="0 0 24 24">
      <Circle cx={12} cy={12} r={9.25} stroke={color} {...stroke} />
      <Path d="m8.2 12.3 2.6 2.6 5-5.3" stroke={color} {...stroke} />
    </Svg>
  );
}

export function XCircleIcon({ color, size = 18 }: IconProps) {
  return (
    <Svg width={size} height={size} viewBox="0 0 24 24">
      <Circle cx={12} cy={12} r={9.25} stroke={color} {...stroke} />
      <Path d="m9.2 9.2 5.6 5.6M14.8 9.2l-5.6 5.6" stroke={color} {...stroke} />
    </Svg>
  );
}

export function AlertTriangleIcon({ color, size = 18 }: IconProps) {
  return (
    <Svg width={size} height={size} viewBox="0 0 24 24">
      <Path d="M10.3 4.2 2.9 17.3a2 2 0 0 0 1.7 3h14.8a2 2 0 0 0 1.7-3L13.7 4.2a2 2 0 0 0-3.4 0Z" stroke={color} {...stroke} />
      <Path d="M12 9.5v4.2M12 16.9h.01" stroke={color} {...stroke} />
    </Svg>
  );
}

export function InfoIcon({ color, size = 18 }: IconProps) {
  return (
    <Svg width={size} height={size} viewBox="0 0 24 24">
      <Circle cx={12} cy={12} r={9.25} stroke={color} {...stroke} />
      <Path d="M12 11v5.2M12 7.8h.01" stroke={color} {...stroke} />
    </Svg>
  );
}

export function UndoIcon({ color, size = 18 }: IconProps) {
  return (
    <Svg width={size} height={size} viewBox="0 0 24 24">
      <Path d="M9 14 4.5 9.5 9 5" stroke={color} {...stroke} />
      <Path d="M4.5 9.5h10a5 5 0 0 1 0 10H11" stroke={color} {...stroke} />
    </Svg>
  );
}

export function ArchiveIcon({ color, size = 18 }: IconProps) {
  return (
    <Svg width={size} height={size} viewBox="0 0 24 24">
      <Path d="M3.5 5.5a1 1 0 0 1 1-1h15a1 1 0 0 1 1 1v2.5h-17V5.5Z" stroke={color} {...stroke} />
      <Path d="M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8M10 12h4" stroke={color} {...stroke} />
    </Svg>
  );
}

export function UploadIcon({ color, size = 18 }: IconProps) {
  return (
    <Svg width={size} height={size} viewBox="0 0 24 24">
      <Path d="M12 15.5V4.5M7.5 9 12 4.5 16.5 9" stroke={color} {...stroke} />
      <Path d="M4.5 15v2.5a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V15" stroke={color} {...stroke} />
    </Svg>
  );
}

export function WifiOffIcon({ color, size = 18 }: IconProps) {
  return (
    <Svg width={size} height={size} viewBox="0 0 24 24">
      <Path d="m3.5 3.5 17 17" stroke={color} {...stroke} />
      <Path d="M8.6 13.2a5 5 0 0 1 4.4-1.3M5.2 9.8a10 10 0 0 1 3.5-2.1M12.5 6.1A10 10 0 0 1 18.8 9.8M16.3 12.4l-.4-.3M12 18.2h.01" stroke={color} {...stroke} />
    </Svg>
  );
}

export function CloseIcon({ color, size = 14 }: IconProps) {
  return (
    <Svg width={size} height={size} viewBox="0 0 24 24">
      <Path d="M6 6l12 12M18 6 6 18" stroke={color} {...stroke} strokeWidth={2} />
    </Svg>
  );
}
6 files6 packages

About

Toast Stack is the toast system you'd build if you had a month: one <Toaster /> at the root, and toast(...) from anywhere in your app. Replace the one you use today in five minutes.

  • Every kind. Success, error, warning, info, loading, custom, and toast.promise that keeps one toast and turns its spinner into a drawn check (or a cross) when the promise settles.
  • A stack that feels like cards. The newest in front, the others peeking behind it; tap or hover and it fans into a readable list, every toast travelling its own way, text never overlapping. Heights never jump.
  • Actions and updates. Undo and cancel buttons, an upload's progress bar, toast.update and your own ids to change a toast in place ("You're offline" becomes "Back online").
  • Polite timers. They pause while the stack is open, pressed, hovered or in the background, and go on with the time that was left; an optional hairline shows it.
  • Swipe to dismiss. Towards the edge or sideways, with the speed you gave it; the next toast springs forward.
  • Everywhere. Top or bottom, safe area and keyboard aware, room for a tab bar, light and dark with rich colours that keep their contrast, screen-reader announcements, reduced motion.

Three complete demos: an inbox with archive and Undo and a promise for sending, an upload screen with progress, retry and offline, and a playground of every call.

Reviews and bugs

0 reviews · 0 bugs

Ship it0With fixes0Skip0· 0 reviews

0 bugs0 open0 fixed

Members who have it review it and report its bugs. Sign in

No reviews or bugs yet.

Installation

React Native · Expo SDK 57

Built withExpo HapticsGesture HandlerReanimatedSafe Area ContextSVG

  1. 01

    Copy the files into your app

    • components/toast-stack/icons.tsx
    • components/toast-stack/index.ts
    • components/toast-stack/store.ts
    • components/toast-stack/toast.tsx
    • components/toast-stack/toaster.tsx
    • lib/use-scheme.ts
    • demos/ (3 screens showing it in use)

    At your app’s root, the folders side by side as they are: the files import each other by relative paths.

  2. 02

    Install the packages with Expo

    npx expo install expo-haptics react-native-gesture-handler react-native-reanimated react-native-safe-area-context react-native-svg react-native-worklets
  3. 03

    See it in your app

    Make demos/mail.tsx your app’s App.tsx, inside the GestureHandlerRootView that Gesture Handler needs at its root:

    import { GestureHandlerRootView } from 'react-native-gesture-handler';
    
    import Mail from './demos/mail';
    
    export default function App() {
      return (
        <GestureHandlerRootView style={{ flex: 1 }}>
          <Mail scheme="light" />
        </GestureHandlerRootView>
      );
    }
    

UpFork installs every revision just so into a fresh Expo app (SDK 57), type-checks it and builds it for the web before it goes on sale. An AI assistant can do it for you through UpFork’s MCP server: Install mobile components has both ways.

Before you buy

Everything you need to know

How this mobile component gets from the preview into your project, and what buyers ask most.

How to use it

From the preview to your project

  1. 01

    Try it in the preview

    Switch between light and dark, and resize it to phone and tablet widths, before you decide.

  2. 02

    Get it

    Free products are yours with a free account. Paid ones settle in USDT on TRON, sent straight to the wallet on your order.

  3. 03

    Install it

    Components go into your project with one shadcn command, dependencies included. Everything else downloads with a checksum.

  4. 04

    Make it yours

    It's your code now: rename it, restyle it and wire in your real data.

  5. 05

    Or hand it to your AI

    Copy the prompt and let your coding assistant place it in your project, following your conventions.

Building with an AI assistant?

Copy a ready-made prompt with the code, its dependencies and a demo, and your assistant can put it in place for you.

Copy AI prompt

Selling your own work?

Get approved once, then publish components, templates and mobile components, paid in USDT straight to your own wallet.