Skip to content

motion/provider

import { … } from 'zidane-ui'ui/src/motion/provider.tsx

Components#

MotionProviderComponent#

Applies one motion policy to an app: writes the motion variables and switches on <html> and wraps the tree in motion.dev's MotionConfig, so JS and CSS animations follow the same preference. Anything but full makes transform and layout values jump.

TypeScript
function MotionProvider(props: MotionProviderProps): Element
Parameters
NameTypeDescription
propsMotionProviderProps

See MotionProviderProps.

Element
MotionProvider props
NameTypeDescription
childrenReactNode

The app tree to put under the motion policy.

level?MotionLevel

The motion level; default: follow html[data-motion].

panelMs?number

The panel slider (ms): the panel spring's perceived duration.

springs?boolean

Spring animations; default: follow html[data-springs].

ui/src/motion/provider.tsx:40

Interfaces#

MotionProviderPropsInterface#

Props of MotionProvider.

TypeScript
interface MotionProviderProps
MotionProviderProps properties
NameTypeDescription
childrenReactNode

The app tree to put under the motion policy.

level?MotionLevel

The motion level; default: follow html[data-motion].

panelMs?number

The panel slider (ms): the panel spring's perceived duration.

springs?boolean

Spring animations; default: follow html[data-springs].

ui/src/motion/provider.tsx:22