Drag handle
Interactive

Dynamic Island

Animated container that mimics the iPhone Dynamic Island behavior with spring physics.

A flexible container that animates content changes with spring physics, mimicking the iPhone Dynamic Island behavior.

Usage

import { DynamicIsland, DynamicIslandContent } from "@delphi/ui";

const views = [
  { id: "idle", content: <div className="h-7" /> },
  { id: "timer", label: "Timer", content: <TimerView /> },
  { id: "music", label: "Music", content: <MusicPlayer /> },
];

export function Example() {
  return <DynamicIsland views={views} showControls />;
}

DynamicIslandContent

For more control, use DynamicIslandContent directly to create custom animated containers:

import { DynamicIslandContent } from "@delphi/ui";

export function Example() {
  const [viewKey, setViewKey] = useState("idle");

  return (
    <DynamicIslandContent viewKey={viewKey} variantKey={`idle-${viewKey}`}>
      <YourContent />
    </DynamicIslandContent>
  );
}

API Reference

DynamicIsland Props

PropTypeDefaultDescription
viewsDynamicIslandView[]RequiredArray of views that can be displayed
initialViewIdstringFirst view IDInitial view to display
onViewChange(viewId, previousViewId) => void-Called when view changes
transitionDelaynumber500Delay in ms before switching views
showControlsbooleanfalseWhether to show view selector controls
classNamestring""Additional class names

DynamicIslandContent Props

PropTypeDefaultDescription
viewKeystringRequiredUnique key for the current view
childrenReactNodeRequiredContent to render inside
variantKeystring""Transition variant key (e.g., "idle-timer")
bouncenumberAutoCustom bounce value (0-1)
classNamestring""Additional class names

DynamicIslandView

PropertyTypeDescription
idstringUnique identifier for this view
labelstringOptional display label for view selector
contentReactNodeContent to render when active

Bounce Variants

The component includes predefined bounce values for smooth transitions between specific view pairs:

import { BOUNCE_VARIANTS } from "@delphi/ui";

// Example: "timer-ring" uses 0.35 bounce
// Example: "music-timer" uses 0.2 bounce
Use for status indicators that expand to show more detail
Transition through idle state for smooth animations between views
Provide clear visual feedback during state changes
Keep content minimal and focused within the island
Overload with too many simultaneous animations
Use for critical information that needs to persist
Make transitions too fast — users need time to perceive changes
ESC
No results found