Motion.full
const · packages/primitives/src/motion/motion.ts:22
const full: Layer.Layer<Motion>Primitives / foldkit-primitives/motion
namespace · packages/primitives/src/motion/motion.ts:9
export * as Motion from './motion.js'Whether motion should be reduced, as a service read when a transition
starts, not sniffed once. Absent, motion is full, so a placement that
provides nothing behaves as before; a page provides live (the user's
prefers-reduced-motion) and a test provides reduced or full. Under
reduced motion a presence exits at once and a tween or spring jumps to its
end, in the same Messages, so the Model sees the same transitions.
Motion.fullconst · packages/primitives/src/motion/motion.ts:22
const full: Layer.Layer<Motion>Motion.layerfunction · packages/primitives/src/motion/motion.ts:18
function layer(reduced: boolean): Layer.Layer<Motion>Reduced or full motion, fixed: for a test or a setting the application owns.
Motion.liveconst · packages/primitives/src/motion/motion.ts:25
const live: Layer.Layer<Motion>The user's prefers-reduced-motion, read each time a transition starts.
Motion.Motionclass · packages/primitives/src/motion/motion.ts:15
class Motion extends Context.Service<Motion, MotionShape>()(
'foldkit-primitives/Motion',
) {}Motion.MotionShapeinterface · packages/primitives/src/motion/motion.ts:11
interface MotionShape {
readonly reduced: Effect.Effect<boolean>
}Motion.reducedconst · packages/primitives/src/motion/motion.ts:21
const reduced: Layer.Layer<Motion>Motion.reducedMotionconst · packages/primitives/src/motion/motion.ts:35
const reducedMotion: Effect.Effect<boolean>Whether to reduce motion now: the service's answer, or false without one.