Stacking notifications with swipe-to-dismiss, hover-to-pause and variants.
A black pill that morphs between states, from a quiet dot to a notification, a music player or a live timer, springing to each new size.
Usage
import { IslandMusic, IslandNotice, MorphIsland } from "@/components/motionkit/morph-island";
const [view, setView] = useState("notice");
<MorphIsland view={view} label="Status">
{view === "notice" ? (
<IslandNotice title="Deploy finished" body="motionkit.dev is live" />
) : (
<IslandMusic title="Midnight City" artist="Your playlist" />
)}
</MorphIsland>Motion
The exact curves this component runs, plotted with Motion's own maths.
Island resizes
View changes
Content swaps
View changes
Live status in apps: uploads, calls, timers, now playing, and notifications that shouldn't take over the screen.
The pill is a layout-animated element, so when its content changes it springs from the old size to the new one; setting its corner radius in style keeps the corners round through the change. The content swaps inside AnimatePresence in popLayout mode, which lets the old content leave without holding the size open, with a short blur and scale either side. Ready-made pieces cover the common states.
| Prop | Type | Default | Description |
|---|---|---|---|
| view | string | — | A name for what's showing; changing it morphs the island. |
| children | ReactNode | — | The content: IslandIdle, IslandNotice, IslandMusic, IslandTimer or your own. |
| onClick | () => void | — | Makes the island a button, e.g. to expand it. |
| label | string | — | Accessible description of what's showing. |
How we audit: the WCAG 2.2 animation checklist and respecting reduced motion in React.
Yes. The file starts with "use client", so you can import it straight into a Server Component page or layout. It works in Vite as is, and in Astro as a React island.
Only the motion package, beside React and Tailwind CSS v4. There is no MotionKit package and no Tailwind config to add.
Yes, with MotionKit Plus. Add the @motionkit registry and your personal token to components.json (the snippet is on your account page), then run npx shadcn@latest add @motionkit/morph-island. It saves the file to components/motionkit and installs its dependencies.
Morph Island is part of MotionKit Plus (£12 / $15 / €14 a month or £96 / $120 / €112 a year). The live preview and playground are free to explore; Plus unlocks its source code, every customisation control and commercial use.
With reduced motion on, it changes size at once and content swaps with a fade.
Stacking notifications with swipe-to-dismiss, hover-to-pause and variants.
A live status indicator for services and deploys: the dot blends between colours and pulses softly only when something needs attention.
Build, test and deploy steps run in turn with live timers and a filling line, ending on a pulsing Live badge or a clear failure with a retry.
The live preview is free to explore. Plus unlocks the source for Morph Island and every other premium component.
Not ready for Plus? A free account unlocks 4 premium components, Depth Card, Rolling Text, Dot Wave and Confetti Button, with no card needed.
Usage
import { IslandMusic, IslandNotice, MorphIsland } from "@/components/motionkit/morph-island";
const [view, setView] = useState("notice");
<MorphIsland view={view} label="Status">
{view === "notice" ? (
<IslandNotice title="Deploy finished" body="motionkit.dev is live" />
) : (
<IslandMusic title="Midnight City" artist="Your playlist" />
)}
</MorphIsland>Motion
The exact curves this component runs, plotted with Motion's own maths.
Island resizes
View changes
Content swaps
View changes