
UI controls · 486 KB
Impact button
Squash, a held impact frame, rolling smoke, and a big finish.
Customize, download & embed ↗FREE RIVE DOWNLOAD · UI CONTROLS
A Rive toggle switch whose thumb stretches across the track and lands in a violet splash. The painted animation is embedded in the single Rive file.
Live Rive preview. Motion follows your reduced-motion preference.
Set sq-element type to toggle, give it a descriptive label, and bind checked to your preference. Read checked in the change event before saving the setting in your application.
<script type="module" src="https://thesidequest.studio/elements/elements.js?v=20261128-library-rigging"></script>
<sq-element type="toggle" checked></sq-element>Connect public properties through the view model, or use the web component’s attributes and methods. The integration guides explain embedding, dynamic text, accessibility, and self-hosting.
| Property | Meaning |
|---|---|
State machine / view model | Element |
checked | true / false |
reducedMotion | true / false |
label | Editable label |
action | Increment to replay an effect |
Changing checked moves between the off and on states and plays the splash treatment. This toggle embeds the original 43 painted frames rather than constructing the splash from vector particles. The Element view model also exposes disabled, reducedMotion, and action.
The web component uses a native checkbox with switch semantics, a label, and keyboard support. Reduced motion selects the final on or off frame so the current setting remains visible.