Controls
Spring editor
a spring in time (duration, bounce) or physics (stiffness, damping, mass) · the switch converts · graph and preview
function SpringEditorDemo() { const [spring, setSpring] = React.useState<Spring>({ mode: 'time', visualDuration: 0.35, bounce: 0.2 }); return <SpringEditor className={narrow} label="Sheet spring" value={spring} onChange={setSpring} />;}Usage
Time mode is Motion’s visualDuration and bounce; physics mode is what Reanimated and React Spring take. Both describe the same spring.
API
<SpringEditor label value={{ mode: 'time', visualDuration, bounce }} onChange />Get it
Already in every copy of the web kit:
import { SpringEditor } from '@/components/controls/spring-editor';Details
- Exports
SpringEditor- Packages
- cn@^0.5.2
- Installs with
- @halftone-web/control-segmented, @halftone-web/curve-editor, @halftone-web/lib-controls-spring, @halftone-web/number-field
- Also searched as
- spring, physics, stiffness, damping, bounce, motion
- Registry JSON
- /r/web/spring-editor.json
Agents: the whole registry is at /llms.txt.