Skip to content

motion/layout-animating

import { … } from 'zidane-ui'ui/src/motion/layout-animating.ts

Functions#

beginLayoutAnimationFunction#

Marks a layout animation as started; call the returned function (idempotent) when it ends.

TypeScript
function beginLayoutAnimation(): () => void
() => void

ui/src/motion/layout-animating.ts:34

isLayoutAnimatingFunction#

True while at least one layout animation runs.

TypeScript
function isLayoutAnimating(): boolean
boolean

ui/src/motion/layout-animating.ts:17

pulseLayoutFunction#

Something moved without animating (an element reparented): followers measure for the next two frames.

TypeScript
function pulseLayout(): void

ui/src/motion/layout-animating.ts:47

subscribeLayoutAnimatingFunction#

Listens for layout animations starting and stopping; returns the unsubscribe.

TypeScript
function subscribeLayoutAnimating(cb: () => void): () => void
Parameters
NameTypeDescription
cb() => void

Called whenever the count goes from or to zero; read isLayoutAnimating for which.

() => void

ui/src/motion/layout-animating.ts:26