An iOS Dynamic Island-inspired live notification pill that morphs smoothly with spring overshoot between compact Idle status, Match Found actions, live Audio Equalizer, and Sync Progress.
'use client'
import { useState } from 'react'
export function DynamicIslandPill() {
const [expanded, setExpanded] = useState(false)
return (
<div className="flex flex-col items-center gap-4">
<button
type="button"
onClick={() => setExpanded((v) => !v)}
className={`flex items-center justify-between overflow-hidden rounded-[30px] border border-white/15 bg-black px-4 text-white shadow-2xl transition-all duration-500 [transition-timing-function:cubic-bezier(0.34,1.4,0.64,1)] ${expanded ? 'h-[72px] w-[336px]' : 'h-[44px] w-[176px]'}`}
>
<span className="flex items-center gap-2.5">
<span className="h-2.5 w-2.5 rounded-full" style={{ background: `linear-gradient(135deg, #f43f5e, #a855f7)` }} />
<span className="text-xs font-semibold">{expanded ? 'Ranked Match Ready · 5v5' : 'Online · 12ms'}</span>
</span>
{expanded && (
<span
style={{ background: `linear-gradient(135deg, #f43f5e, #a855f7)` }}
className="rounded-full px-3 py-1 text-[11px] font-semibold"
>
Accept
</span>
)}
</button>
</div>
)
}Loading single-file HTML…
Build a single-file Dynamic Island Morphing Live Notification Pill using pure HTML, CSS spring transitions, and vanilla JS (zero dependencies) on a dark canvas (#080a10). - Spring Morphing Craft: Transition a black pill container smoothly across 4 real app states — Idle Pill (176×44px), Match Found (340×76px with Accept CTA), Now Playing (332×68px with animated 4-bar equalizer), and Syncing Progress (310×58px with animated bar) — using cubic-bezier(0.34, 1.4, 0.64, 1) width/height spring overshoot and subtle accent glow (#f43f5e → #a855f7). - Production Fit: Works as a global floating toast/status bar across Web Apps, Gaming HUDs, and Mobile PWAs.
WHY THIS WORKS IN PRODUCTION
- Elastic cubic-bezier(0.34, 1.4, 0.64, 1) morphing across 4 live app states
- Replaces boring static toast alerts with a unified top-center status pill
- Includes animated audio bars, progress sync, and action CTA patterns
- 2.9 KB zero-dependency code + ready React/Tailwind TSX component
DROP-IN SPECS // WEB & MOBILE FIT








