← Prompt Lab

Dynamic Island Live Pill

iOS-Style Spring Morphing Status & Notification Toast
Gaming · Mobile & Nav2.9 KB0 copies
SHARE
22 / PLAYGROUNDDynamic Island Live Pill
BRAND COLORS
Fullscreen ↗

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.

Dynamic IslandLive ToastMobile & Web2.9 KB
'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>
  )
}

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

UI SLOTNav & Mobile
BEST USE CASEGlobal App Toast, Background Upload Status, Audio Player & Match Alerts
IDEAL PLACEMENTFixed Top-Center Floating Status Bar (Web & Mobile)
BUNDLE SIZE2.9 KB
DEPENDENCIESZero (CSS Spring)
MOBILE / TOUCHTap to Expand/Collapse
GPU WEIGHTLight · 60fps