HelixOverviewComponentsMapsGraphIntroductionInstallationDeriving a themeSandboxTheme builderVisual testingCortexDocsEngramActiveTraceActiveRecallActiveServicesInsightsGet in touchSource on GitHub
Loading the reference
Motion ToggleView sourceEdit in SandboxView MarkdownCopy MarkdownOpen in ClaudeOpen in CursorA button that pauses every motion on the page that starts by itself, and lets it run again.Also called Pause button, Pause animations, Stop motion, Motion control, and Animation toggle.ExperimentalSince 0.199.0ActionsImportimport'@fusion.dev/helix/motion-toggle'import'@fusion.dev/helix-headless/motion-toggle'Preview
GuidelinesWhen to use
A page with motion that starts by itself, such as a carousel that turns or an aura.Motion ToggleThis page
1::part(button)The toggle button, with aria-pressed while the page's motion is paused.
2::part(icon)The icon inside the button.
API referenceRoothelix-motion-toggleA button that pauses every motion on the page that starts by itself, and lets it run again.
PropTypeDescriptionfallbackLabelstringDefault"Pause motion"The name the element gives itself where label is empty.labelstringDefault""The button's name, which stays the same whichever way it stands.
ReadTypeDescriptionwhenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)The button's text, where it shows more than its icon. Defaults to nothing, the icon alone, named by label.iconReplaces the icon, which is pause while motion runs and play while it is paused.
EventTypeDescriptionchangeEventFired after a press pauses the page's motion or lets it run.
PartDescriptionbuttonThe toggle button, with aria-pressed while the page's motion is paused.iconThe icon inside the button.
CSS PropertyDescription--motion-toggle-background-colorThe button's fill. Defaults to the floating overlay surface.
Custom stateDescriptionpausedThe page's motion is paused.settledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
Roothelix-headless-motion-toggleA button that pauses every motion on the page that starts by itself, and lets it run again.
PropTypeDescriptionfallbackLabelstringDefault"Pause motion"The name the element gives itself where label is empty.labelstringDefault""The button's name, which stays the same whichever way it stands.
ReadTypeDescriptionwhenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)The button's text, where it shows more than its icon. Defaults to nothing, the icon alone, named by label.iconReplaces the icon, which is pause while motion runs and play while it is paused.
EventTypeDescriptionchangeEventFired after a press pauses the page's motion or lets it run.
PartDescriptionbuttonThe toggle button, with aria-pressed while the page's motion is paused.iconThe icon inside the button.
Custom stateDescriptionpausedThe page's motion is paused.settledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
Examples
NameDescriptionPreviewThe page's pause, as an icon alone and with words beside it. A press pauses every motion on the page that starts by itself.PreviewThe page's pause, as an icon alone and with words beside it. A press pauses every motion on the page that starts by itself.