Buttons
The Buttons examples of the Motion library, rebuilt in Composite: the same trigger, in steps, with the system's own parts.
the category
motion/_rebuilds- rebuilds
- 8
- from motion+
- 6
- easing
- steps() only
motion / buttons / long press
after a motion.dev example- Motion
- whileTap, a timer
- here
- play(), 10 frames
- a frame
- 100 ms, the frame grows
- done
- a cut, then a Glitch
- original
- Long press
A frame draws round the button in ten steps while it is held; closed, the button cuts to unlocked and glitches. A release before then cuts the frame back to nothing.
motion / buttons / press and hold to repeat
after a motion.dev example- Motion
- whileTap, useAnimate
- here
- wait(), then every()
- first
- at once
- then
- every 120 ms, after 400 ms
- original
- Press and hold to repeat
A held press acts at once, then once every 120 ms after a 400 ms wait: each a step of the count.
motion / buttons / copy button
after a motion+ example- Motion
- AnimatePresence, layout
- here
- a cut, then a Glitch
- copied
- 1.5 s
- a failed copy
- a Fault
- original
- Copy Button
The label cuts to copied, with a check, for 1.5 s; a copy that fails is a Fault.
motion / buttons / dots morph button
after a motion+ example- Motion
- whileHover, whileTap
- here
- the State set
- at rest
- four squares
- hover
- a cross, in one cut
- original
- Dots Morph Button
Four squares cut to a cross on hover or keyboard focus; nothing moves between the two shapes.
motion / buttons / confetti
after a motion+ example- Motion
- animate, per piece
- here
- play(), 6 frames
- a frame
- 80 ms, 2 steps
- pieces
- 16 block glyphs, falling
- original
- Confetti
Block glyphs fall from the button in six frames, in two inks, and wear down to nothing.
motion / buttons / material design: ripple
after a motion+ example- Motion
- AnimatePresence, a scale
- here
- play(), 5 rings
- a frame
- 80 ms, 2 steps
- from
- the press point
- original
- Material Design: Ripple
Square rings grow from the press point, one ring a step, then are gone.
motion / buttons / hold to confirm
after a motion+ example- Motion
- useMotionValue
- here
- play(), 12 frames
- a frame
- 100 ms, the frame grows
- let go
- back to empty
- original
- Hold to confirm
A frame draws round the button in twelve steps while it is held; closed, the button cuts to confirmed. A release before then cuts the frame back to nothing.
motion / buttons / multi state badge
after a motion+ example- Motion
- AnimatePresence
- here
- a cut a state
- sending
- the scan mark
- failed
- a Fault
- original
- Multi state badge
The badge cuts from state to state: ready, sending with the scan mark, then sent, or failed as a Fault.