Motion Provider
Set a reduced-motion policy and default transition for a subtree.Overview
MotionProvider provides a single policy boundary for custom motion. It is the correct place to preview motion with a forced policy or to honor a product-level accessibility preference.
Behaviour and customization
user follows prefers-reduced-motion, always removes transform movement, and never preserves it. The built-in components retain their own semantic timing but share this reduced-motion policy.
Use user in application UI. always is useful for documentation or an explicit accessibility setting; never is appropriate only for controlled visual previews and tests.
Usage
<script lang="ts">
import { MotionProvider } from 'fractalsvelte/motion';
</script>
<MotionProvider reducedMotion="user">
<Workspace />
</MotionProvider>API
| Prop | Type | Default | Description |
|---|---|---|---|
reducedMotion | 'user' | 'always' | 'never' | 'user' | Transform-motion accessibility policy. |
transition | MotionTransition | - | Default transition for descendant Motion primitives. |
Components and blocks
Use this primitive directly for custom interfaces; Fractalsvelte also applies it or its motion language in these areas:
- Every Motion-runtime component and block
For exact built-in component timing and reduced-motion behaviour, see the Motion guide.
