Skip to content
nexubDesign System
v11.9.0

Components · Motion

Shared Element

BetaAdded v4.4.0

Morphs the same element between two states or pages inside a view transition.

import { SharedElement } from '@nexub/react';
View as Markdown

Examples

List to detail

Props

Props
PropTypeDefaultDescription
namerequiredstring—Same name on both sides, e.g. avatar-${id}. One element per name on screen at a time.
childrenrequiredReact.ReactElement<unknown, string | React.JSXElementConstructor<any>>—One element; the name is set on it.

Accessibility

Screen reader

  • Visual only: run the change in `startViewTransition()` and move focus to the new view as usual.

On iOS & Android