Dynamic Island Toast
ProA pixel-faithful Apple Dynamic Island that morphs, splits, and breathes while it hosts live activities inside your app.
cinematic interactionsdynamicislandtoastframer motion
Installation
Run the following command
~/your-project
pnpm dlx wensity@latest add dynamic-island-toast
Usage
Import DynamicIslandToast from @/components/wensity/dynamic-island-toast and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.
app/example.tsx
"use client";import { useState } from "react";import {DynamicIslandToast,type DynamicIslandToastModel,} from "@/components/wensity/dynamic-island-toast";export function DynamicIslandToastDemo() {const [toast, setToast] = useState<DynamicIslandToastModel | null>({id: "upload-1",variant: "upload",title: "hero-final.mp4",progress: 0.62,duration: 4000,});return (<DynamicIslandToastinlinetoast={toast}onDismiss={() => setToast(null)}/>);}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
toast | DynamicIslandToast | null | - | The active toast. Pass null to dismiss. |
secondary | DynamicIslandToast | null | - | Optional second activity. When set, the island enters split-mode with two pills. |
defaultExpanded | boolean | false | Render expanded by default (useful for hero previews). |
onExpandedChange | (expanded: boolean) => void | - | Fired whenever the user expands or collapses the island. |
onDismiss | () => void | - | Fired when the island auto-dismisses or the user closes it. |
inline | boolean | false | If true, position absolutely inside the nearest positioned ancestor. If false, fixed to the viewport. |
