An animation library for Reagent (ClojureScript). There is only one concept: A reaction that moves toward some target, each step triggers another update until it reaches the end state. The trigger occurs by touching a local atom a zero timeout, which changes the atom in the next Reagent render.
An animation library for Reagent (ClojureScript). There is only one concept: A reaction that moves toward some target, each step triggers another update until it reaches the end state. The trigger occurs by touching a local atom a zero timeout, which changes the atom in the next Reagent render.
Gets the current document y scroll position.
Gets the current document y scroll position.
(get-scroll-x)Gets the current document x scroll position.
Gets the current document x scroll position.
(get-scroll-y)Gets the current document y scroll position.
Gets the current document y scroll position.
(interpolate-arg component x)(interpolate-arg component x options)Interpolates the argument of a component to x. Will call the given component with values approaching x. Options can contain duration (in milliseconds) and easing (a function of a b duration t).
Interpolates the argument of a component to x. Will call the given component with values approaching x. Options can contain duration (in milliseconds) and easing (a function of a b duration t).
(interpolate-if condition a b)(interpolate-if condition a b options)Interpolates between two values when the conditon changes. Takes a condition ratom to watch, and 2 vectors or values to render. Options can contain duration (in milliseconds) and easing (a function of a b duration t).
Interpolates between two values when the conditon changes. Takes a condition ratom to watch, and 2 vectors or values to render. Options can contain duration (in milliseconds) and easing (a function of a b duration t).
(interpolate-to x)(interpolate-to x options)Interpolates toward new values. Takes a ratom which stores a numeric value. Options can contain duration (in milliseconds) and easing (a function of a b duration t).
Interpolates toward new values. Takes a ratom which stores a numeric value. Options can contain duration (in milliseconds) and easing (a function of a b duration t).
(interval f t)Call function f every period t while mounted in the DOM.
Call function f every period t while mounted in the DOM.
(mouse-watcher ratom)Returns a map suitable for merging with component properties, that will keep a given ratom updated with the mouseover status.
Returns a map suitable for merging with component properties, that will keep a given ratom updated with the mouseover status.
(pop-when condition then)(pop-when condition then options)Wraps a component to animate creation and destruction. Takes a condition ratom and a vector or value to be rendered. Options can contain duration (milliseconds) and easing (a function that takes a b duration t).
Wraps a component to animate creation and destruction. Takes a condition ratom and a vector or value to be rendered. Options can contain duration (milliseconds) and easing (a function that takes a b duration t).
A ratom for watching the current document y scroll, will be updated when there is a scroll event.
A ratom for watching the current document y scroll, will be updated when there is a scroll event.
A ratom for watching the current document x scroll, will be updated when there is a scroll event.
A ratom for watching the current document x scroll, will be updated when there is a scroll event.
A ratom for watching the current document y scroll, will be updated when there is a scroll event.
A ratom for watching the current document y scroll, will be updated when there is a scroll event.
(spring x2)(spring x2 options)Useful for wrapping a value in your component to make it springy. Returns a reaction that will take values approaching x2, updating every time Reagent calls requestAnimationFrame. Integrates a physical spring simulation for each step. Options can contain: from - a value to start from (initial value is used if absent). velocity of the mass on the spring (initially 0 if absent). mass, stiffness, damping of the spring.
Useful for wrapping a value in your component to make it springy. Returns a reaction that will take values approaching x2, updating every time Reagent calls requestAnimationFrame. Integrates a physical spring simulation for each step. Options can contain: from - a value to start from (initial value is used if absent). velocity of the mass on the spring (initially 0 if absent). mass, stiffness, damping of the spring.
(timeline x & xs)Given a sequence of inputs, will consume them depending on their type: numbers will be a sleep in milliseconds functions will be called with no arguments vectors will be rendered as reagent components.
Given a sequence of inputs, will consume them depending on their type: numbers will be a sleep in milliseconds functions will be called with no arguments vectors will be rendered as reagent components.
(timeout f t)Call function f period t in milliseconds after being mounted in the DOM, only if still mounted.
Call function f period t in milliseconds after being mounted in the DOM, only if still mounted.
(toggle-handler ratom)Creates an event handler that will toggle a given ratom.
Creates an event handler that will toggle a given ratom.
(watch r f)Watch a ref only while mounted in the DOM.
Watch a ref only while mounted in the DOM.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |