Interactions
The Interactions examples of the Motion library, rebuilt in Composite: the same trigger, in steps, with the system's own parts.
the category
motion/_rebuilds- rebuilds
- 9
- from motion+
- 5
- easing
- steps() only
motion / interactions / pinch to rotate
after a motion.dev example- Motion
- pinch, useMotionValue
- here
- two pointers, or keys, or buttons
- a step
- 15°
- after the fingers
- nothing moves
- original
- Pinch to rotate
Two pointers turn the tile, and the left and right arrows and two buttons do the same, in whole steps of 15°. The tile stops where the fingers stop.
motion / interactions / pinch to zoom
after a motion.dev example- Motion
- pinch, a double tap
- here
- two pointers, keys, buttons
- a step
- 25 %, from 100 % to 300 %
- double tap
- 100 %, 200 %, in one cut
- original
- Pinch to zoom
A spread of two pointers, + and −, the buttons or a double tap cut the zoom to the next whole step of 25 %. The view stays at the centre.
motion / interactions / double tap to like
after a motion.dev example- Motion
- a double tap, animate
- here
- play(), 5 frames
- a frame
- 100 ms, one size
- also
- a like button
- original
- Double tap to like
Two taps within 300 ms draw a heart of block glyphs in five frames, each a size, and the count goes up. The like button does the same without the heart.
motion / interactions / add to basket
after a motion.dev example- Motion
- animate, layout
- here
- play(), 6 frames
- a frame
- 80 ms, one cell up
- landed
- the count glitches
- original
- Add to basket
A block rises to the basket in six cells, one a frame. The count goes up when it lands, and glitches.
motion / interactions / pointer collision detection
after a motion+ example- Motion
- hover, a spring per cell
- here
- every(), 80 ms
- under the pointer
- bone, then 4 greys
- keys
- the arrows move it
- original
- Pointer collision detection
The cell under the pointer, and the eight round it, cut to light. Each wears down one grey every 80 ms, so a trail follows. Under reduced motion only the cells under the pointer are lit.
motion / interactions / tilt card
after a motion+ example- Motion
- useMotionValue, a 3D tilt
- here
- Retro 3D, one tile
- a step
- 15°, to 30° each way
- keys
- arrows, one step
- original
- Tilt card
The card turns toward the quarter of the stage the pointer is in, in whole steps of 15° on both axes. It is shaded by the light, so a card that leans to the light is brighter. When the pointer leaves, the card cuts back to its three-quarter view.
motion / interactions / image reveal slider
after a motion+ example- Motion
- a drag, clip-path
- here
- a drag in whole cells
- a cell
- 8 px
- keys
- arrows, Shift for 4 cells
- original
- Image reveal slider
A divider moves in whole cells of 8 px, and cuts between two inks of the same block picture. There is no momentum.
motion / interactions / swipe actions
after a motion+ example- Motion
- drag, a spring back
- here
- a cut at 1 cell
- a cell
- 16 px
- keys
- left opens, right closes
- original
- Swipe actions
A swipe left of one cell or more cuts the row to its open state, and a swipe right cuts it back. The row never stops half way.
motion / interactions / ios notifications stack
after a motion+ example- Motion
- layout, animate
- here
- a cut between two layouts
- closed
- three cards, 6 px apart
- open
- a list, one card a row
- original
- iOS Notifications stack
A click cuts the closed stack to a list, and a click on a card removes it. The stack and the list are two layouts, with no move between them.