Dynamic Island
Guides

Animation

Shape the container, tune its spring, and coordinate content transitions.

Container and content

An island has two animation layers. animatedConfig and transition control the outer surface. contentProps controls the view entering or leaving inside it.

Start with the dimensions. Add content motion once the surface feels right.

Define each target

animatedConfig accepts a Motion Target. Numeric width and height values represent pixels; you can also use CSS values such as percentages.

const compact = {
  width: 132,
  height: 40,
  borderRadius: 24,
};

const expanded = {
  width: 300,
  height: 160,
  borderRadius: 36,
};

Keep the same properties in related states. For example, if one state uses scale: 1.05, explicitly set scale: 1 on states that should return to their original scale.

Percentage dimensions

Percentage values resolve against the containing block. Give that parent a definite height when animating the island's height as a percentage:

<div style={{ width: "100%", height: 320 }}>
  <DynamicIsland
    value="responsive"
    components={{
      responsive: {
        animatedConfig: {
          width: "70%",
          height: "40%",
          borderRadius: 32,
        },
        render: () => <span>Room to grow</span>,
      },
    }}
  />
</div>

The snippet focuses on sizing; apply the base styles from installation. Try the percentage scene to see relative dimensions in context.

Tune the spring

The default container transition is:

const transition = {
  type: "spring",
  damping: 25,
  stiffness: 282,
} as const;

Higher stiffness pulls the surface toward its target more strongly. Higher damping reduces oscillation. Change one at a time so you can see its effect.

<DynamicIsland
  value={state}
  components={components}
  transition={{ type: "spring", stiffness: 340, damping: 32 }}
/>

For a timed transition, use a tween:

transition={{ type: 'tween', duration: 0.25, ease: 'easeInOut' }}

A state's own transition is deep-merged over the top-level transition. Use this for a softer expansion or a quicker return to a compact state.

Animate the first appearance

By default, the container appears at the current state's dimensions. Set initialAnimatedConfig to animate its initial appearance:

<DynamicIsland
  value={state}
  components={components}
  initialAnimatedConfig={{
    width: 80,
    height: 32,
    borderRadius: 20,
    opacity: 0,
  }}
/>

Include opacity: 1 in each relevant state's animatedConfig to give the initial opacity a visible destination. This prop affects the container; the internal presence wrapper still skips its own first entrance animation.

Customize the content transition

Override contentProps to replace the default blur with a small vertical movement:

<DynamicIsland
  value={state}
  components={components}
  contentProps={{
    initial: { opacity: 0, y: 6, filter: "none" },
    animate: { opacity: 1, y: 0, filter: "none" },
    exit: {
      opacity: 0,
      y: -6,
      filter: "none",
      transition: { duration: 0.12 },
    },
    transition: { duration: 0.18 },
  }}
/>

The container transition and content transition are independent. Keep exits brief so old content clears as the surface moves toward its next size.

Update the active target

You can update a state's dimensions while keeping its key unchanged. The island animates to the new animatedConfig without replacing the keyed content. This is useful for progress, staged feedback, or content that grows while preserving its local state.

For a different view with its own entrance and exit, change value instead.

Account for reduced motion

The built-in wrapper removes its blur for users who request reduced motion. Container animation and animations inside your views need their own reduced motion handling. Follow the accessibility guide.

For more transition options, see the Motion transition documentation.