--- title: "Sticky Mock Swap" description: "A pinned product mock cross-fades through accent-tinted feature states while matching captions rise, hold, and exit beside it." --- import { InstallCommand } from "/snippets/install-command.jsx"; import { VariablesExplorer } from "/snippets/variables-explorer.jsx"; ```html sticky-mock-swap.html Sticky Mock Swap ``` ## Install That writes one file: `compositions/components/sticky-mock-swap.html`. ## Paste it into your composition Open `compositions/components/sticky-mock-swap.html` and copy what is inside into your own composition. A component has no size or duration of its own. It takes both from the composition you paste it into. ## Variables Every one of these has a default, so the piece works untouched. Set the ones you want to change on the element: | Variable | Default | Accepts | What it does | | --- | --- | --- | --- | | `captions` | `Instant previews,Zero config,Ship on Friday` | string | Comma-separated feature captions shown beside the pinned mock. | | `accent` | `violet` | `green`, `blue`, `violet` | Accent tint used across the mock states. | Set them with `data-variable-values` on the element that mounts it. These are the defaults, so this behaves exactly like the preview above until you change one: ```html wrap
``` ## Source ```html Sticky Mock Swap ``` {/* hf:generated-footer */} Tagged `motion-primitive` `product-demo` `sticky` `mock` `crossfade` `feature-tour`. ## Related topics - [Browse the complete Catalog](/catalog) - [Add assets and Catalog items in Studio](/studio/assets-and-blocks) - [Build a richer composition](/go-further)