Skip to content

Toast

Category: Feedback

// once, near the app root:
<ToastProvider />;
// anywhere:
toast.success('Saved', 'Your changes are live.');
toast.error('Save failed', 'We could not reach the server.');
toast.show({ title: 'Imported 18 items', tone: 'info' });

Toasts must outlive the component that triggered them (the user might navigate away mid-fade). A central queue keeps that simple — no provider props, no portal plumbing per call site.

Install: @helix-ui/core

import { ToastProvider, toast } from '@helix-ui/core';

status: beta · since: 0.1.0

Tags: transient, notification, pop-up

┌─────────────────────────┐
│ ✓ Saved. │ ← stacks bottom-right
└─────────────────────────┘
  • display — fixed
  • width — content
  • height — content
  • intrinsicSize — corner-anchored, ~360px wide
  • stackable — true
  • fullBleed — false

A small surface in a viewport corner, tinted by tone (success/info/warning/danger), auto-dismissing after a timeout. Stacks vertically when multiple are visible.

Name Type Default Description
title string — Primary message. Required.
description string — Optional second line.
tone 'neutral' | 'info' | 'success' | 'warning' | 'danger' neutral Color intent. Drives the left border color.

color.bg.surface.default, color.bg.action.neutral.default, color.bg.action.brand.default, color.bg.action.success.default, color.bg.action.warning.default, color.bg.action.danger.default, color.border.default, color.border.focus, color.text.primary, color.text.secondary, radius.md, radius.sm, space.2, space.3, space.4, font.family.sans, font.size.sm, font.weight.semibold, shadow.md

Role: status

Notes

  • Built on react-aria-components’ UNSTABLE_Toast queue (the only API path while toast is stabilising). Do not stack multiple <ToastProvider/> instances.
  • Tones use color borders + accessible icons (caller-supplied) — never rely on color alone.
  • Toasts pause on focus and pointer hover. Hovered or focused toasts will not auto-dismiss.
Component Relation Note
Banner alternative Banner for persistent; Toast for transient.
Callout sibling

These are the AI prompt → JSX mappings used by the helix-ui prompt DSL and integrations like Cursor / Claude Code.

“show a green toast saying Saved”

toast.success('Saved.');

“red error toast”

toast.error('Could not save.');