Transitions

Island Toast

A notice that drops from the top as a pill, grows with the message and goes back up.

Preview

Installation

Terminal
npx @usefluid/cli add island-toast

Usage

IslandToast.tsx
import { IslandToast } from "./IslandToast";

<IslandToast message={notice} />

API reference

PropTypeDefaultDescription
messagestring | null—Set a text to show it; null hides it. You decide when.
iconReactNodea checkAny icon; null for none.

Keyboard and screen readers

A status region: the message is announced.

Notes

Place it once near the root, in a fixed layer.

Every colour comes from the --fluid-* variables, and the piece is yours to change.

How it is made

The drop, the width and the height are three springs, so the pill arrives, stretches to fit the sentence and leaves as one body. The width comes from the real size of the text. The sentence comes in once there is room for it, and goes to screen readers through a status region.

For your agent

For your agent

Add Island Toast to my project with the Fluid library. Use IslandToast for the result notices of my product's actions. Read my project first. Use my logo, my colours and my font through the --fluid-* variables. Keep 44px touch targets, visible focus and reduced motion. If I have no SVG logo, ask before making one up.