Render the root with the views. The app sets view to a name, or to null for the idle shape. A view with dismissAfterMs goes by itself.
The sample also uses Button. One command adds them with this item:
copy-link.tsx
DynamicIsland
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| view | string | null | — | The name of the active DynamicIslandView (controlled). null: the idle pill. |
| default | string | null | null | The view at first render when view is not set (uncontrolled). Default: null, the idle pill. |
| on | — | Called with the next view: a DynamicIslandTrigger press, or a dismiss (Escape, a press outside). | |
| placement | "bottom""top" | "top" | The edge the island hangs from. top (default): it grows down from the top center, as on iOS. bottom: it grows up from the bottom center (a phone page with the island above the home bar), and a swipe down closes a view. Place the root at that edge. |
| align | "center""end""start" | "center" | Where across the root the shape grows from. center (default): from the middle, as on iOS. start and end: from that side (right to left aware), for a shape in a corner (a notice at the top end of a desktop app, a button at the bottom end that grows into a panel). With end, a DynamicIslandBubble leaves from the start side. |
| idle | "hidden""pill" | "pill" | The shape at rest with no view. pill (default): the 126 × 37 idle pill stays. hidden: the idle size is 0, so a view grows out of nothing and folds back to nothing (a notice or a status on a page with no camera). The root then takes no space in the page. |
| scheme | "dark""inherit" | "dark" | The color scheme of the content. dark (default): the content takes the dark look of the components on the black shape. inherit: the page scheme, for a light surface (data-[scheme=inherit]:[--dynamic-island-surface:var(--popover)] on the root). |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
DynamicIslandView
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| name | string | — | The view's name: it shows while the root view equals it. |
| dismiss | string | null | — | The view that Escape and a press outside go to (null: the idle pill). Leave it out for a view that stays until the app changes it (a timer, a call), and for a view that a page button shows again or hides: that button is outside, so its pointerdown would close the view first. |
| dismiss | number | — | The time the view shows before the island goes to dismissTo (the idle pill when it has none), in ms: a notice that goes by itself. It counts from the morph to this view, waits while a hover pointer is over the island or focus is in it, and starts again from the full time when they leave. A new key on the view starts the full time again (the same notice a second time). Leave it out for a view that stays. |
| style | MotionStyle | — | Styles of the content box (Motion style: plain CSS or motion values). |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
DynamicIslandCompact
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
DynamicIslandLeading
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
DynamicIslandTrailing
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
DynamicIslandTrigger
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| class | string | — | |||||
| view | string | null | — | The view to show on press (null: the idle pill). Leave it out to only run onClick. | ||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
DynamicIslandBubble
<div>| Enter | On a trigger, shows its view and moves focus into it. |
|---|---|
| Space | On a trigger, shows its view and moves focus into it. |
| Esc | Closes a view that has dismissTo, and returns focus to where it came from. |





