motionary 10.0.0 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/AGENTS.md +61 -0
  2. package/CHANGELOG.md +36 -0
  3. package/README.md +82 -0
  4. package/bin/create-motionary-plugin.mjs +124 -0
  5. package/dist/chunks/keyframes-W-474DMc.js +183 -0
  6. package/dist/chunks/keyframes-W-474DMc.js.map +1 -0
  7. package/dist/chunks/keyframes-ZheOkpt0.cjs +187 -0
  8. package/dist/chunks/keyframes-ZheOkpt0.cjs.map +1 -0
  9. package/dist/chunks/registry-BIEjKngP.js +69 -0
  10. package/dist/chunks/registry-BIEjKngP.js.map +1 -0
  11. package/dist/chunks/registry-eJgpFAzI.cjs +81 -0
  12. package/dist/chunks/registry-eJgpFAzI.cjs.map +1 -0
  13. package/dist/chunks/ticker-CM_56oVy.js +70 -0
  14. package/dist/chunks/ticker-CM_56oVy.js.map +1 -0
  15. package/dist/chunks/ticker-D4o6enH0.cjs +72 -0
  16. package/dist/chunks/ticker-D4o6enH0.cjs.map +1 -0
  17. package/dist/chunks/tween-CBuWYpI-.cjs +487 -0
  18. package/dist/chunks/tween-CBuWYpI-.cjs.map +1 -0
  19. package/dist/chunks/tween-CqX1JBuj.js +476 -0
  20. package/dist/chunks/tween-CqX1JBuj.js.map +1 -0
  21. package/dist/components/core.cjs +106 -0
  22. package/dist/components/core.cjs.map +1 -1
  23. package/dist/components/core.d.cts +44 -2
  24. package/dist/components/core.d.ts +44 -2
  25. package/dist/components/core.js +105 -1
  26. package/dist/components/core.js.map +1 -1
  27. package/dist/components/marketplace.cjs +104 -0
  28. package/dist/components/marketplace.cjs.map +1 -1
  29. package/dist/components/marketplace.d.cts +33 -2
  30. package/dist/components/marketplace.d.ts +33 -2
  31. package/dist/components/marketplace.js +101 -1
  32. package/dist/components/marketplace.js.map +1 -1
  33. package/dist/components/widgets.cjs +623 -199
  34. package/dist/components/widgets.cjs.map +1 -1
  35. package/dist/components/widgets.d.cts +186 -2
  36. package/dist/components/widgets.d.ts +186 -2
  37. package/dist/components/widgets.js +620 -201
  38. package/dist/components/widgets.js.map +1 -1
  39. package/dist/llms-full.txt +3115 -0
  40. package/dist/llms.txt +211 -0
  41. package/dist/manifest.json +7820 -0
  42. package/dist/manifest.schema.json +85 -0
  43. package/dist/runtime/format-css.cjs +185 -0
  44. package/dist/runtime/format-css.cjs.map +1 -0
  45. package/dist/runtime/format-css.d.cts +174 -0
  46. package/dist/runtime/format-css.d.ts +174 -0
  47. package/dist/runtime/format-css.iife.js +2 -0
  48. package/dist/runtime/format-css.iife.js.map +1 -0
  49. package/dist/runtime/format-css.js +177 -0
  50. package/dist/runtime/format-css.js.map +1 -0
  51. package/dist/runtime/format-motion.cjs +139 -0
  52. package/dist/runtime/format-motion.cjs.map +1 -0
  53. package/dist/runtime/format-motion.d.cts +208 -0
  54. package/dist/runtime/format-motion.d.ts +208 -0
  55. package/dist/runtime/format-motion.iife.js +2 -0
  56. package/dist/runtime/format-motion.iife.js.map +1 -0
  57. package/dist/runtime/format-motion.js +133 -0
  58. package/dist/runtime/format-motion.js.map +1 -0
  59. package/dist/runtime/format-svg.cjs +457 -0
  60. package/dist/runtime/format-svg.cjs.map +1 -0
  61. package/dist/runtime/format-svg.d.cts +214 -0
  62. package/dist/runtime/format-svg.d.ts +214 -0
  63. package/dist/runtime/format-svg.iife.js +2 -0
  64. package/dist/runtime/format-svg.iife.js.map +1 -0
  65. package/dist/runtime/format-svg.js +446 -0
  66. package/dist/runtime/format-svg.js.map +1 -0
  67. package/dist/runtime/scroll.cjs +301 -0
  68. package/dist/runtime/scroll.cjs.map +1 -0
  69. package/dist/runtime/scroll.d.cts +236 -0
  70. package/dist/runtime/scroll.d.ts +236 -0
  71. package/dist/runtime/scroll.iife.js +2 -0
  72. package/dist/runtime/scroll.iife.js.map +1 -0
  73. package/dist/runtime/scroll.js +292 -0
  74. package/dist/runtime/scroll.js.map +1 -0
  75. package/dist/runtime.cjs +79 -0
  76. package/dist/runtime.cjs.map +1 -0
  77. package/dist/runtime.d.cts +236 -0
  78. package/dist/runtime.d.ts +236 -0
  79. package/dist/runtime.iife.js +2 -0
  80. package/dist/runtime.iife.js.map +1 -0
  81. package/dist/runtime.js +55 -0
  82. package/dist/runtime.js.map +1 -0
  83. package/dist/widgets.umd.js +1 -1
  84. package/dist/widgets.umd.js.map +1 -1
  85. package/docs/ROADMAP.md +69 -38
  86. package/docs/ai-prompt-guide.md +54 -0
  87. package/docs/components/README.md +253 -0
  88. package/docs/components/usa-accordion.md +38 -0
  89. package/docs/components/usa-acrylic.md +38 -0
  90. package/docs/components/usa-add-to-cart.md +40 -0
  91. package/docs/components/usa-ambient.md +32 -0
  92. package/docs/components/usa-anim-icon.md +34 -0
  93. package/docs/components/usa-audio.md +38 -0
  94. package/docs/components/usa-aurora.md +36 -0
  95. package/docs/components/usa-auto-animate.md +44 -0
  96. package/docs/components/usa-auto-skeleton.md +38 -0
  97. package/docs/components/usa-avatar-stack.md +38 -0
  98. package/docs/components/usa-back-to-top.md +32 -0
  99. package/docs/components/usa-badge-wall.md +39 -0
  100. package/docs/components/usa-badge.md +36 -0
  101. package/docs/components/usa-bar-chart.md +33 -0
  102. package/docs/components/usa-bg-generator.md +32 -0
  103. package/docs/components/usa-blobs.md +32 -0
  104. package/docs/components/usa-bottom-sheet.md +32 -0
  105. package/docs/components/usa-button.md +78 -0
  106. package/docs/components/usa-card-stack.md +40 -0
  107. package/docs/components/usa-card.md +94 -0
  108. package/docs/components/usa-carousel-3d.md +40 -0
  109. package/docs/components/usa-carousel.md +40 -0
  110. package/docs/components/usa-cart-drawer.md +33 -0
  111. package/docs/components/usa-chapter-nav.md +40 -0
  112. package/docs/components/usa-chat-composer.md +33 -0
  113. package/docs/components/usa-check.md +32 -0
  114. package/docs/components/usa-checkbox.md +32 -0
  115. package/docs/components/usa-click.md +36 -0
  116. package/docs/components/usa-clock-control.md +37 -0
  117. package/docs/components/usa-code-export.md +36 -0
  118. package/docs/components/usa-color-picker.md +32 -0
  119. package/docs/components/usa-command-palette.md +39 -0
  120. package/docs/components/usa-compare.md +38 -0
  121. package/docs/components/usa-countdown.md +32 -0
  122. package/docs/components/usa-counter.md +32 -0
  123. package/docs/components/usa-cube-gallery.md +40 -0
  124. package/docs/components/usa-cube.md +36 -0
  125. package/docs/components/usa-cursor.md +32 -0
  126. package/docs/components/usa-date-picker.md +32 -0
  127. package/docs/components/usa-depth.md +44 -0
  128. package/docs/components/usa-dialog.md +40 -0
  129. package/docs/components/usa-disclosure.md +38 -0
  130. package/docs/components/usa-distort.md +36 -0
  131. package/docs/components/usa-dock.md +40 -0
  132. package/docs/components/usa-dot-network.md +32 -0
  133. package/docs/components/usa-double-tap.md +36 -0
  134. package/docs/components/usa-draggable.md +38 -0
  135. package/docs/components/usa-draw.md +36 -0
  136. package/docs/components/usa-drawer.md +34 -0
  137. package/docs/components/usa-equalizer.md +33 -0
  138. package/docs/components/usa-fab.md +40 -0
  139. package/docs/components/usa-festival-banner.md +32 -0
  140. package/docs/components/usa-field.md +34 -0
  141. package/docs/components/usa-file-drop.md +35 -0
  142. package/docs/components/usa-fullpage.md +38 -0
  143. package/docs/components/usa-fx.md +851 -0
  144. package/docs/components/usa-gauge.md +32 -0
  145. package/docs/components/usa-gen-art.md +32 -0
  146. package/docs/components/usa-gesture-fx.md +36 -0
  147. package/docs/components/usa-gesture-sticker.md +36 -0
  148. package/docs/components/usa-glitch.md +32 -0
  149. package/docs/components/usa-globe.md +33 -0
  150. package/docs/components/usa-gradient-text.md +32 -0
  151. package/docs/components/usa-grain.md +36 -0
  152. package/docs/components/usa-grid-glow.md +36 -0
  153. package/docs/components/usa-gyro-card.md +38 -0
  154. package/docs/components/usa-handwriting.md +32 -0
  155. package/docs/components/usa-hero-video.md +38 -0
  156. package/docs/components/usa-hold.md +32 -0
  157. package/docs/components/usa-hud-panel.md +38 -0
  158. package/docs/components/usa-hydrate.md +42 -0
  159. package/docs/components/usa-icon-morph.md +34 -0
  160. package/docs/components/usa-install-button.md +32 -0
  161. package/docs/components/usa-kanban.md +46 -0
  162. package/docs/components/usa-keyframe-editor.md +37 -0
  163. package/docs/components/usa-kpi.md +32 -0
  164. package/docs/components/usa-leaderboard.md +41 -0
  165. package/docs/components/usa-like.md +32 -0
  166. package/docs/components/usa-liquid-nav.md +36 -0
  167. package/docs/components/usa-liquid.md +36 -0
  168. package/docs/components/usa-loading-bar.md +35 -0
  169. package/docs/components/usa-location-card.md +34 -0
  170. package/docs/components/usa-lottie-icon.md +34 -0
  171. package/docs/components/usa-lottie.md +32 -0
  172. package/docs/components/usa-lyrics.md +38 -0
  173. package/docs/components/usa-magnetic.md +32 -0
  174. package/docs/components/usa-marquee.md +38 -0
  175. package/docs/components/usa-mask-reveal.md +36 -0
  176. package/docs/components/usa-masonry-flow.md +42 -0
  177. package/docs/components/usa-masonry.md +38 -0
  178. package/docs/components/usa-menu-toggle.md +34 -0
  179. package/docs/components/usa-menu.md +44 -0
  180. package/docs/components/usa-message-list.md +39 -0
  181. package/docs/components/usa-milestones.md +40 -0
  182. package/docs/components/usa-modal.md +42 -0
  183. package/docs/components/usa-morph.md +34 -0
  184. package/docs/components/usa-motion-inspector.md +32 -0
  185. package/docs/components/usa-motion-prefs.md +32 -0
  186. package/docs/components/usa-motion-spec.md +32 -0
  187. package/docs/components/usa-motion-switch.md +34 -0
  188. package/docs/components/usa-motion-theme.md +40 -0
  189. package/docs/components/usa-motion.md +42 -0
  190. package/docs/components/usa-music-player.md +36 -0
  191. package/docs/components/usa-native-preview.md +36 -0
  192. package/docs/components/usa-nav-morph.md +40 -0
  193. package/docs/components/usa-navbar.md +36 -0
  194. package/docs/components/usa-notification-bell.md +37 -0
  195. package/docs/components/usa-odometer.md +34 -0
  196. package/docs/components/usa-organic-card.md +36 -0
  197. package/docs/components/usa-otp.md +33 -0
  198. package/docs/components/usa-overscroll.md +36 -0
  199. package/docs/components/usa-pack.md +111 -0
  200. package/docs/components/usa-pagination.md +32 -0
  201. package/docs/components/usa-panorama.md +32 -0
  202. package/docs/components/usa-particles.md +32 -0
  203. package/docs/components/usa-pause-all.md +32 -0
  204. package/docs/components/usa-perf-monitor.md +32 -0
  205. package/docs/components/usa-pinch-zoom.md +36 -0
  206. package/docs/components/usa-player.md +38 -0
  207. package/docs/components/usa-plugin-card.md +61 -0
  208. package/docs/components/usa-plugin-store.md +36 -0
  209. package/docs/components/usa-popover.md +38 -0
  210. package/docs/components/usa-post-fx.md +36 -0
  211. package/docs/components/usa-presence.md +36 -0
  212. package/docs/components/usa-press.md +32 -0
  213. package/docs/components/usa-prize-wheel.md +32 -0
  214. package/docs/components/usa-product-gallery.md +40 -0
  215. package/docs/components/usa-progress-ring.md +38 -0
  216. package/docs/components/usa-progress.md +34 -0
  217. package/docs/components/usa-prop-panel.md +34 -0
  218. package/docs/components/usa-pull-cord.md +32 -0
  219. package/docs/components/usa-pull-refresh.md +37 -0
  220. package/docs/components/usa-radar.md +32 -0
  221. package/docs/components/usa-reactions.md +32 -0
  222. package/docs/components/usa-red-envelope.md +32 -0
  223. package/docs/components/usa-retro-button.md +34 -0
  224. package/docs/components/usa-reveal.md +36 -0
  225. package/docs/components/usa-ripple.md +32 -0
  226. package/docs/components/usa-scene.md +38 -0
  227. package/docs/components/usa-scramble.md +32 -0
  228. package/docs/components/usa-scroll-highlight.md +34 -0
  229. package/docs/components/usa-scroll-progress.md +36 -0
  230. package/docs/components/usa-scroll-scene.md +66 -0
  231. package/docs/components/usa-scrolly.md +40 -0
  232. package/docs/components/usa-segmented.md +40 -0
  233. package/docs/components/usa-shader.md +74 -0
  234. package/docs/components/usa-sheet.md +42 -0
  235. package/docs/components/usa-shimmer-text.md +32 -0
  236. package/docs/components/usa-shortcut.md +34 -0
  237. package/docs/components/usa-skeleton-reveal.md +42 -0
  238. package/docs/components/usa-skeleton.md +36 -0
  239. package/docs/components/usa-sketch-chart.md +32 -0
  240. package/docs/components/usa-slider.md +32 -0
  241. package/docs/components/usa-sparkline.md +32 -0
  242. package/docs/components/usa-spatial-card.md +40 -0
  243. package/docs/components/usa-spinner.md +34 -0
  244. package/docs/components/usa-splash.md +36 -0
  245. package/docs/components/usa-split-text.md +32 -0
  246. package/docs/components/usa-spotlight.md +40 -0
  247. package/docs/components/usa-spring.md +42 -0
  248. package/docs/components/usa-stagger.md +40 -0
  249. package/docs/components/usa-star-rating.md +34 -0
  250. package/docs/components/usa-stepper.md +42 -0
  251. package/docs/components/usa-sticky-stack.md +40 -0
  252. package/docs/components/usa-sticky-wall.md +40 -0
  253. package/docs/components/usa-stories.md +38 -0
  254. package/docs/components/usa-story.md +80 -0
  255. package/docs/components/usa-suggestion-chips.md +32 -0
  256. package/docs/components/usa-swipe-deck.md +40 -0
  257. package/docs/components/usa-swipeable.md +36 -0
  258. package/docs/components/usa-switch.md +32 -0
  259. package/docs/components/usa-tab-bar.md +46 -0
  260. package/docs/components/usa-tabs.md +40 -0
  261. package/docs/components/usa-terminal.md +38 -0
  262. package/docs/components/usa-text-rotate.md +32 -0
  263. package/docs/components/usa-theme-surface.md +36 -0
  264. package/docs/components/usa-theme-switcher.md +32 -0
  265. package/docs/components/usa-tilt.md +36 -0
  266. package/docs/components/usa-timeline.md +40 -0
  267. package/docs/components/usa-tip.md +44 -0
  268. package/docs/components/usa-toast-stack.md +36 -0
  269. package/docs/components/usa-toaster.md +36 -0
  270. package/docs/components/usa-typewriter.md +32 -0
  271. package/docs/components/usa-upload-progress.md +33 -0
  272. package/docs/components/usa-video-card.md +40 -0
  273. package/docs/components/usa-view-switch.md +38 -0
  274. package/docs/components/usa-voice-button.md +33 -0
  275. package/docs/components/usa-volume-knob.md +32 -0
  276. package/docs/components/usa-water-ripple.md +36 -0
  277. package/docs/components/usa-wave-text.md +32 -0
  278. package/docs/components/usa-weather-card.md +32 -0
  279. package/docs/components/usa-worker-canvas.md +32 -0
  280. package/docs/components/usa-xp-bar.md +33 -0
  281. package/docs/components.md +105 -0
  282. package/docs/runtime/core.md +55 -0
  283. package/docs/runtime/format-css.md +59 -0
  284. package/docs/runtime/format-motion.md +56 -0
  285. package/docs/runtime/format-svg.md +62 -0
  286. package/docs/runtime/scroll.md +61 -0
  287. package/package.json +71 -7
@@ -0,0 +1,3115 @@
1
+ # Motionary 10.2.0 — full component reference
2
+
3
+ Generated from the source. Machine-readable version: https://harrisoncn.github.io/Motionary/components.json (schema https://harrisoncn.github.io/Motionary/components.schema.json).
4
+
5
+ ## Runtime modules
6
+
7
+ ### motionary/runtime — Runtime core
8
+
9
+ Shared ticker (one rAF loop), tween + timeline engine with easing, module registry with clear errors.
10
+
11
+ - Install: `npm i motionary`
12
+ - Import: `motionary/runtime`
13
+ - Register: `use();` — Import motionary/runtime and call use() once at start-up, before any runtime-powered component mounts. CDN: the IIFE registers itself (window.MotionaryRuntime).
14
+ - CDN:
15
+
16
+ ```html
17
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
18
+ ```
19
+
20
+ ```js
21
+ import { use, tween, timeline } from 'motionary/runtime';
22
+ use();
23
+ tween('.box', { to: { x: 120, opacity: 1 }, duration: 500, ease: 'back-out' });
24
+ timeline().to('.a', { to: { y: -20 } }).to('.b', { to: { scale: 1.2 } }, '<+=100');
25
+ ```
26
+
27
+ ### motionary/runtime/format-css — CSS @keyframes & WAAPI keyframes loader
28
+
29
+ Import CSS @keyframes text or live CSSKeyframesRule objects and Web Animations API keyframes (array or property-indexed) into a runtime timeline.
30
+
31
+ - Install: `npm i motionary`
32
+ - Import: `motionary/runtime/format-css`
33
+ - Register: `use(formatCss);` — Register the core first, then the module: use(formatCss) also registers the core. CDN: load runtime.iife.js, then runtime/format-css.iife.js (it registers itself).
34
+ - CDN:
35
+
36
+ ```html
37
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
38
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-css.iife.js"></script>
39
+ ```
40
+
41
+ ```js
42
+ import { use } from 'motionary/runtime';
43
+ import { formatCss, parseKeyframes, playKeyframes } from 'motionary/runtime/format-css';
44
+ use(formatCss);
45
+ const [pulse] = parseKeyframes('@keyframes pulse { from { opacity: .4 } 50% { opacity: 1; transform: scale(1.1) } to { opacity: .4 } }');
46
+ playKeyframes(document.querySelector('.dot'), pulse, { duration: 1200, repeat: -1 });
47
+ ```
48
+
49
+ ### motionary/runtime/format-motion — Motion / Framer keyframe JSON loader
50
+
51
+ Play Motion / Framer-style { initial, animate, transition } JSON (arrays as keyframes, times, repeatType, springs) with the runtime.
52
+
53
+ - Install: `npm i motionary`
54
+ - Import: `motionary/runtime/format-motion`
55
+ - Register: `use(formatMotion);` — Register the core first, then the module: use(formatMotion) also registers the core. CDN: load runtime.iife.js, then runtime/format-motion.iife.js (it registers itself).
56
+ - CDN:
57
+
58
+ ```html
59
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
60
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-motion.iife.js"></script>
61
+ ```
62
+
63
+ ```js
64
+ import { use } from 'motionary/runtime';
65
+ import { formatMotion, playMotion } from 'motionary/runtime/format-motion';
66
+ use(formatMotion);
67
+ playMotion(document.querySelector('.card'), { initial: { opacity: 0, y: 40 }, animate: { opacity: 1, y: 0 }, transition: { type: 'spring', stiffness: 180, damping: 14 } });
68
+ ```
69
+
70
+ ### motionary/runtime/scroll — Scroll scenes
71
+
72
+ Scroll-linked scenes: start / end rules, scrub (direct or smoothed), pin, markers, enter / leave callbacks and per-edge actions for a runtime tween or timeline.
73
+
74
+ - Install: `npm i motionary`
75
+ - Import: `motionary/runtime/scroll`
76
+ - Register: `use(scroll);` — Register the core first, then the module: use(scroll) also registers the core. CDN: load runtime.iife.js, then runtime/scroll.iife.js (it registers itself).
77
+ - CDN:
78
+
79
+ ```html
80
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
81
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/scroll.iife.js"></script>
82
+ ```
83
+
84
+ ```js
85
+ import { use, timeline } from 'motionary/runtime';
86
+ import { scroll, scrollScene } from 'motionary/runtime/scroll';
87
+ use(scroll);
88
+ const tl = timeline({ paused: true }).to('.card', { to: { x: 200, rotate: 8 } });
89
+ scrollScene({ trigger: '.section', start: 'top 80%', end: 'bottom 20%', scrub: 120, pin: true, markers: true, animation: tl });
90
+ ```
91
+
92
+ ### motionary/runtime/format-svg — SVG loader: SMIL playback + path morphing
93
+
94
+ Replay SVG SMIL animations (animate, set, animateTransform, animateMotion) on the runtime timeline, morph between any two paths, and measure paths without the DOM.
95
+
96
+ - Install: `npm i motionary`
97
+ - Import: `motionary/runtime/format-svg`
98
+ - Register: `use(formatSvg);` — Register the core first, then the module: use(formatSvg) also registers the core. CDN: load runtime.iife.js, then runtime/format-svg.iife.js (it registers itself).
99
+ - CDN:
100
+
101
+ ```html
102
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
103
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-svg.iife.js"></script>
104
+ ```
105
+
106
+ ```js
107
+ import { use } from 'motionary/runtime';
108
+ import { formatSvg, playSmil, morphPath } from 'motionary/runtime/format-svg';
109
+ use(formatSvg);
110
+ const player = playSmil(document.querySelector('svg'));
111
+ player.timeline.timeScale = 0.5; // scrub / slow down / reverse like any runtime timeline
112
+ const f = morphPath('M0 0 L100 0 L50 80 Z', 'M50 0 A40 40 0 1 1 49.9 0 Z');
113
+ path.setAttribute('d', f(0.5));
114
+ ```
115
+
116
+ ## Components
117
+
118
+ ### <usa-accordion> — Accordion
119
+
120
+ Smooth expand / collapse for native <details> — semantics, keyboard and find-in-page kept; no wrapper elements.
121
+
122
+ - Import: `import { defineAccordion } from 'motionary/components/transitions'; defineAccordion();`
123
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
124
+ - Events: `usa:toggle`
125
+ - Methods: `toggleItem()`
126
+
127
+ ```html
128
+ <usa-accordion>
129
+ <details><summary>Shipping</summary><p>…</p></details>
130
+ <details><summary>Returns</summary><p>…</p></details>
131
+ </usa-accordion>
132
+ ```
133
+
134
+ ### <usa-acrylic> — Acrylic & Mica
135
+
136
+ Windows Fluent materials: frosted acrylic (backdrop blur + tint + noise) and mica. Solid fallback when transparency is reduced.
137
+
138
+ - Import: `import { defineAcrylic } from 'motionary/components/background'; defineAcrylic();`
139
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
140
+ - Attributes: `tint`, `tint-opacity`, `blur`, `shimmer`
141
+
142
+ ```html
143
+ <usa-acrylic shimmer="hover">
144
+ <nav>…</nav>
145
+ </usa-acrylic>
146
+ <usa-acrylic kind="mica">…</usa-acrylic>
147
+ ```
148
+
149
+ ### <usa-add-to-cart> — Add to cart (fly-to-cart)
150
+
151
+ 7.3: a buy button — the product photo flies on an arc into the cart, the cart badge bumps and the button morphs into a ✓ “Added” state. Works with <usa-cart-drawer> (calls add(item)) or any [data-cart] icon.
152
+
153
+ - Import: `import { defineAddToCart } from 'motionary/components/widgets'; defineAddToCart();`
154
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
155
+ - Events: `usa:add`
156
+ - Methods: `add()`
157
+
158
+ ```html
159
+ <usa-cart-drawer id="cart"></usa-cart-drawer>
160
+ <div data-product>
161
+ <img src="shoe.jpg" alt="Sneaker">
162
+ <usa-add-to-cart cart="#cart" item='{"name":"Sneaker","price":89}'></usa-add-to-cart>
163
+ </div>
164
+ ```
165
+
166
+ ### <usa-ambient> — Ambient layer
167
+
168
+ A fixed page-wide layer: drifting particles, falling snow, twinkling stars, film grain or a gradient that shifts with scroll.
169
+
170
+ - Import: `import { defineAmbient } from 'motionary/components/page'; defineAmbient();`
171
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
172
+ - Attributes: `effect`, `density`, `color`
173
+ - Methods: `mount()`, `upd()`, `resize()`, `resize()`, `draw()`, `draw()`, `unmount()`, `caf()`
174
+
175
+ ```html
176
+ <usa-ambient effect="snow" density="1.2"></usa-ambient>
177
+ ```
178
+
179
+ ### <usa-anim-icon> — Animated icons
180
+
181
+ Stroke icons that move: the bell rings, the heart beats, the check draws, the gear turns. Hover, click, in view or loop; decorative unless labelled.
182
+
183
+ - Import: `import { defineAnimIcon } from 'motionary/components/svg'; defineAnimIcon();`
184
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
185
+ - Attributes: `name`, `size`, `label`
186
+ - Methods: `play()`
187
+
188
+ ```html
189
+ <usa-anim-icon name="bell" label="Notifications"></usa-anim-icon>
190
+ <usa-anim-icon name="heart" trigger="click"></usa-anim-icon>
191
+ ```
192
+
193
+ ### <usa-audio> — Beat-triggered effects
194
+
195
+ 5.6: <usa-audio> renders a toggle (a user gesture starts Web Audio), detects beats and plays any registered effect on children with data-usa-beat="effect". JS: bindBeat(el, "pop"). Beats play nothing under reduced motion.
196
+
197
+ - Import: `import { defineAudio } from 'motionary/components/effects'; defineAudio();`
198
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
199
+ - Attributes: `source`
200
+ - Methods: `toggle()`
201
+
202
+ ```html
203
+ <audio id="track" src="song.mp3" controls></audio>
204
+ <usa-audio source="#track" label="Play with visuals">
205
+ <div data-usa-beat="pop">♪</div>
206
+ </usa-audio>
207
+ ```
208
+
209
+ ### <usa-aurora> — Aurora
210
+
211
+ A slow drifting gradient mesh behind its content. Transforms only, paused off-screen, still under reduced motion.
212
+
213
+ - Import: `import { defineAurora } from 'motionary/components/background'; defineAurora();`
214
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
215
+ - Attributes: `colors`, `speed`, `intensity`
216
+
217
+ ```html
218
+ <usa-aurora colors="#7c5cff,#22d3ee,#f472b6">
219
+ <h1>Hero</h1>
220
+ </usa-aurora>
221
+ ```
222
+
223
+ ### <usa-auto-animate> — Auto-animate
224
+
225
+ Wrap a list or grid: items that are added fade in, removed ones fade out in place, and everything else glides to its new spot — on sort, filter or resize. Zero code at the call site.
226
+
227
+ - Import: `import { defineAutoAnimate } from 'motionary/components/layout'; defineAutoAnimate();`
228
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
229
+ - Methods: `enable()`, `disable()`
230
+
231
+ ```html
232
+ <usa-auto-animate>
233
+ <ul class="todo">…</ul>
234
+ </usa-auto-animate>
235
+
236
+ <!-- or on any element: -->
237
+ <script type="module">
238
+ import { autoAnimate } from 'motionary/components/layout';
239
+ autoAnimate(document.querySelector('.grid'));
240
+ </script>
241
+ ```
242
+
243
+ ### <usa-auto-skeleton> — Auto skeleton
244
+
245
+ Set loading and every heading, paragraph, image and button inside becomes a shimmering placeholder of its own size — no extra markup.
246
+
247
+ - Import: `import { defineAutoSkeleton } from 'motionary/components/page'; defineAutoSkeleton();`
248
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
249
+ - Attributes: `loading`
250
+
251
+ ```html
252
+ <usa-auto-skeleton loading>
253
+ <h3>{{ title }}</h3>
254
+ <p>{{ body }}</p>
255
+ </usa-auto-skeleton>
256
+ ```
257
+
258
+ ### <usa-avatar-stack> — Avatar stack
259
+
260
+ Overlapping avatars that spread apart with a spring on hover; extras collapse into “+N”.
261
+
262
+ - Import: `import { defineAvatarStack } from 'motionary/components/ui'; defineAvatarStack();`
263
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
264
+ - Attributes: `max`, `size`, `overlap`
265
+ - Methods: `adoptVariants()`, `mount()`
266
+
267
+ ```html
268
+ <usa-avatar-stack max="4">
269
+ <img src="a.jpg" alt="Ana">
270
+ …
271
+ </usa-avatar-stack>
272
+ ```
273
+
274
+ ### <usa-back-to-top> — Back to top
275
+
276
+ Appears after you scroll, shows reading progress as a ring and springs the page back up, then moves focus to the top.
277
+
278
+ - Import: `import { defineBackToTop } from 'motionary/components/page'; defineBackToTop();`
279
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
280
+
281
+ ```html
282
+ <usa-back-to-top offset="400"></usa-back-to-top>
283
+ ```
284
+
285
+ ### <usa-badge> — Badge
286
+
287
+ Count or dot badge that bumps with a spring when its value changes; 99+ capping, optional pulse.
288
+
289
+ - Import: `import { defineBadge } from 'motionary/components/ui'; defineBadge();`
290
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
291
+ - Attributes: `value`, `max`, `dot`, `label`
292
+
293
+ ```html
294
+ <usa-badge value="3">
295
+ <button>Inbox</button>
296
+ </usa-badge>
297
+ ```
298
+
299
+ ### <usa-badge-wall> — Badge wall
300
+
301
+ 7.5: an achievement grid — locked badges are grey with a 🔒; unlock(name) flips a badge to its colour side with a shine and the “n / m unlocked” counter updates.
302
+
303
+ - Import: `import { defineBadgeWall } from 'motionary/components/widgets'; defineBadgeWall();`
304
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
305
+ - Events: `usa:unlock`
306
+ - Methods: `unlock()`
307
+
308
+ ```html
309
+ <usa-badge-wall>
310
+ <li data-icon="🏆">First win</li>
311
+ <li data-icon="🔥" data-locked>7-day streak</li>
312
+ </usa-badge-wall>
313
+ <script>wall.unlock('7-day streak');</script>
314
+ ```
315
+
316
+ ### <usa-bar-chart> — Animated bar chart
317
+
318
+ 7.2: bars grow from the baseline in a stagger on first view and new data glides every bar to its new height — bars that appear grow in, bars that leave shrink away. Data from values/labels, <data> children or the data property.
319
+
320
+ - Import: `import { defineBarChart } from 'motionary/components/widgets'; defineBarChart();`
321
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
322
+ - Attributes: `horizontal`, `unit`, `max`
323
+
324
+ ```html
325
+ <usa-bar-chart values="12,19,8,15,22" labels="Mon,Tue,Wed,Thu,Fri" unit="k"></usa-bar-chart>
326
+ <script>chart.data = [{ label: 'Mon', value: 18 }, …];</script>
327
+ ```
328
+
329
+ ### <usa-bg-generator> — Background generator
330
+
331
+ 9.3: a background generator — pick a palette and a style (mesh gradient, grain, stripes, dots), shuffle the seed and copy the CSS.
332
+
333
+ - Import: `import { defineBgGenerator } from 'motionary/components/widgets'; defineBgGenerator();`
334
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
335
+ - Attributes: `label`
336
+ - Events: `usa:change`
337
+ - Methods: `shuffle()`, `copy()`
338
+
339
+ ```html
340
+ <usa-bg-generator palette="candy" style="mesh"></usa-bg-generator>
341
+ ```
342
+
343
+ ### <usa-blobs> — Fluid blobs
344
+
345
+ Soft colour blobs that slowly morph and drift — a fluid gradient backdrop.
346
+
347
+ - Import: `import { defineBlobs } from 'motionary/components/background'; defineBlobs();`
348
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
349
+ - Methods: `mount()`
350
+
351
+ ```html
352
+ <usa-blobs colors="#7c5cff,#22d3ee,#f472b6">…</usa-blobs>
353
+ ```
354
+
355
+ ### <usa-bottom-sheet> — Bottom sheet
356
+
357
+ A draggable sheet with snap points, inertia and drag-down-to-dismiss — the iOS / Android pattern for web and Windows web-view apps.
358
+
359
+ - Import: `import { defineBottomSheet } from 'motionary/components/ui'; defineBottomSheet();`
360
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
361
+ - Attributes: `open`, `snap`
362
+ - Methods: `show()`, `close()`
363
+
364
+ ```html
365
+ <usa-bottom-sheet snap="0.4,0.9" label="Filters">…</usa-bottom-sheet>
366
+ ```
367
+
368
+ ### <usa-button> — Button deformation
369
+
370
+ Spring-driven button click deformation: squash & stretch, elastic border-radius wobble, gooey liquid droplets, and a dent toward the pressed point. Combine them with deform="squash wobble".
371
+
372
+ - Import: `import { defineButton } from 'motionary/components/click'; defineButton();`
373
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
374
+ - Attributes: `deform`, `state`, `shape`, `disabled`
375
+ - Events: `usa:submit`, `usa:state`
376
+ - Methods: `morphTo()`
377
+
378
+ ```html
379
+ <usa-button deform="squash">
380
+ <button>Squash</button>
381
+ </usa-button>
382
+ <usa-button deform="gooey"><button>Gooey</button></usa-button>
383
+ <usa-button deform="dent"><button>Dent</button></usa-button>
384
+ ```
385
+
386
+ ### <usa-card> — Card
387
+
388
+ Ten card effects you can combine (effect="lift sheen"): flip (hover or click, x/y axis), holo, glass, border-glow, conic-border, lift, spotlight, sheen, parallax-layers and expand (card → detail with FLIP + spring).
389
+
390
+ - Import: `import { defineCard } from 'motionary/components/cards'; defineCard();`
391
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
392
+ - Attributes: `effect`, `trigger`, `disabled`
393
+ - Events: `usa:flip`, `usa:expand`, `usa:collapse`
394
+ - Methods: `flip()`, `expand()`, `collapse()`
395
+
396
+ ```html
397
+ <usa-card effect="lift sheen">
398
+ <h3>Pro plan</h3>
399
+ </usa-card>
400
+ <usa-card effect="flip" trigger="click">
401
+ <div data-front>Front</div>
402
+ <div data-back>Back</div>
403
+ </usa-card>
404
+ <usa-card effect="expand">
405
+ <h3>Title</h3>
406
+ <div data-detail>Long text… <button data-close>Close</button></div>
407
+ </usa-card>
408
+ ```
409
+
410
+ ### <usa-card-stack> — Swipe stack
411
+
412
+ A deck where the top card swipes away left or right (pointer, touch, arrow keys) and the next springs forward. loop sends cards to the back.
413
+
414
+ - Import: `import { defineCardStack } from 'motionary/components/cards'; defineCardStack();`
415
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
416
+ - Attributes: `visible`, `offset`, `disabled`
417
+ - Events: `usa:swipe`, `usa:empty`
418
+ - Methods: `swipe()`
419
+
420
+ ```html
421
+ <usa-card-stack loop>
422
+ <article>1</article>
423
+ <article>2</article>
424
+ <article>3</article>
425
+ </usa-card-stack>
426
+ ```
427
+
428
+ ### <usa-carousel> — Carousel / slider
429
+
430
+ 6.2: swipe, drag, arrow keys, dots and autoplay (pauses on hover, focus, off screen). Four transitions — slide, fade, scale and a 3D "cards" coverflow. Reduced motion: slides switch without movement.
431
+
432
+ - Import: `import { defineCarousel } from 'motionary/components/widgets'; defineCarousel();`
433
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
434
+ - Attributes: `effect`, `autoplay`, `loop`, `no-controls`, `no-dots`
435
+ - Events: `usa:change`
436
+ - Methods: `next()`, `prev()`, `goTo()`
437
+
438
+ ```html
439
+ <usa-carousel effect="cards" loop autoplay="4000" label="Featured">
440
+ <img src="a.jpg" alt="…">
441
+ <img src="b.jpg" alt="…">
442
+ <img src="c.jpg" alt="…">
443
+ </usa-carousel>
444
+ ```
445
+
446
+ ### <usa-carousel-3d> — 3D carousel
447
+
448
+ Items on a 3D ring, rotated by drag, arrow keys, clicks or autoplay — with spring motion. Reduced motion shows one flat item at a time.
449
+
450
+ - Import: `import { defineCarousel3d } from 'motionary/components/cards'; defineCarousel3d();`
451
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
452
+ - Attributes: `radius`, `perspective`, `autoplay`
453
+ - Events: `usa:change`
454
+ - Methods: `next()`, `prev()`, `goTo()`
455
+
456
+ ```html
457
+ <usa-carousel-3d autoplay="3000">
458
+ <img src="1.jpg" alt="">
459
+ <img src="2.jpg" alt="">
460
+ …
461
+ </usa-carousel-3d>
462
+ ```
463
+
464
+ ### <usa-cart-drawer> — Cart drawer
465
+
466
+ 7.3: a cart button with a count badge and a drawer that slides in from the side — lines slide in (or bump their quantity), removed lines collapse, the badge bumps and the total rolls. Esc / backdrop close; focus is managed.
467
+
468
+ - Import: `import { defineCartDrawer } from 'motionary/components/widgets'; defineCartDrawer();`
469
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
470
+ - Events: `usa:open`, `usa:close`, `usa:change`
471
+ - Methods: `add()`, `removeItem()`, `toggle()`
472
+
473
+ ```html
474
+ <usa-cart-drawer currency="$"></usa-cart-drawer>
475
+ <script>cart.add({ id: 'tee', name: 'T-shirt', price: 24 });</script>
476
+ ```
477
+
478
+ ### <usa-chapter-nav> — Chapter nav
479
+
480
+ 9.1: chapter navigation for long-form stories — one entry per chapter with a reading-progress bar that fills as you scroll, the current chapter highlighted, click to glide there.
481
+
482
+ - Import: `import { defineChapterNav } from 'motionary/components/widgets'; defineChapterNav();`
483
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
484
+ - Attributes: `for`, `orientation`, `label`
485
+ - Events: `usa:chapter`
486
+ - Methods: `goTo()`
487
+
488
+ ```html
489
+ <usa-chapter-nav for="#story"></usa-chapter-nav>
490
+ <article id="story">
491
+ <section data-chapter="Prologue">…</section>
492
+ <section data-chapter="The storm">…</section>
493
+ </article>
494
+ ```
495
+
496
+ ### <usa-chat-composer> — AI chat composer
497
+
498
+ 7.8: an AI chat input that grows with its text; Enter sends, the send button pops when there is text and morphs into Stop while busy, with a thinking glow running round the composer.
499
+
500
+ - Import: `import { defineChatComposer } from 'motionary/components/widgets'; defineChatComposer();`
501
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
502
+ - Attributes: `placeholder`, `label`, `rows`, `busy`
503
+ - Events: `usa:stop`, `usa:send`
504
+ - Methods: `send()`, `clear()`
505
+
506
+ ```html
507
+ <usa-chat-composer placeholder="Ask anything…"></usa-chat-composer>
508
+ <script>composer.addEventListener('usa:send', async (e) => { composer.busy = true; await ask(e.detail.text); composer.busy = false; });</script>
509
+ ```
510
+
511
+ ### <usa-check> — Result icon
512
+
513
+ The circle draws itself, then a check, cross or exclamation strokes in with a pop. Great after a payment or upload.
514
+
515
+ - Import: `import { defineCheck } from 'motionary/components/feedback'; defineCheck();`
516
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
517
+ - Attributes: `kind`, `size`, `label`
518
+ - Events: `usa:complete`
519
+ - Methods: `play()`, `reset()`
520
+
521
+ ```html
522
+ <usa-check kind="success" label="Payment complete"></usa-check>
523
+ ```
524
+
525
+ ### <usa-checkbox> — Animated checkbox
526
+
527
+ Form-associated checkbox: the box springs and the check draws itself; indeterminate state, circle shape.
528
+
529
+ - Import: `import { defineCheckbox } from 'motionary/components/click'; defineCheckbox();`
530
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
531
+ - Attributes: `checked`, `indeterminate`, `disabled`, `label`
532
+ - Events: `usa:change`
533
+ - Methods: `toggle()`
534
+
535
+ ```html
536
+ <usa-checkbox name="terms">I agree</usa-checkbox>
537
+ ```
538
+
539
+ ### <usa-click> — Click effects
540
+
541
+ Wrap anything: ripple, burst (circle, star, heart, emoji), confetti, squish, press-spring and error shake — combinable, keyboard-friendly, optional haptics.
542
+
543
+ - Import: `import { defineClick } from 'motionary/components/click'; defineClick();`
544
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
545
+ - Attributes: `effect`, `disabled`
546
+ - Events: `usa:click-effect`
547
+ - Methods: `play()`, `shake()`
548
+
549
+ ```html
550
+ <usa-click effect="press-spring burst" shape="star">
551
+ <button>Celebrate</button>
552
+ </usa-click>
553
+ ```
554
+
555
+ ### <usa-clock-control> — Motion clock control
556
+
557
+ 8.0: a pause / speed bar for the unified motion clock — pause, slow down or speed up every Motionary animation and frame loop on the page at once (motionClock in motionary/engine).
558
+
559
+ - Import: `import { defineClockControl } from 'motionary/components/widgets'; defineClockControl();`
560
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
561
+ - Attributes: `speeds`, `label`
562
+ - Events: `usa:change`
563
+
564
+ ```html
565
+ <usa-clock-control speeds="0.25,0.5,1,2"></usa-clock-control>
566
+ <script type="module">
567
+ import { motionClock, createTimeline } from 'motionary/engine';
568
+ motionClock.rate = 0.5;
569
+ createTimeline().add(a, [{ opacity: 0 }, { opacity: 1 }], 400).add(b, [{ transform: 'scale(0)' }, { transform: 'none' }], 500, '-=200').play();
570
+ </script>
571
+ ```
572
+
573
+ ### <usa-code-export> — Code export
574
+
575
+ 8.9 low-code: shows copy-paste code (HTML, React, Vue or JSON) for a live, configured component next to it, follows its attribute changes and copies with one click.
576
+
577
+ - Import: `import { defineCodeExport } from 'motionary/components/widgets'; defineCodeExport();`
578
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
579
+ - Attributes: `for`, `formats`
580
+ - Events: `usa:copy`
581
+ - Methods: `copy()`
582
+
583
+ ```html
584
+ <usa-code-export formats="html,react,vue">
585
+ <usa-star-rating value="4"></usa-star-rating>
586
+ </usa-code-export>
587
+ ```
588
+
589
+ ### <usa-color-picker> — Color picker
590
+
591
+ 6.9: a saturation / brightness square and a hue strip with spring-follow thumbs (both keyboard sliders), a preview chip that morphs to the new colour and swatches that pop.
592
+
593
+ - Import: `import { defineColorPicker } from 'motionary/components/widgets'; defineColorPicker();`
594
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
595
+ - Attributes: `swatches`
596
+ - Events: `usa:change`, `usa:input`
597
+
598
+ ```html
599
+ <usa-color-picker value="#7c5cff" swatches="#f43f5e,#f59e0b,#22c55e,#0ea5e9"></usa-color-picker>
600
+ ```
601
+
602
+ ### <usa-command-palette> — Command palette (⌘K)
603
+
604
+ 7.9: a ⌘K command palette on the native <dialog> — scales in, filters as you type with fuzzy matching and highlighted letters, results stagger in and a highlight glides between rows (↑ ↓ Enter).
605
+
606
+ - Import: `import { defineCommandPalette } from 'motionary/components/widgets'; defineCommandPalette();`
607
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
608
+ - Attributes: `placeholder`, `label`, `hotkey`, `inline`
609
+ - Events: `usa:run`, `usa:open`, `usa:close`
610
+ - Methods: `setCommands()`, `show()`, `close()`, `toggle()`
611
+
612
+ ```html
613
+ <usa-command-palette>
614
+ <option value="new" data-group="File" data-keys="mod+n">New file</option>
615
+ <option value="theme" data-group="View">Toggle theme</option>
616
+ </usa-command-palette>
617
+ <script>palette.addEventListener('usa:run', (e) => run(e.detail.id));</script>
618
+ ```
619
+
620
+ ### <usa-compare> — Before / after compare
621
+
622
+ 6.5: drag the handle (or hover with the hover attribute), click to jump, or use the keyboard slider; horizontal or vertical; an intro sweep plays once when it scrolls into view.
623
+
624
+ - Import: `import { defineCompare } from 'motionary/components/widgets'; defineCompare();`
625
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
626
+ - Attributes: `orientation`, `labels`
627
+ - Events: `usa:change`
628
+
629
+ ```html
630
+ <usa-compare labels="Before,After" intro>
631
+ <img src="before.jpg" alt="Before">
632
+ <img src="after.jpg" alt="After">
633
+ </usa-compare>
634
+ ```
635
+
636
+ ### <usa-countdown> — Flip countdown
637
+
638
+ 7.3: a split-flap countdown to a date (to) or for a number of seconds — every digit flips when it changes; fires usa:done at zero. The timer label updates once a minute so screen readers are not flooded.
639
+
640
+ - Import: `import { defineCountdown } from 'motionary/components/widgets'; defineCountdown();`
641
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
642
+ - Attributes: `to`, `seconds`
643
+ - Events: `usa:tick`, `usa:done`
644
+ - Methods: `start()`, `stop()`
645
+
646
+ ```html
647
+ <usa-countdown to="2026-12-24T00:00:00" units="d,h,m,s"></usa-countdown>
648
+ ```
649
+
650
+ ### <usa-counter> — Number counter
651
+
652
+ Counts up to a number when visible, locale-formatted with tabular digits. Set .value to animate live dashboards.
653
+
654
+ - Import: `import { defineCounter } from 'motionary/components/text'; defineCounter();`
655
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
656
+ - Attributes: `to`, `decimals`, `locale`, `prefix`, `suffix`, `grouping`
657
+ - Events: `usa:complete`
658
+ - Methods: `play()`, `format()`
659
+
660
+ ```html
661
+ <usa-counter to="128490" prefix="$" duration="2000"></usa-counter>
662
+ ```
663
+
664
+ ### <usa-cube> — 3D cube
665
+
666
+ Up to six children become the faces of a CSS 3D cube. Drag / swipe, arrow keys, autoplay or show("top"); spring-driven, the front face is the only one exposed to screen readers.
667
+
668
+ - Import: `import { defineCube } from 'motionary/components/depth'; defineCube();`
669
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
670
+ - Attributes: `size`, `autoplay`
671
+ - Events: `usa:change`
672
+ - Methods: `show()`, `next()`, `prev()`
673
+
674
+ ```html
675
+ <usa-cube size="200" autoplay="3000">
676
+ <div>Front</div><div>Right</div><div>Back</div><div>Left</div>
677
+ </usa-cube>
678
+ ```
679
+
680
+ ### <usa-cube-gallery> — Cube gallery
681
+
682
+ 6.5: slides sit on adjacent faces of a 3D cube that turns between them — swipe, arrow keys, buttons or autoplay (pauses on hover / focus / off screen); turn around the Y or X axis.
683
+
684
+ - Import: `import { defineCubeGallery } from 'motionary/components/widgets'; defineCubeGallery();`
685
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
686
+ - Attributes: `axis`, `autoplay`
687
+ - Events: `usa:change`
688
+ - Methods: `next()`, `prev()`, `goTo()`
689
+
690
+ ```html
691
+ <usa-cube-gallery autoplay="4000" label="Products">
692
+ <img src="a.jpg" alt="…">
693
+ <img src="b.jpg" alt="…">
694
+ <img src="c.jpg" alt="…">
695
+ </usa-cube-gallery>
696
+ ```
697
+
698
+ ### <usa-cursor> — Custom cursor
699
+
700
+ A spring-lagged ring, a magnetic ring that wraps buttons and links, or a soft glow following the pointer. Mouse / pen only. (6.0: for a comet tail use the comet-trail effect.)
701
+
702
+ - Import: `import { defineCursor } from 'motionary/components/page'; defineCursor();`
703
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
704
+ - Attributes: `mode`, `size`, `color`, `hide-native`
705
+
706
+ ```html
707
+ <usa-cursor mode="magnetic" hide-native></usa-cursor>
708
+ ```
709
+
710
+ ### <usa-date-picker> — Date picker
711
+
712
+ 6.9: months slide in from the direction of travel, the chosen day pops inside a spring circle, today has a ring. A real date grid: arrows, PageUp / PageDown, Home / End, min / max.
713
+
714
+ - Import: `import { defineDatePicker } from 'motionary/components/widgets'; defineDatePicker();`
715
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
716
+ - Attributes: `min`, `max`, `first-day`, `locale`
717
+ - Events: `usa:change`
718
+ - Methods: `showMonth()`
719
+
720
+ ```html
721
+ <usa-date-picker value="2026-10-08" min="2026-01-01" first-day="1"></usa-date-picker>
722
+ ```
723
+
724
+ ### <usa-depth> — Depth parallax
725
+
726
+ Layers with data-depth (-1…1) shift and scale by depth as the pointer moves, the phone tilts (source="orientation") or the page scrolls; optional whole-scene rotation.
727
+
728
+ - Import: `import { defineDepth } from 'motionary/components/depth'; defineDepth();`
729
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
730
+ - Attributes: `source`, `strength`, `rotate`
731
+ - Methods: `requestPermission()`
732
+
733
+ ```html
734
+ <usa-depth source="pointer orientation" strength="40" rotate="6">
735
+ <div class="scene">
736
+ <img data-depth="-0.6" src="sky.png" alt="">
737
+ <img data-depth="0.2" src="hills.png" alt="">
738
+ <h2 data-depth="0.8">Title</h2>
739
+ </div>
740
+ </usa-depth>
741
+ ```
742
+
743
+ ### <usa-dialog> — Modal & drawer
744
+
745
+ Animated modal, side drawers and bottom sheet on the native <dialog>: top layer, focus trap, Esc, backdrop click.
746
+
747
+ - Import: `import { defineDialog } from 'motionary/components/transitions'; defineDialog();`
748
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
749
+ - Attributes: `open`, `kind`, `label`
750
+ - Events: `usa:open`, `usa:beforeclose`, `usa:close`
751
+ - Slots: default
752
+ - Methods: `show()`, `close()`
753
+
754
+ ```html
755
+ <usa-dialog id="dlg" kind="modal" label="Settings">
756
+ <h2>Settings</h2>
757
+ <button data-close>Done</button>
758
+ </usa-dialog>
759
+ <button onclick="dlg.show()">Open</button>
760
+ ```
761
+
762
+ ### <usa-disclosure> — Accordion 2.0
763
+
764
+ 6.2: native <details> that spring open and closed (height + fade) with an overshooting chevron; one open at a time unless multiple. Find-in-page and keyboard keep working.
765
+
766
+ - Import: `import { defineDisclosure } from 'motionary/components/widgets'; defineDisclosure();`
767
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
768
+ - Events: `usa:toggle`
769
+ - Methods: `toggle()`, `openAll()`, `closeAll()`
770
+
771
+ ```html
772
+ <usa-disclosure variant="cards">
773
+ <details><summary>Shipping</summary><p>…</p></details>
774
+ <details><summary>Returns</summary><p>…</p></details>
775
+ </usa-disclosure>
776
+ ```
777
+
778
+ ### <usa-distort> — Hover distortion
779
+
780
+ The image bulges and splits into RGB around the pointer. Without WebGL (or a cross-origin image without CORS) it falls back to a gentle CSS zoom.
781
+
782
+ - Import: `import { defineDistort } from 'motionary/components/webgl'; defineDistort();`
783
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
784
+
785
+ ```html
786
+ <usa-distort>
787
+ <img src="photo.jpg" alt="…">
788
+ </usa-distort>
789
+ ```
790
+
791
+ ### <usa-dock> — macOS-style dock
792
+
793
+ 6.6: items magnify with a smooth cosine falloff as the pointer moves along the dock, neighbours make room, labels pop above the hovered item and a click bounces it. Keyboard focus magnifies too.
794
+
795
+ - Import: `import { defineDock } from 'motionary/components/widgets'; defineDock();`
796
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
797
+ - Attributes: `orientation`, `magnify`, `range`
798
+
799
+ ```html
800
+ <usa-dock magnify="1.9" bounce label="Apps">
801
+ <button data-label="Finder" aria-label="Finder">🗂</button>
802
+ <button data-label="Music" aria-label="Music">🎵</button>
803
+ <a href="/mail" data-label="Mail" aria-label="Mail">✉️</a>
804
+ </usa-dock>
805
+ ```
806
+
807
+ ### <usa-dot-network> — Dot network
808
+
809
+ A dot grid that swells and links up with lines around the pointer.
810
+
811
+ - Import: `import { defineDotNetwork } from 'motionary/components/background'; defineDotNetwork();`
812
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
813
+ - Methods: `mount()`
814
+
815
+ ```html
816
+ <usa-dot-network gap="28">…</usa-dot-network>
817
+ ```
818
+
819
+ ### <usa-double-tap> — Double tap
820
+
821
+ Double tap or double click a photo to pop a heart (or any emoji) at the tap point. L for keyboard users.
822
+
823
+ - Import: `import { defineDoubleTap } from 'motionary/components/click'; defineDoubleTap();`
824
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
825
+ - Events: `usa:double-tap`
826
+ - Methods: `pop()`
827
+
828
+ ```html
829
+ <usa-double-tap>
830
+ <img src="photo.jpg" alt="…">
831
+ </usa-double-tap>
832
+ ```
833
+
834
+ ### <usa-draggable> — Draggable
835
+
836
+ Drag with mouse, touch, pen or arrow keys. spring-back returns home with a wobble; inertia glides after a flick; snap to a grid or points; rubber-band bounds.
837
+
838
+ - Import: `import { defineDraggable } from 'motionary/components/physics'; defineDraggable();`
839
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
840
+ - Attributes: `axis`, `disabled`, `preset`
841
+ - Events: `usa:settle`, `usa:drag-start`, `usa:drag`, `usa:drag-end`
842
+ - Methods: `moveTo()`, `reset()`
843
+
844
+ ```html
845
+ <usa-draggable spring-back>
846
+ <div class="card">Drag me</div>
847
+ </usa-draggable>
848
+ <usa-draggable inertia snap="80" bounds="parent">…</usa-draggable>
849
+ ```
850
+
851
+ ### <usa-draw> — Line drawing
852
+
853
+ Every stroke of the SVG inside draws itself — on view, hover, click or scrubbed with scroll — staggered between shapes, optional fill afterwards. No getTotalLength() needed.
854
+
855
+ - Import: `import { defineDraw } from 'motionary/components/svg'; defineDraw();`
856
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
857
+ - Events: `usa:complete`
858
+ - Methods: `play()`
859
+
860
+ ```html
861
+ <usa-draw duration="1800" stagger="0.3" fill>
862
+ <svg viewBox="0 0 100 40">…</svg>
863
+ </usa-draw>
864
+ ```
865
+
866
+ ### <usa-drawer> — Drawer
867
+
868
+ A side panel that springs in, drags / swipes closed, traps the page behind a backdrop and returns focus on close. Left, right, top or bottom.
869
+
870
+ - Import: `import { defineDrawer } from 'motionary/components/ui'; defineDrawer();`
871
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
872
+ - Methods: `show()`, `close()`
873
+
874
+ ```html
875
+ <button onclick="nav.open = true">Menu</button>
876
+ <usa-drawer id="nav" side="left" label="Navigation">…</usa-drawer>
877
+ ```
878
+
879
+ ### <usa-equalizer> — Graphic equalizer
880
+
881
+ 7.1: one vertical slider per band with springy caps and a smooth response curve drawn through them; presets glide every band to its gain.
882
+
883
+ - Import: `import { defineEqualizer } from 'motionary/components/widgets'; defineEqualizer();`
884
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
885
+ - Attributes: `bands`
886
+ - Events: `usa:change`
887
+ - Methods: `applyPreset()`
888
+
889
+ ```html
890
+ <usa-equalizer preset="rock" bands="60,150,400,1k,2.4k,6k,16k"></usa-equalizer>
891
+ <script>eq.applyPreset('vocal');</script>
892
+ ```
893
+
894
+ ### <usa-fab> — FAB speed dial
895
+
896
+ A floating action button whose actions fan out with a staggered spring: up, down, left, right or radial.
897
+
898
+ - Import: `import { defineFab } from 'motionary/components/ui'; defineFab();`
899
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
900
+ - Attributes: `direction`, `gap`
901
+ - Events: `usa:toggle`
902
+ - Methods: `toggle()`
903
+
904
+ ```html
905
+ <usa-fab direction="up">
906
+ <button aria-label="Create">+</button>
907
+ <button aria-label="Photo">📷</button>
908
+ <button aria-label="Note">📝</button>
909
+ </usa-fab>
910
+ ```
911
+
912
+ ### <usa-festival-banner> — Festival banner
913
+
914
+ 8.1: an announcement banner with an ambient festive scene behind the text — lunar lanterns and sparkles, Christmas lights and snow, Halloween bats and moon, or fireworks.
915
+
916
+ - Import: `import { defineFestivalBanner } from 'motionary/components/widgets'; defineFestivalBanner();`
917
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
918
+ - Attributes: `theme`, `label`, `dismissible`
919
+ - Events: `usa:dismiss`
920
+ - Methods: `dismiss()`
921
+
922
+ ```html
923
+ <usa-festival-banner theme="lunar" dismissible>🧧 Happy Lunar New Year — 20% off all week</usa-festival-banner>
924
+ ```
925
+
926
+ ### <usa-field> — Animated field
927
+
928
+ 7.7: a text input whose label floats up on focus, with a growing underline; validates on blur — invalid shakes and slides the message in, valid draws a check. strength adds a 4-step password meter.
929
+
930
+ - Import: `import { defineField } from 'motionary/components/widgets'; defineField();`
931
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
932
+ - Attributes: `label`, `hint`, `error`, `strength`
933
+ - Events: `usa:invalid`, `usa:valid`
934
+ - Methods: `validate()`
935
+
936
+ ```html
937
+ <usa-field label="Email" type="email" name="email" required></usa-field>
938
+ <usa-field label="Password" type="password" name="pw" minlength="8" strength></usa-field>
939
+ ```
940
+
941
+ ### <usa-file-drop> — File drop zone
942
+
943
+ 6.9: dragging files over it lights marching-ants borders and lifts the icon; dropped (or browsed) files fly into a list with progress bars that end in a drawn check.
944
+
945
+ - Import: `import { defineFileDrop } from 'motionary/components/widgets'; defineFileDrop();`
946
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
947
+ - Events: `usa:files`
948
+ - Methods: `setProgress()`, `addFiles()`, `clear()`
949
+
950
+ ```html
951
+ <usa-file-drop multiple accept="image/*" label="Drop images or browse"></usa-file-drop>
952
+ <script>
953
+ drop.addEventListener('usa:files', (e) => upload(e.detail.files, (i, p) => drop.setProgress(i, p)));
954
+ </script>
955
+ ```
956
+
957
+ ### <usa-fullpage> — Full-page sections
958
+
959
+ Full-screen sections that snap one at a time, with keyboard paging, dot navigation and a usa:section event.
960
+
961
+ - Import: `import { defineFullpage } from 'motionary/components/page'; defineFullpage();`
962
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
963
+ - Events: `usa:section`
964
+ - Methods: `go()`, `next()`, `prev()`
965
+
966
+ ```html
967
+ <usa-fullpage dots>
968
+ <section>One</section>
969
+ <section>Two</section>
970
+ </usa-fullpage>
971
+ ```
972
+
973
+ ### <usa-fx> — Attention seekers
974
+
975
+ <usa-fx> plays any registered effect on its child: pulse, pop, jelly, wiggle, heartbeat, bounce, flash (≤ 2 per second), tada, shake. Click the button.
976
+
977
+ - Import: `import { defineFx } from 'motionary/components/fx'; defineFx();`
978
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
979
+ - Attributes: `effect`, `trigger`, `options`
980
+ - Methods: `play()`
981
+
982
+ ```html
983
+ <usa-fx effect="jelly" trigger="click">
984
+ <button>Press me</button>
985
+ </usa-fx>
986
+ ```
987
+
988
+ ### <usa-gauge> — Spring gauge
989
+
990
+ 7.2: a semicircular gauge — the needle swings to the value on a damped spring (overshoot, settle), the arc fills in the colour of its zone and the number counts. role="meter".
991
+
992
+ - Import: `import { defineGauge } from 'motionary/components/widgets'; defineGauge();`
993
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
994
+ - Attributes: `min`, `max`, `zones`, `unit`, `label`
995
+
996
+ ```html
997
+ <usa-gauge value="72" unit="%" label="CPU" zones="60:#22c55e,85:#f59e0b,100:#ef4444"></usa-gauge>
998
+ ```
999
+
1000
+ ### <usa-gen-art> — Generative artwork
1001
+
1002
+ 9.3: seeded generative art on a canvas — flow fields, circle packing, Truchet tiles or layered waves in curated palettes; it draws itself in on screen and a tap re-seeds it.
1003
+
1004
+ - Import: `import { defineGenArt } from 'motionary/components/widgets'; defineGenArt();`
1005
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1006
+ - Attributes: `art`, `seed`, `palette`, `label`
1007
+ - Events: `usa:generate`
1008
+ - Methods: `generate()`, `toDataURL()`
1009
+
1010
+ ```html
1011
+ <usa-gen-art art="flow" seed="7" palette="ocean" style="height:240px"></usa-gen-art>
1012
+ ```
1013
+
1014
+ ### <usa-gesture-fx> — Gesture triggers
1015
+
1016
+ 5.7: <usa-gesture-fx> plays any registered effect on a fling (fast release), a two-finger twist or a long press that charges --usa-charge 0 → 1. JS: bindGesture(el, "fling", "tada").
1017
+
1018
+ - Import: `import { defineGestureFx } from 'motionary/components/effects'; defineGestureFx();`
1019
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1020
+ - Attributes: `gesture`, `effect`, `options`
1021
+
1022
+ ```html
1023
+ <usa-gesture-fx gesture="long-press" effect="tada">
1024
+ <button>Hold me</button>
1025
+ </usa-gesture-fx>
1026
+ ```
1027
+
1028
+ ### <usa-gesture-sticker> — Multi-touch sticker
1029
+
1030
+ 8.7: a multi-touch sticker — drag with one finger, pinch with two to scale and twist to rotate, all at once, with a lifted shadow while held (wheel / Shift + wheel and keyboard on desktop).
1031
+
1032
+ - Import: `import { defineGestureSticker } from 'motionary/components/widgets'; defineGestureSticker();`
1033
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1034
+ - Attributes: `min`, `max`, `label`
1035
+ - Events: `usa:transform`
1036
+ - Methods: `transformTo()`, `reset()`
1037
+
1038
+ ```html
1039
+ <usa-gesture-sticker label="Star sticker" max="3">
1040
+ <img src="star.png" alt="Star" width="120">
1041
+ </usa-gesture-sticker>
1042
+ ```
1043
+
1044
+ ### <usa-glitch> — Glitch text
1045
+
1046
+ An RGB-split, sliced glitch — always on or on hover.
1047
+
1048
+ - Import: `import { defineGlitch } from 'motionary/components/text'; defineGlitch();`
1049
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1050
+ - Attributes: `text`, `intensity`
1051
+ - Methods: `mount()`, `splitChars()`
1052
+
1053
+ ```html
1054
+ <usa-glitch trigger="hover">SYSTEM ERROR</usa-glitch>
1055
+ ```
1056
+
1057
+ ### <usa-globe> — Spinning globe
1058
+
1059
+ 7.6: an SVG globe in orthographic projection — graticule, pulsing markers, spins while on screen, drag to turn it, flyTo(name) brings a city round to the front. No WebGL, no tiles.
1060
+
1061
+ - Import: `import { defineGlobe } from 'motionary/components/widgets'; defineGlobe();`
1062
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1063
+ - Attributes: `markers`, `speed`, `tilt`
1064
+ - Events: `usa:focus`
1065
+ - Methods: `flyTo()`
1066
+
1067
+ ```html
1068
+ <usa-globe markers="Shanghai:31.2,121.5; London:51.5,-0.1; New York:40.7,-74"></usa-globe>
1069
+ <script>globe.flyTo('London');</script>
1070
+ ```
1071
+
1072
+ ### <usa-gradient-text> — Gradient flow
1073
+
1074
+ Text filled with a multi-colour gradient that keeps flowing.
1075
+
1076
+ - Import: `import { defineGradientText } from 'motionary/components/text'; defineGradientText();`
1077
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1078
+ - Attributes: `colors`, `speed`, `angle`
1079
+ - Methods: `mount()`, `splitChars()`
1080
+
1081
+ ```html
1082
+ <usa-gradient-text colors="#7c5cff,#22d3ee,#f472b6">Gradient</usa-gradient-text>
1083
+ ```
1084
+
1085
+ ### <usa-grain> — Film grain
1086
+
1087
+ An SVG-noise grain overlay — no image to ship. animated makes it jitter like film.
1088
+
1089
+ - Import: `import { defineGrain } from 'motionary/components/background'; defineGrain();`
1090
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1091
+ - Attributes: `opacity`, `blend`, `scale`
1092
+
1093
+ ```html
1094
+ <usa-grain animated opacity="0.15">
1095
+ <img src="hero.jpg" alt="">
1096
+ </usa-grain>
1097
+ ```
1098
+
1099
+ ### <usa-grid-glow> — Grid glow
1100
+
1101
+ A line grid behind the content that lights up around the pointer.
1102
+
1103
+ - Import: `import { defineGridGlow } from 'motionary/components/background'; defineGridGlow();`
1104
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1105
+ - Methods: `mount()`
1106
+
1107
+ ```html
1108
+ <usa-grid-glow size="32">
1109
+ <h2>Hero</h2>
1110
+ </usa-grid-glow>
1111
+ ```
1112
+
1113
+ ### <usa-gyro-card> — Gyro 3D card
1114
+
1115
+ 8.7: a 3D card that tilts with the phone’s gyroscope (and with the pointer on desktop), with a moving glare and layers that float at different depths.
1116
+
1117
+ - Import: `import { defineGyroCard } from 'motionary/components/widgets'; defineGyroCard();`
1118
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1119
+ - Attributes: `max`, `glare`
1120
+ - Events: `usa:tilt`
1121
+ - Methods: `tilt()`, `wobble()`
1122
+
1123
+ ```html
1124
+ <usa-gyro-card max="15">
1125
+ <h3 data-depth="2">Gyro</h3>
1126
+ <p data-depth="1">Tilt your phone</p>
1127
+ </usa-gyro-card>
1128
+ ```
1129
+
1130
+ ### <usa-handwriting> — Handwriting draw
1131
+
1132
+ The text draws itself stroke by stroke, then fills in — signatures, hero words.
1133
+
1134
+ - Import: `import { defineHandwriting } from 'motionary/components/text'; defineHandwriting();`
1135
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1136
+ - Attributes: `text`, `size`, `font`
1137
+ - Events: `usa:complete`
1138
+ - Methods: `mount()`, `splitChars()`
1139
+
1140
+ ```html
1141
+ <usa-handwriting text="Thank you" size="72"></usa-handwriting>
1142
+ ```
1143
+
1144
+ ### <usa-hero-video> — Hero video
1145
+
1146
+ 9.4: a full-bleed hero with a background video — poster first, cross-fade to the video, a readable scrim, an always-there pause button and an optional scroll-scrubbed mode.
1147
+
1148
+ - Import: `import { defineHeroVideo } from 'motionary/components/widgets'; defineHeroVideo();`
1149
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1150
+ - Attributes: `label`, `scrub`, `poster`
1151
+ - Methods: `toggle()`
1152
+
1153
+ ```html
1154
+ <usa-hero-video label="Welcome" poster="poster.jpg">
1155
+ <video src="hero.mp4" autoplay muted loop playsinline></video>
1156
+ <h1>Motion, declared.</h1>
1157
+ </usa-hero-video>
1158
+ ```
1159
+
1160
+ ### <usa-hold> — Hold to confirm
1161
+
1162
+ Press and hold (pointer, Space or Enter) while a ring fills; releasing early rewinds. For destructive actions.
1163
+
1164
+ - Import: `import { defineHold } from 'motionary/components/click'; defineHold();`
1165
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1166
+ - Attributes: `duration`, `disabled`
1167
+ - Events: `usa:progress`, `usa:confirm`, `usa:cancel`
1168
+ - Methods: `cancel()`
1169
+
1170
+ ```html
1171
+ <usa-hold duration="1200" label="Delete project">Hold to delete</usa-hold>
1172
+ ```
1173
+
1174
+ ### <usa-hud-panel> — HUD panel
1175
+
1176
+ 8.4: a sci-fi HUD panel — angled corners, a glowing frame that draws itself in when the panel scrolls into view, a header with a blinking status light, and data rows that fill in as animated bar readouts.
1177
+
1178
+ - Import: `import { defineHudPanel } from 'motionary/components/widgets'; defineHudPanel();`
1179
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1180
+ - Attributes: `title`, `status`, `color`
1181
+ - Events: `usa:boot`
1182
+ - Methods: `boot()`
1183
+
1184
+ ```html
1185
+ <usa-hud-panel title="SHIP STATUS" status="ONLINE">
1186
+ <p data-value="82">Shields</p>
1187
+ <p data-value="47">Fuel</p>
1188
+ </usa-hud-panel>
1189
+ ```
1190
+
1191
+ ### <usa-hydrate> — SSR hydration animation
1192
+
1193
+ 8.0: server-rendered children animate in on hydration — hidden only while JS is on and not yet upgraded (ssrHead() in the head, 3 s CSS fallback), then staggered in on the unified clock.
1194
+
1195
+ - Import: `import { defineHydrate } from 'motionary/components/widgets'; defineHydrate();`
1196
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1197
+ - Attributes: `effect`, `stagger`, `duration`
1198
+ - Events: `usa:hydrated`
1199
+ - Methods: `replay()`
1200
+
1201
+ ```html
1202
+ <!-- <head> -->${ssrHead()}
1203
+ <usa-hydrate effect="fade-up" stagger="80">
1204
+ <h1>Server-rendered title</h1>
1205
+ <p>…</p>
1206
+ </usa-hydrate>
1207
+ <!-- or: <section data-usa-hydrate="blur">…</section> + hydrateMotion() -->
1208
+ ```
1209
+
1210
+ ### <usa-icon-morph> — Icon morph
1211
+
1212
+ Icons that morph point-by-point with a spring: play ↔ pause, menu ↔ close, plus ↔ minus, check, arrow. toggle makes it a button with per-icon labels.
1213
+
1214
+ - Import: `import { defineIconMorph } from 'motionary/components/click'; defineIconMorph();`
1215
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1216
+ - Attributes: `icons`, `size`, `toggle`
1217
+ - Events: `usa:change`
1218
+ - Methods: `next()`, `show()`
1219
+
1220
+ ```html
1221
+ <usa-icon-morph icons="play,pause" labels="Play,Pause" toggle></usa-icon-morph>
1222
+ <usa-icon-morph icons="menu,close" labels="Open menu,Close menu" toggle></usa-icon-morph>
1223
+ ```
1224
+
1225
+ ### <usa-install-button> — Install button
1226
+
1227
+ 10.1: one-click install snippet with npm / pnpm / yarn / bun / CDN tabs and a copy button that confirms with a check; `cdn` sets the URL of the CDN tab.
1228
+
1229
+ - Import: `import { defineInstallButton } from 'motionary/components/widgets'; defineInstallButton();`
1230
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1231
+ - Attributes: `package`, `managers`, `cdn`, `dev`, `manager`
1232
+ - Events: `usa:copy`
1233
+ - Methods: `command()`, `copy()`
1234
+
1235
+ ```html
1236
+ <usa-install-button package="motionary" managers="npm pnpm yarn bun cdn" cdn="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></usa-install-button>
1237
+ ```
1238
+
1239
+ ### <usa-kanban> — Kanban board (drag-sort)
1240
+
1241
+ 6.8: drag cards between columns — the card lifts and tilts toward the drag, a placeholder opens where it will land and the other cards glide aside (FLIP). Full keyboard support: Space picks up, arrows move, Space drops.
1242
+
1243
+ - Import: `import { defineKanban } from 'motionary/components/widgets'; defineKanban();`
1244
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1245
+ - Events: `usa:move`
1246
+ - Methods: `cardsOf()`, `move()`
1247
+
1248
+ ```html
1249
+ <usa-kanban label="Sprint">
1250
+ <section data-title="To do">
1251
+ <h3>To do</h3>
1252
+ <div data-card>Design</div>
1253
+ <div data-card>Write docs</div>
1254
+ </section>
1255
+ <section data-title="Done"><h3>Done</h3></section>
1256
+ </usa-kanban>
1257
+ ```
1258
+
1259
+ ### <usa-keyframe-editor> — Animation editor 2.0
1260
+
1261
+ 6.9: a compact timeline for <usa-player> JSON — drag a bar to move a track, drag its edge to resize, scrub the playhead or press play; exports format use-scroll-animate/animation v1.
1262
+
1263
+ - Import: `import { defineKeyframeEditor } from 'motionary/components/widgets'; defineKeyframeEditor();`
1264
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1265
+ - Events: `usa:change`
1266
+ - Methods: `toJSON()`, `play()`, `seek()`
1267
+
1268
+ ```html
1269
+ <div id="hero"><h1>Title</h1><div class="card">…</div><button>Go</button></div>
1270
+ <usa-keyframe-editor for="hero"></usa-keyframe-editor>
1271
+ <script>
1272
+ editor.addEventListener('usa:change', (e) => save(e.detail.animation));
1273
+ </script>
1274
+ ```
1275
+
1276
+ ### <usa-kpi> — KPI card
1277
+
1278
+ 7.2: the value counts up keeping prefix, suffix and decimals ("$12.4k", "98.2%"), the delta chip slides in with an arrow coloured by sign, and an optional trend draws a sparkline. Setting value rolls and flashes the card.
1279
+
1280
+ - Import: `import { defineKpi } from 'motionary/components/widgets'; defineKpi();`
1281
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1282
+ - Attributes: `label`, `delta`, `caption`, `trend`, `invert`
1283
+
1284
+ ```html
1285
+ <usa-kpi label="Revenue" value="$48.2k" delta="+12.5%" trend="4,6,5,9,8,12" caption="vs last month"></usa-kpi>
1286
+ ```
1287
+
1288
+ ### <usa-leaderboard> — Leaderboard
1289
+
1290
+ 7.5: a ranked list — when scores change, rows glide to their new rank, climbers flash green with ▲n and fallers red with ▼n, scores roll and the top three get medals.
1291
+
1292
+ - Import: `import { defineLeaderboard } from 'motionary/components/widgets'; defineLeaderboard();`
1293
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1294
+ - Events: `usa:rank`
1295
+ - Methods: `setScore()`
1296
+
1297
+ ```html
1298
+ <usa-leaderboard me="Ada">
1299
+ <li data-score="980">Ada</li>
1300
+ <li data-score="870">Alan</li>
1301
+ <li data-score="760">Grace</li>
1302
+ </usa-leaderboard>
1303
+ <script>board.setScore('Grace', 1000);</script>
1304
+ ```
1305
+
1306
+ ### <usa-like> — Like button
1307
+
1308
+ A heart that pops with a spring and bursts into particles; aria-pressed, optional count.
1309
+
1310
+ - Import: `import { defineLike } from 'motionary/components/click'; defineLike();`
1311
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1312
+ - Attributes: `liked`, `count`, `label`, `disabled`
1313
+ - Events: `usa:change`
1314
+ - Methods: `toggle()`
1315
+
1316
+ ```html
1317
+ <usa-like count="128"></usa-like>
1318
+ ```
1319
+
1320
+ ### <usa-liquid> — Liquid image
1321
+
1322
+ Click or tap to send water ripples through the image; hover adds a gentle wobble. The plain image stays when WebGL is unavailable.
1323
+
1324
+ - Import: `import { defineLiquid } from 'motionary/components/webgl'; defineLiquid();`
1325
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1326
+
1327
+ ```html
1328
+ <usa-liquid strength="1">
1329
+ <img src="photo.jpg" alt="…">
1330
+ </usa-liquid>
1331
+ ```
1332
+
1333
+ ### <usa-liquid-nav> — Liquid nav
1334
+
1335
+ 8.3: a navigation bar whose active indicator is a drop of liquid — it stretches like a droplet towards the next item and settles with a wobble (gooey SVG filter).
1336
+
1337
+ - Import: `import { defineLiquidNav } from 'motionary/components/widgets'; defineLiquidNav();`
1338
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1339
+ - Attributes: `label`
1340
+ - Events: `usa:change`
1341
+
1342
+ ```html
1343
+ <usa-liquid-nav label="Main">
1344
+ <a href="/" aria-current="page">Home</a><a href="/shop">Shop</a><a href="/about">About</a>
1345
+ </usa-liquid-nav>
1346
+ ```
1347
+
1348
+ ### <usa-loading-bar> — Top loading bar
1349
+
1350
+ A slim NProgress-style bar for route changes and fetches: loadingBar.start() trickles, done() completes and fades.
1351
+
1352
+ - Import: `import { defineLoadingBar } from 'motionary/components/page'; defineLoadingBar();`
1353
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1354
+ - Methods: `start()`, `set()`, `done()`
1355
+
1356
+ ```html
1357
+ <script type="module">
1358
+ import { loadingBar } from 'motionary/components/page';
1359
+ await loadingBar.track(fetch('/api'));
1360
+ </script>
1361
+ ```
1362
+
1363
+ ### <usa-location-card> — Location card
1364
+
1365
+ 7.6: a place card with a stylised mini map — the route from the origin draws itself, the pin drops in with a bounce and a ring pulses; distance computed with haversine (km or mi).
1366
+
1367
+ - Import: `import { defineLocationCard } from 'motionary/components/widgets'; defineLocationCard();`
1368
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1369
+ - Attributes: `name`, `address`, `lat`, `lon`, `from-lat`, `from-lon`, `distance`, `href`, `unit`
1370
+ - Events: `usa:arrive`
1371
+ - Methods: `replay()`
1372
+
1373
+ ```html
1374
+ <usa-location-card name="Blue Bottle" address="66 Mint St, San Francisco"
1375
+ lat="37.782" lon="-122.407" from-lat="37.776" from-lon="-122.394" href="https://maps.example/…"></usa-location-card>
1376
+ ```
1377
+
1378
+ ### <usa-lottie> — Lottie player
1379
+
1380
+ 9.2: plays Lottie (After Effects / bodymovin) files without lottie-web — vector layers render as SVG and their keyframes run as native animations on Motionary’s clock.
1381
+
1382
+ - Import: `import { defineLottie } from 'motionary/components/widgets'; defineLottie();`
1383
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1384
+ - Attributes: `src`, `loop`, `speed`, `label`
1385
+ - Events: `usa:error`, `usa:load`, `usa:complete`
1386
+ - Methods: `play()`, `pause()`, `stop()`
1387
+
1388
+ ```html
1389
+ <usa-lottie src="confetti.json" autoplay loop label="Celebration"></usa-lottie>
1390
+ ```
1391
+
1392
+ ### <usa-lottie-icon> — Animated icon set
1393
+
1394
+ 9.2: an animated icon set shipped as tiny Lottie files — heart beat, bell swing, check draw-in, spinner, star twinkle, bolt zap — on click, hover, enter or loop.
1395
+
1396
+ - Import: `import { defineLottieIcon } from 'motionary/components/widgets'; defineLottieIcon();`
1397
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1398
+ - Attributes: `name`, `size`, `color`, `label`, `trigger`
1399
+ - Methods: `play()`
1400
+
1401
+ ```html
1402
+ <usa-lottie-icon name="heart" trigger="click" size="32" label="Like"></usa-lottie-icon>
1403
+ <usa-lottie-icon name="bell" trigger="hover"></usa-lottie-icon>
1404
+ ```
1405
+
1406
+ ### <usa-lyrics> — Synced karaoke lyrics
1407
+
1408
+ 7.1: LRC or [data-t] lines; the active line glows, scrolls to the centre and a highlight sweeps across it while past lines dim. Follows an <audio>, <video> or <usa-music-player> via for.
1409
+
1410
+ - Import: `import { defineLyrics } from 'motionary/components/widgets'; defineLyrics();`
1411
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1412
+ - Events: `usa:seek`
1413
+
1414
+ ```html
1415
+ <usa-lyrics for="player">
1416
+ <script type="text/plain">
1417
+ [00:01.00] First line
1418
+ [00:04.50] Second line
1419
+ </script>
1420
+ </usa-lyrics>
1421
+ ```
1422
+
1423
+ ### <usa-magnetic> — Magnetic button
1424
+
1425
+ Content leans toward the pointer when it comes near and springs back. Fine pointers only; off under reduced motion.
1426
+
1427
+ - Import: `import { defineMagnetic } from 'motionary/components/interaction'; defineMagnetic();`
1428
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1429
+ - Attributes: `strength`, `radius`, `disabled`
1430
+
1431
+ ```html
1432
+ <usa-magnetic strength="0.4"><button>Hover near me</button></usa-magnetic>
1433
+ ```
1434
+
1435
+ ### <usa-marquee> — Marquee
1436
+
1437
+ A seamless infinite ticker with constant speed, pause on hover, soft edges and vertical mode. Clones are hidden from AT.
1438
+
1439
+ - Import: `import { defineMarquee } from 'motionary/components/background'; defineMarquee();`
1440
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1441
+ - Attributes: `speed`, `direction`, `gap`, `paused`
1442
+ - Methods: `pause()`, `resume()`
1443
+
1444
+ ```html
1445
+ <usa-marquee speed="50" pause-on-hover fade>
1446
+ <img src="logo-a.svg" alt="A">
1447
+ <img src="logo-b.svg" alt="B">
1448
+ </usa-marquee>
1449
+ ```
1450
+
1451
+ ### <usa-mask-reveal> — Mask reveal
1452
+
1453
+ Reveal images or sections through a growing mask: circle, diamond, star, iris or wipes, from any origin.
1454
+
1455
+ - Import: `import { defineMaskReveal } from 'motionary/components/svg'; defineMaskReveal();`
1456
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1457
+ - Events: `usa:complete`
1458
+ - Methods: `reveal()`
1459
+
1460
+ ```html
1461
+ <usa-mask-reveal shape="circle" at="20% 30%">
1462
+ <img src="hero.jpg" alt="…">
1463
+ </usa-mask-reveal>
1464
+ ```
1465
+
1466
+ ### <usa-masonry> — Masonry
1467
+
1468
+ Pinterest-style masonry: items drop into the shortest column and glide when the width, the items or their sizes change. CSS columns before JS runs.
1469
+
1470
+ - Import: `import { defineMasonry } from 'motionary/components/layout'; defineMasonry();`
1471
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1472
+ - Attributes: `columns`, `min`, `gap`
1473
+ - Methods: `enable()`, `disable()`
1474
+
1475
+ ```html
1476
+ <usa-masonry min="220" gap="16">
1477
+ <img src="1.jpg" alt="…">
1478
+ <img src="2.jpg" alt="…">
1479
+ </usa-masonry>
1480
+ ```
1481
+
1482
+ ### <usa-masonry-flow> — Masonry with layout animation
1483
+
1484
+ 6.5: a masonry grid whose items glide to their new places (FLIP) on resize, insert / remove, filter(), shuffle() and sort(); hidden items scale out, new ones scale in.
1485
+
1486
+ - Import: `import { defineMasonryFlow } from 'motionary/components/widgets'; defineMasonryFlow();`
1487
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1488
+ - Attributes: `min`, `gap`
1489
+ - Events: `usa:layout`
1490
+ - Methods: `layout()`, `filter()`, `shuffle()`, `sort()`
1491
+
1492
+ ```html
1493
+ <usa-masonry-flow min="160" gap="12">
1494
+ <img src="1.jpg" alt="…">
1495
+ <img src="2.jpg" alt="…">
1496
+ …
1497
+ </usa-masonry-flow>
1498
+ <!-- grid.filter('.cats'), grid.shuffle(), grid.sort((a, b) => …) -->
1499
+ ```
1500
+
1501
+ ### <usa-menu> — Dropdown menu
1502
+
1503
+ 6.3: the list scales (or folds / slides) out of its button and the items cascade in. Full menu keyboard support — arrows, Home / End, Esc, Tab — and outside clicks close it.
1504
+
1505
+ - Import: `import { defineMenu } from 'motionary/components/widgets'; defineMenu();`
1506
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1507
+ - Attributes: `placement`, `effect`
1508
+ - Events: `usa:select`, `usa:open`, `usa:close`
1509
+ - Methods: `open()`, `close()`, `toggle()`
1510
+
1511
+ ```html
1512
+ <usa-menu placement="bottom-start" effect="scale">
1513
+ <button>Actions ▾</button>
1514
+ <button>Edit</button>
1515
+ <button>Duplicate</button>
1516
+ <hr>
1517
+ <button>Delete</button>
1518
+ </usa-menu>
1519
+ ```
1520
+
1521
+ ### <usa-menu-toggle> — Hamburger → close
1522
+
1523
+ 6.6: the three bars morph into a cross, a back arrow, a minus or a spinning plus-to-cross; a real toggle button with aria-expanded that can open the element it controls (for).
1524
+
1525
+ - Import: `import { defineMenuToggle } from 'motionary/components/widgets'; defineMenuToggle();`
1526
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1527
+ - Attributes: `variant`
1528
+ - Events: `usa:toggle`
1529
+ - Methods: `toggle()`
1530
+
1531
+ ```html
1532
+ <usa-menu-toggle for="site-menu" variant="cross" label="Menu"></usa-menu-toggle>
1533
+ <nav id="site-menu" hidden>…</nav>
1534
+ ```
1535
+
1536
+ ### <usa-message-list> — Chat thread
1537
+
1538
+ 7.4: a chat thread — new bubbles pop in from their side, consecutive messages group, the list sticks to the bottom (or shows a “↓ New messages” pill when you scrolled up) and typing(name) shows animated typing dots.
1539
+
1540
+ - Import: `import { defineMessageList } from 'motionary/components/widgets'; defineMessageList();`
1541
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1542
+ - Events: `usa:message`
1543
+ - Methods: `push()`, `typing()`
1544
+
1545
+ ```html
1546
+ <usa-message-list>
1547
+ <p data-from="Ada">Hi! 👋</p>
1548
+ <p data-me>Hey Ada</p>
1549
+ </usa-message-list>
1550
+ <script>list.typing('Ada'); list.push({ from: 'Ada', text: 'Ship it?' });</script>
1551
+ ```
1552
+
1553
+ ### <usa-milestones> — Scroll-drawn milestones
1554
+
1555
+ 6.5: a progress line grows down the rail as you scroll; each milestone pops its dot and slides its card in when the line reaches it. Alternating sides on wide screens, one column on phones; data-date labels.
1556
+
1557
+ - Import: `import { defineMilestones } from 'motionary/components/widgets'; defineMilestones();`
1558
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1559
+ - Attributes: `layout`
1560
+ - Events: `usa:reach`
1561
+
1562
+ ```html
1563
+ <usa-milestones>
1564
+ <div data-date="2024"><h3>Idea</h3><p>…</p></div>
1565
+ <div data-date="2025"><h3>Beta</h3><p>…</p></div>
1566
+ <div data-date="2026"><h3>Launch</h3><p>…</p></div>
1567
+ </usa-milestones>
1568
+ ```
1569
+
1570
+ ### <usa-modal> — Modal dialog
1571
+
1572
+ 6.3: native <dialog> (top layer, focus trap, Esc) with animated open / close and a blurred backdrop — scale, slide-up, flip, or origin: it grows out of the button that opened it. Focus returns to the opener.
1573
+
1574
+ - Import: `import { defineModal } from 'motionary/components/widgets'; defineModal();`
1575
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1576
+
1577
+ ```html
1578
+ <button data-usa-open="welcome">Open</button>
1579
+ <usa-modal id="welcome" effect="origin" label="Welcome">
1580
+ <h2>Hello 👋</h2>
1581
+ <p>…</p>
1582
+ <button data-usa-close="ok">Got it</button>
1583
+ </usa-modal>
1584
+ ```
1585
+
1586
+ ### <usa-morph> — Path morph
1587
+
1588
+ Morph an SVG path through a list of shapes (paths="A | B | C") on click, hover, in view or automatically. Same-structure paths morph point by point.
1589
+
1590
+ - Import: `import { defineMorph } from 'motionary/components/svg'; defineMorph();`
1591
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1592
+ - Attributes: `paths`, `trigger`
1593
+ - Events: `usa:change`
1594
+ - Methods: `next()`
1595
+
1596
+ ```html
1597
+ <usa-morph trigger="auto" interval="1800"
1598
+ paths="M50 10 C75 10 90 30 90 50 C90 75 70 90 50 90 C25 90 10 70 10 50 C10 30 25 10 50 10 Z | M50 4 C80 20 96 26 86 54 C78 84 64 96 44 86 C14 80 4 64 14 44 C20 20 30 0 50 4 Z"></usa-morph>
1599
+ ```
1600
+
1601
+ ### <usa-motion> — Motion DSL
1602
+
1603
+ 9.0: the declarative motion DSL — describe motion as one readable string (“enter: fade-up 600ms stagger 80ms; hover: pop”) on <usa-motion> or any element’s data-motion, no JavaScript per element.
1604
+
1605
+ - Import: `import { defineMotion } from 'motionary/components/widgets'; defineMotion();`
1606
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1607
+ - Attributes: `rules`
1608
+ - Events: `usa:motion-error`
1609
+
1610
+ ```html
1611
+ <usa-motion rules="enter: fade-up 600ms ease-out stagger 80ms; hover: pop">
1612
+ <div class="card">One</div><div class="card">Two</div><div class="card">Three</div>
1613
+ </usa-motion>
1614
+
1615
+ <!-- or on any element, with applyMotion() from motionary/dsl -->
1616
+ <section data-motion="enter: fade-up 500ms; click: confetti count=40">…</section>
1617
+ ```
1618
+
1619
+ ### <usa-motion-inspector> — Motion inspector
1620
+
1621
+ 10.2: a live panel listing the running animations in a scope (CSS animations, transitions, element.animate(), components) with state and progress, plus the motionary/runtime ticker when present — pause / play all, 0.25× slow motion and per-row scrub.
1622
+
1623
+ - Import: `import { defineMotionInspector } from 'motionary/components/widgets'; defineMotionInspector();`
1624
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1625
+ - Attributes: `scope`, `interval`
1626
+ - Events: `usa:change`
1627
+ - Methods: `refresh()`, `pauseAll()`, `playAll()`, `setRate()`, `animations()`
1628
+
1629
+ ```html
1630
+ <usa-motion-inspector scope="#app" interval="500"></usa-motion-inspector>
1631
+ ```
1632
+
1633
+ ### <usa-motion-prefs> — Motion preference panel
1634
+
1635
+ 9.5: a motion settings panel for your users — motion level (full, gentle, minimal, none), animation speed, pause autoplaying video, no parallax — applied instantly to every Motionary animation and remembered.
1636
+
1637
+ - Import: `import { defineMotionPrefs } from 'motionary/components/widgets'; defineMotionPrefs();`
1638
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1639
+ - Attributes: `label`
1640
+ - Events: `usa:change`
1641
+ - Methods: `reset()`
1642
+
1643
+ ```html
1644
+ <usa-motion-prefs></usa-motion-prefs>
1645
+ ```
1646
+
1647
+ ### <usa-motion-spec> — Motion spec sheet
1648
+
1649
+ 9.7: a motion spec sheet for design hand-off — each rule of a motion string with its trigger, a duration bar on a shared timeline and the easing curve, a Play playhead and Copy CSS; pairs with the Figma plugin and Framer export of motionary/design.
1650
+
1651
+ - Import: `import { defineMotionSpec } from 'motionary/components/widgets'; defineMotionSpec();`
1652
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1653
+ - Attributes: `rules`, `label`
1654
+ - Events: `usa:copy`
1655
+ - Methods: `play()`
1656
+
1657
+ ```html
1658
+ <usa-motion-spec label="Card entrance" rules="enter: fade-up 600ms ease-out stagger 80ms; hover: pop 300ms spring"></usa-motion-spec>
1659
+ ```
1660
+
1661
+ ### <usa-motion-switch> — Motion intensity
1662
+
1663
+ Let users pick Off · Low · Normal · High for the whole app; scales every component, persists, and Off equals reduced motion.
1664
+
1665
+ - Import: `import { defineMotionSwitch } from 'motionary/components/page'; defineMotionSwitch();`
1666
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1667
+ - Events: `usa:change`
1668
+
1669
+ ```html
1670
+ <usa-motion-switch></usa-motion-switch>
1671
+ <!-- or: setMotionIntensity('low', true) -->
1672
+ ```
1673
+
1674
+ ### <usa-motion-theme> — Theme packs
1675
+
1676
+ 5.8: <usa-motion-theme name> applies a theme pack — design tokens (--usa-theme-*), motion tokens and effect presets per role (enter / hover / click / attention / background). Neon, paper, glass, retro and brutalist; applyMotionTheme() for the whole page.
1677
+
1678
+ - Import: `import { defineMotionTheme } from 'motionary/components/effects'; defineMotionTheme();`
1679
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1680
+ - Attributes: `name`
1681
+
1682
+ ```html
1683
+ <usa-motion-theme name="neon">
1684
+ <div class="usa-surface">
1685
+ <button data-theme-fx="click">Tap</button>
1686
+ </div>
1687
+ </usa-motion-theme>
1688
+ ```
1689
+
1690
+ ### <usa-music-player> — Music player
1691
+
1692
+ 7.1: the cover spins like a record while playing, play morphs to pause, mini equalizer bars dance and the progress bar is a scrubbable slider. Plays a child <audio> or simulates a track.
1693
+
1694
+ - Import: `import { defineMusicPlayer } from 'motionary/components/widgets'; defineMusicPlayer();`
1695
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1696
+ - Attributes: `title`, `artist`, `cover`, `src`
1697
+ - Events: `usa:play`, `usa:pause`, `usa:seek`
1698
+ - Methods: `play()`, `pause()`, `toggle()`, `seek()`
1699
+
1700
+ ```html
1701
+ <usa-music-player title="Night Drive" artist="Motionary" cover="cover.jpg">
1702
+ <audio src="track.mp3"></audio>
1703
+ </usa-music-player>
1704
+ ```
1705
+
1706
+ ### <usa-native-preview> — Native preview
1707
+
1708
+ 9.8: preview web motion as it will feel on a phone — an iOS / Android device frame replays the entrance with the rule’s curve and presses with a spring — and copy the generated React Native and Flutter code.
1709
+
1710
+ - Import: `import { defineNativePreview } from 'motionary/components/widgets'; defineNativePreview();`
1711
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1712
+ - Attributes: `rules`, `platform`, `name`
1713
+ - Events: `usa:replay`
1714
+ - Methods: `replay()`, `code()`
1715
+
1716
+ ```html
1717
+ <usa-native-preview platform="ios" rules="enter: fade-up 500ms smooth stagger 80ms; click: pop">
1718
+ <div class="row">Inbox</div><div class="row">Starred</div>
1719
+ </usa-native-preview>
1720
+ ```
1721
+
1722
+ ### <usa-nav-morph> — Navbar with morphing indicator
1723
+
1724
+ 6.6: the indicator follows the hovered or focused link — stretching from the old one, leading edge first — and settles back on the current page. Underline, pill, blob or dot.
1725
+
1726
+ - Import: `import { defineNavMorph } from 'motionary/components/widgets'; defineNavMorph();`
1727
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1728
+ - Attributes: `indicator`
1729
+ - Events: `usa:change`
1730
+
1731
+ ```html
1732
+ <usa-nav-morph indicator="underline" label="Main">
1733
+ <a href="/" aria-current="page">Home</a>
1734
+ <a href="/docs">Docs</a>
1735
+ <a href="/blog">Blog</a>
1736
+ </usa-nav-morph>
1737
+ ```
1738
+
1739
+ ### <usa-navbar> — Auto-hide navbar
1740
+
1741
+ Hides while you scroll down, slides back on the first scroll up; shrink makes it compact once scrolled. This page’s demo scrolls an inner box.
1742
+
1743
+ - Import: `import { defineNavbar } from 'motionary/components/ui'; defineNavbar();`
1744
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1745
+ - Events: `usa:hide`, `usa:show`
1746
+ - Methods: `show()`
1747
+
1748
+ ```html
1749
+ <usa-navbar shrink>
1750
+ <header>…</header>
1751
+ </usa-navbar>
1752
+ ```
1753
+
1754
+ ### <usa-notification-bell> — Notification bell
1755
+
1756
+ 7.4: a bell with an unread badge and a dropdown — notify() swings the bell, bumps the badge and slides the notice in; “Mark all read” shrinks the badge away. Esc / outside click close it.
1757
+
1758
+ - Import: `import { defineNotificationBell } from 'motionary/components/widgets'; defineNotificationBell();`
1759
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1760
+ - Events: `usa:notify`, `usa:read`
1761
+ - Methods: `notify()`, `markAllRead()`, `ring()`
1762
+
1763
+ ```html
1764
+ <usa-notification-bell>
1765
+ <li data-time="2m">Ada liked your post</li>
1766
+ </usa-notification-bell>
1767
+ <script>bell.notify({ text: 'New follower', time: 'now' });</script>
1768
+ ```
1769
+
1770
+ ### <usa-odometer> — Odometer counter
1771
+
1772
+ 6.4: rolling digit wheels — every digit spins forward to its new value, new digits slide in, locale grouping via Intl.NumberFormat, decimals, prefix / suffix. The accessible name is the formatted number.
1773
+
1774
+ - Import: `import { defineOdometer } from 'motionary/components/widgets'; defineOdometer();`
1775
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1776
+ - Attributes: `value`, `locale`, `decimals`, `prefix`, `suffix`
1777
+
1778
+ ```html
1779
+ <usa-odometer value="1284" locale="en-US" prefix="$"></usa-odometer>
1780
+ <!-- el.value = 2048 rolls every digit -->
1781
+ ```
1782
+
1783
+ ### <usa-organic-card> — Organic card
1784
+
1785
+ 8.3: a card with a soft, living blob shape — its outline slowly breathes on screen, morphs on hover and comes in leaf, ocean, petal and sand tints.
1786
+
1787
+ - Import: `import { defineOrganicCard } from 'motionary/components/widgets'; defineOrganicCard();`
1788
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1789
+ - Attributes: `tint`, `seed`
1790
+ - Methods: `morph()`
1791
+
1792
+ ```html
1793
+ <usa-organic-card tint="ocean">
1794
+ <h3>Deep sea</h3><p>Content…</p>
1795
+ </usa-organic-card>
1796
+ ```
1797
+
1798
+ ### <usa-otp> — OTP code input
1799
+
1800
+ 7.7: one-time-code boxes that auto-advance, step back on Backspace and take a pasted code; digits pop in, error() shakes the row red, success() sends a green wave across it.
1801
+
1802
+ - Import: `import { defineOtp } from 'motionary/components/widgets'; defineOtp();`
1803
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1804
+ - Attributes: `length`, `mode`, `label`
1805
+ - Events: `usa:complete`
1806
+ - Methods: `fillCode()`, `clear()`, `error()`, `success()`
1807
+
1808
+ ```html
1809
+ <usa-otp length="6"></usa-otp>
1810
+ <script>otp.addEventListener('usa:complete', (e) => check(e.detail.code) ? otp.success() : otp.error());</script>
1811
+ ```
1812
+
1813
+ ### <usa-overscroll> — Elastic overscroll
1814
+
1815
+ A scroll container whose edges stretch with iOS-style rubber-band resistance and spring back — touch, trackpad and wheel.
1816
+
1817
+ - Import: `import { defineOverscroll } from 'motionary/components/physics'; defineOverscroll();`
1818
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1819
+ - Attributes: `axis`, `disabled`
1820
+
1821
+ ```html
1822
+ <usa-overscroll style="height: 240px">
1823
+ <ul>…</ul>
1824
+ </usa-overscroll>
1825
+ ```
1826
+
1827
+ ### <usa-pack> — E-commerce pack
1828
+
1829
+ Product cards reveal and lift, “Add to cart” presses and flies the product into the cart (which bumps), prices count up, badges pulse.
1830
+
1831
+ - Import: `import { definePack } from 'motionary/components/packs'; definePack();`
1832
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1833
+ - Attributes: `name`
1834
+
1835
+ ```html
1836
+ <usa-pack name="ecommerce">
1837
+ <article data-role="product">
1838
+ <img src="shoe.jpg" alt="Runner">
1839
+ <span data-role="price">$129</span>
1840
+ <button data-role="add-to-cart">Add to cart</button>
1841
+ </article>
1842
+ <a data-role="cart" href="/cart">Cart</a>
1843
+ </usa-pack>
1844
+ ```
1845
+
1846
+ ### <usa-pagination> — Pagination with sliding ink
1847
+
1848
+ 6.7: the highlight springs to the chosen page (squashing on the way) and page numbers slide in from the direction of travel when the window shifts. Prev / next, ellipses, aria-current.
1849
+
1850
+ - Import: `import { definePagination } from 'motionary/components/widgets'; definePagination();`
1851
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1852
+ - Attributes: `total`, `siblings`
1853
+ - Events: `usa:change`
1854
+
1855
+ ```html
1856
+ <usa-pagination total="20" page="1" siblings="1"></usa-pagination>
1857
+ ```
1858
+
1859
+ ### <usa-panorama> — 360° panorama viewer
1860
+
1861
+ 8.8: a 360° panorama — drag or swipe to look around with inertia, a slow auto-rotate, a compass for the heading and a “View in XR” badge when the browser offers WebXR.
1862
+
1863
+ - Import: `import { definePanorama } from 'motionary/components/widgets'; definePanorama();`
1864
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1865
+ - Attributes: `src`, `autorotate`, `label`
1866
+ - Events: `usa:xr`, `usa:xr-request`, `usa:look`
1867
+ - Methods: `lookAt()`
1868
+
1869
+ ```html
1870
+ <usa-panorama src="pano-equirect.jpg" label="Lake at dawn" autorotate="6"></usa-panorama>
1871
+ ```
1872
+
1873
+ ### <usa-particles> — Particles
1874
+
1875
+ A canvas constellation that drifts away from the pointer. Runs only while visible, DPR ≤ 2, a still frame under reduced motion.
1876
+
1877
+ - Import: `import { defineParticles } from 'motionary/components/background'; defineParticles();`
1878
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1879
+ - Attributes: `count`, `color`, `size`, `speed`, `links`, `interactive`, `paused`
1880
+ - Methods: `reset()`
1881
+
1882
+ ```html
1883
+ <usa-particles count="80" links="120" interactive></usa-particles>
1884
+ ```
1885
+
1886
+ ### <usa-pause-all> — Pause all motion
1887
+
1888
+ 9.5: one button that pauses all motion on the page (WCAG 2.2.2) — Motionary’s shared clock, every CSS / Web animation and autoplaying media — and resumes it again; `scope` limits it to one area.
1889
+
1890
+ - Import: `import { definePauseAll } from 'motionary/components/widgets'; definePauseAll();`
1891
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1892
+ - Attributes: `label`, `scope`, `resume-label`
1893
+ - Events: `usa:pause-all`
1894
+ - Methods: `toggle()`
1895
+
1896
+ ```html
1897
+ <usa-pause-all></usa-pause-all>
1898
+ ```
1899
+
1900
+ ### <usa-perf-monitor> — Perf monitor
1901
+
1902
+ 9.6: a live performance overlay for motion work — FPS with a sparkline, active Motionary animations, frame-loop callbacks, long tasks and the shared clock — flagging jank.
1903
+
1904
+ - Import: `import { definePerfMonitor } from 'motionary/components/widgets'; definePerfMonitor();`
1905
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1906
+ - Attributes: `corner`, `warn`
1907
+ - Events: `usa:jank`
1908
+
1909
+ ```html
1910
+ <usa-perf-monitor corner="bottom-right"></usa-perf-monitor>
1911
+ ```
1912
+
1913
+ ### <usa-pinch-zoom> — Pinch zoom
1914
+
1915
+ Pinch with two fingers or Ctrl + wheel / trackpad pinch, pan while zoomed, double-tap to toggle; scale and position spring back inside the bounds.
1916
+
1917
+ - Import: `import { definePinchZoom } from 'motionary/components/gesture'; definePinchZoom();`
1918
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1919
+ - Events: `usa:zoom`
1920
+ - Methods: `zoomTo()`
1921
+
1922
+ ```html
1923
+ <usa-pinch-zoom max="4">
1924
+ <img src="photo.jpg" alt="…">
1925
+ </usa-pinch-zoom>
1926
+ ```
1927
+
1928
+ ### <usa-player> — JSON animation player
1929
+
1930
+ 5.9: <usa-player> plays a JSON animation — timeline presets, your own keyframes and any registered effect on a shared clock; play / pause / seek / rate / loop, scroll-scrubbing (trigger="scroll"). Export one from the Playground (<usa-player> JSON tab).
1931
+
1932
+ - Import: `import { definePlayer } from 'motionary/components/effects'; definePlayer();`
1933
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
1934
+ - Attributes: `src`, `trigger`, `loop`, `rate`
1935
+ - Methods: `load()`, `play()`, `pause()`, `seek()`
1936
+
1937
+ ```html
1938
+ <usa-player src="hero.json" trigger="view">
1939
+ <h1>Title</h1>
1940
+ <a class="cta">Start</a>
1941
+ </usa-player>
1942
+ ```
1943
+
1944
+ ### <usa-plugin-card> — Plugin detail card
1945
+
1946
+ 10.1: a plugin’s name, version and author with a Motionary compatibility badge (semver `engine` range), a signature badge (SHA-256 integrity checked with Web Crypto), an animated download counter and expandable details. Requires motionary/runtime — npm i motionary, then use() before the card mounts.
1947
+
1948
+ - Import: `import { definePluginCard } from 'motionary/components/widgets'; definePluginCard();`
1949
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1950
+ - Attributes: `name`, `title`, `version`, `author`, `engine`, `downloads`, `integrity`, `src`
1951
+ - Events: `usa:toggle`, `usa:verified`, `usa:runtime-missing`
1952
+ - Methods: `toggle()`, `verify()`, `compat()`
1953
+ - Requires: motionary/runtime
1954
+ - Install: `npm i motionary`
1955
+ - Order: Import motionary/runtime and call use() once at start-up, before any runtime-powered component mounts. CDN: the IIFE registers itself (window.MotionaryRuntime).
1956
+
1957
+ ```js
1958
+ import { use } from 'motionary/runtime';
1959
+ import { definePluginCard } from 'motionary/components/widgets';
1960
+
1961
+ use();
1962
+ definePluginCard(); // registers <usa-plugin-card> — after the prerequisites
1963
+ ```
1964
+
1965
+ ```html
1966
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
1967
+ <!-- then the component bundles -->
1968
+ <script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
1969
+ <script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
1970
+ ```
1971
+
1972
+ ```html
1973
+ <usa-plugin-card name="retro" title="Retro" version="1.2.0" author="Motionary" engine="^10.0.0" downloads="12400">
1974
+ <p>Pixel, CRT, VHS and Y2K effects.</p>
1975
+ </usa-plugin-card>
1976
+ ```
1977
+
1978
+ ### <usa-plugin-store> — Plugin marketplace
1979
+
1980
+ 9.0: the plugin marketplace as a component — search the catalogue of effect packs, see each plugin’s effects and install it with one click (imports and registers the pack).
1981
+
1982
+ - Import: `import { definePluginStore } from 'motionary/components/widgets'; definePluginStore();`
1983
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
1984
+ - Attributes: `query`, `label`
1985
+ - Events: `usa:install`, `usa:install-error`
1986
+ - Methods: `search()`, `install()`
1987
+
1988
+ ```html
1989
+ <usa-plugin-store query="neon"></usa-plugin-store>
1990
+ <script type="module">
1991
+ const store = document.querySelector('usa-plugin-store');
1992
+ store.loader = (entry) => import(entry); // or map to your bundler imports
1993
+ </script>
1994
+ ```
1995
+
1996
+ ### <usa-popover> — Popover
1997
+
1998
+ Click-to-open panel that springs from its trigger; Esc / outside click closes, focus returns.
1999
+
2000
+ - Import: `import { definePopover } from 'motionary/components/ui'; definePopover();`
2001
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2002
+ - Methods: `toggle()`
2003
+
2004
+ ```html
2005
+ <usa-popover>
2006
+ <button>Share</button>
2007
+ <div data-popover>…</div>
2008
+ </usa-popover>
2009
+ ```
2010
+
2011
+ ### <usa-post-fx> — Post-processing
2012
+
2013
+ Chainable GPU passes over an image (4.8): vignette, grain, chromatic aberration, scanlines, CRT, bloom, pixelate, duotone and glitch, with one intensity. Without WebGL the image gets an approximate CSS filter.
2014
+
2015
+ - Import: `import { definePostFx } from 'motionary/components/webgl'; definePostFx();`
2016
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2017
+
2018
+ ```html
2019
+ <usa-post-fx effects="vignette grain" intensity="0.6">
2020
+ <img src="photo.jpg" alt="…">
2021
+ </usa-post-fx>
2022
+ ```
2023
+
2024
+ ### <usa-presence> — Presence avatar
2025
+
2026
+ 7.4: an avatar with a live status dot (online, away, busy, offline) — coming online sends a ripple, speaking adds a pulsing ring and story an animated gradient ring. Initials when there is no photo.
2027
+
2028
+ - Import: `import { definePresence } from 'motionary/components/widgets'; definePresence();`
2029
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2030
+ - Attributes: `status`, `speaking`, `name`, `src`
2031
+
2032
+ ```html
2033
+ <usa-presence name="Ada Lovelace" status="online"></usa-presence>
2034
+ <usa-presence name="Alan Turing" status="away" speaking></usa-presence>
2035
+ <usa-presence name="Grace Hopper" status="busy" story></usa-presence>
2036
+ ```
2037
+
2038
+ ### <usa-press> — Press feedback
2039
+
2040
+ Tactile press: dips while pressed and springs back, or bounces once with bounce. Mouse, touch, pen and keyboard.
2041
+
2042
+ - Import: `import { definePress } from 'motionary/components/interaction'; definePress();`
2043
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2044
+ - Attributes: `disabled`
2045
+
2046
+ ```html
2047
+ <usa-press bounce><button>Press</button></usa-press>
2048
+ ```
2049
+
2050
+ ### <usa-prize-wheel> — Prize wheel
2051
+
2052
+ 7.5: a lottery wheel — Spin whirls it and it eases out on the result (random or spin(index)), the pointer ticks and the wheel glows; usa:result reports the prize.
2053
+
2054
+ - Import: `import { definePrizeWheel } from 'motionary/components/widgets'; definePrizeWheel();`
2055
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2056
+ - Events: `usa:result`
2057
+ - Methods: `spin()`
2058
+
2059
+ ```html
2060
+ <usa-prize-wheel segments="10% off,Free ship,Try again,🎁 Gift,5% off,Jackpot"></usa-prize-wheel>
2061
+ ```
2062
+
2063
+ ### <usa-product-gallery> — Product gallery
2064
+
2065
+ 7.3: product photos with a thumbnail strip — the stage cross-slides in the direction of travel, the selection ring glides between thumbnails, hover zooms under the pointer, swipe and ←/→ work.
2066
+
2067
+ - Import: `import { defineProductGallery } from 'motionary/components/widgets'; defineProductGallery();`
2068
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2069
+ - Attributes: `index`
2070
+ - Events: `usa:change`
2071
+ - Methods: `go()`, `next()`, `prev()`
2072
+
2073
+ ```html
2074
+ <usa-product-gallery zoom="2">
2075
+ <img src="front.jpg" alt="Front">
2076
+ <img src="side.jpg" alt="Side">
2077
+ <img src="back.jpg" alt="Back">
2078
+ </usa-product-gallery>
2079
+ ```
2080
+
2081
+ ### <usa-progress> — Progress bar
2082
+
2083
+ Determinate bars glide between values; without a value it shows the Fluent indeterminate animation. Paused / error states.
2084
+
2085
+ - Import: `import { defineProgress } from 'motionary/components/feedback'; defineProgress();`
2086
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2087
+ - Attributes: `value`, `max`, `indeterminate`, `label`
2088
+ - Events: `usa:complete`
2089
+
2090
+ ```html
2091
+ <usa-progress value="40"></usa-progress>
2092
+ <usa-progress indeterminate></usa-progress>
2093
+ ```
2094
+
2095
+ ### <usa-progress-ring> — Progress ring / bar / gauge
2096
+
2097
+ 6.4: the arc eases to every new value with a little overshoot while the label counts up; ring, bar or semicircle gauge, gradient strokes, indeterminate spinner without a value. role="progressbar", usa:complete at 100%.
2098
+
2099
+ - Import: `import { defineProgressRing } from 'motionary/components/widgets'; defineProgressRing();`
2100
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2101
+ - Attributes: `variant`, `value`, `max`, `gradient`
2102
+ - Events: `usa:complete`
2103
+
2104
+ ```html
2105
+ <usa-progress-ring value="72" gradient="#7c5cff,#22d3ee"></usa-progress-ring>
2106
+ <usa-progress-ring variant="bar" value="40"></usa-progress-ring>
2107
+ <usa-progress-ring variant="semi" value="88"></usa-progress-ring>
2108
+ <!-- el.value = 90 animates to the new value -->
2109
+ ```
2110
+
2111
+ ### <usa-prop-panel> — Property panel
2112
+
2113
+ 8.9 low-code: a property editor for a live component — typed fields (number / range, select, color, switch, text) bound to its attributes, so the component re-renders as you edit.
2114
+
2115
+ - Import: `import { definePropPanel } from 'motionary/components/widgets'; definePropPanel();`
2116
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2117
+ - Attributes: `for`, `props`, `label`
2118
+ - Events: `usa:prop`
2119
+ - Methods: `reset()`
2120
+
2121
+ ```html
2122
+ <usa-star-rating id="r" value="3"></usa-star-rating>
2123
+ <usa-prop-panel for="#r" props="value:number:0:5, icon:select:star|heart, readonly:boolean"></usa-prop-panel>
2124
+ ```
2125
+
2126
+ ### <usa-pull-cord> — Lamp pull-cord switch
2127
+
2128
+ 6.8: pull the cord down and let go — past the threshold the lamp switches, and the cord swings back on a damped spring. Click, Space or Enter tug it too; role="switch".
2129
+
2130
+ - Import: `import { definePullCord } from 'motionary/components/widgets'; definePullCord();`
2131
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2132
+ - Events: `usa:change`
2133
+ - Methods: `toggle()`
2134
+
2135
+ ```html
2136
+ <usa-pull-cord label="Desk lamp"></usa-pull-cord>
2137
+ ```
2138
+
2139
+ ### <usa-pull-refresh> — Pull to refresh
2140
+
2141
+ Pull down at the top of a list: the spinner stretches in with rubber-band resistance; release past the threshold to refresh.
2142
+
2143
+ - Import: `import { definePullRefresh } from 'motionary/components/ui'; definePullRefresh();`
2144
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2145
+ - Methods: `refresh()`
2146
+
2147
+ ```html
2148
+ <usa-pull-refresh style="height: 300px">
2149
+ <ul>…</ul>
2150
+ </usa-pull-refresh>
2151
+ <script>el.addEventListener('usa:refresh', async (e) => { await load(); e.detail.done(); });</script>
2152
+ ```
2153
+
2154
+ ### <usa-radar> — Radar scope
2155
+
2156
+ 8.4: a sci-fi radar scope — a conic beam sweeps round and each target lights up and fades as the beam passes over it.
2157
+
2158
+ - Import: `import { defineRadar } from 'motionary/components/widgets'; defineRadar();`
2159
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2160
+ - Attributes: `targets`, `rings`, `speed`, `label`
2161
+ - Events: `usa:ping`
2162
+ - Methods: `setTargets()`
2163
+
2164
+ ```html
2165
+ <usa-radar targets="Alpha:40,0.6; Bravo:200,0.35; Echo:300,0.8" speed="4"></usa-radar>
2166
+ ```
2167
+
2168
+ ### <usa-reactions> — Emoji reactions
2169
+
2170
+ 7.4: a reaction bar — clicking a pill toggles your reaction: the emoji pops, the count rolls and copies float up; + springs open a picker. Each pill is a toggle button with a count label.
2171
+
2172
+ - Import: `import { defineReactions } from 'motionary/components/widgets'; defineReactions();`
2173
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2174
+ - Events: `usa:react`
2175
+ - Methods: `toggle()`
2176
+
2177
+ ```html
2178
+ <usa-reactions emojis="👍,❤️,😂,🎉" counts="3,1,0,2"></usa-reactions>
2179
+ ```
2180
+
2181
+ ### <usa-red-envelope> — Red envelope (红包)
2182
+
2183
+ 8.1: a Lunar New Year red envelope — tap and the flap swings open, the card slides out with the amount counting up and gold coins pop out.
2184
+
2185
+ - Import: `import { defineRedEnvelope } from 'motionary/components/widgets'; defineRedEnvelope();`
2186
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2187
+ - Attributes: `amount`, `currency`, `message`, `from`
2188
+ - Events: `usa:open`
2189
+ - Methods: `open()`, `close()`
2190
+
2191
+ ```html
2192
+ <usa-red-envelope amount="88.88" from="Grandma" message="恭喜发财"></usa-red-envelope>
2193
+ ```
2194
+
2195
+ ### <usa-retro-button> — Retro buttons
2196
+
2197
+ 8.2: buttons in four eras with matching press motion — 8-bit pixel (stepped press), CRT phosphor (flicker), Y2K chrome pill (bounce) and Windows 95 bevel (sink).
2198
+
2199
+ - Import: `import { defineRetroButton } from 'motionary/components/widgets'; defineRetroButton();`
2200
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2201
+ - Attributes: `variant`, `disabled`
2202
+
2203
+ ```html
2204
+ <usa-retro-button variant="pixel">Start</usa-retro-button>
2205
+ <usa-retro-button variant="win95">OK</usa-retro-button>
2206
+ ```
2207
+
2208
+ ### <usa-reveal> — Reveal
2209
+
2210
+ Fade, slide, zoom, blur or flip content in as it enters the viewport. 12 effects, replay on re-entry with repeat.
2211
+
2212
+ - Import: `import { defineReveal } from 'motionary/components/reveal'; defineReveal();`
2213
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2214
+ - Attributes: `effect`, `distance`, `repeat`, `threshold`, `root-margin`
2215
+ - Events: `usa:enter`, `usa:leave`, `usa:complete`
2216
+ - Methods: `reveal()`, `reset()`
2217
+
2218
+ ```html
2219
+ <usa-reveal effect="fade-up" duration="700">
2220
+ <h2>Hello</h2>
2221
+ </usa-reveal>
2222
+ ```
2223
+
2224
+ ### <usa-ripple> — Ripple
2225
+
2226
+ Ink ripple from the pointer — or from the centre for Space/Enter — on any button, list item or card.
2227
+
2228
+ - Import: `import { defineRipple } from 'motionary/components/interaction'; defineRipple();`
2229
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2230
+ - Methods: `ripple()`
2231
+
2232
+ ```html
2233
+ <usa-ripple><button>Click me</button></usa-ripple>
2234
+ ```
2235
+
2236
+ ### <usa-scene> — Cinematic scene
2237
+
2238
+ 9.1: a scroll-scrubbed cinematic shot — while the scene crosses the screen its image follows a camera move (dolly, pan, tilt, zoom, orbit) and captions fade in on cue.
2239
+
2240
+ - Import: `import { defineScene } from 'motionary/components/widgets'; defineScene();`
2241
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2242
+ - Attributes: `camera`, `strength`, `autoplay`
2243
+ - Events: `usa:shot`
2244
+ - Methods: `setProgress()`
2245
+
2246
+ ```html
2247
+ <usa-scene camera="dolly-in">
2248
+ <img src="harbor.jpg" alt="Harbor at dawn">
2249
+ <p data-caption data-at="0.4">Dawn, 1912.</p>
2250
+ </usa-scene>
2251
+ ```
2252
+
2253
+ ### <usa-scramble> — Scramble / decode
2254
+
2255
+ Decodes text out of random glyphs, left to right. Trigger on view, hover/focus or manually.
2256
+
2257
+ - Import: `import { defineScramble } from 'motionary/components/text'; defineScramble();`
2258
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2259
+ - Attributes: `text`
2260
+ - Events: `usa:complete`
2261
+ - Methods: `play()`
2262
+
2263
+ ```html
2264
+ <usa-scramble trigger="hover">ACCESS GRANTED</usa-scramble>
2265
+ ```
2266
+
2267
+ ### <usa-scroll-highlight> — Scroll highlight
2268
+
2269
+ Words light up one by one as you read down the page, or a highlighter marker sweeps behind the text.
2270
+
2271
+ - Import: `import { defineScrollHighlight } from 'motionary/components/text'; defineScrollHighlight();`
2272
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2273
+ - Attributes: `mode`, `text`
2274
+ - Methods: `mount()`
2275
+
2276
+ ```html
2277
+ <usa-scroll-highlight>Every word lights up as you scroll.</usa-scroll-highlight>
2278
+ <usa-scroll-highlight mode="marker">Important</usa-scroll-highlight>
2279
+ ```
2280
+
2281
+ ### <usa-scroll-progress> — Scroll progress bar
2282
+
2283
+ Reading progress of the page or of one article. Compositor-only scaleX, role="progressbar".
2284
+
2285
+ - Import: `import { defineScrollProgress } from 'motionary/components/reveal'; defineScrollProgress();`
2286
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2287
+ - Attributes: `target`, `label`
2288
+ - Events: `usa:progress`
2289
+ - Methods: `update()`
2290
+
2291
+ ```html
2292
+ <usa-scroll-progress></usa-scroll-progress>
2293
+ <!-- or for one article -->
2294
+ <usa-scroll-progress target="#post" position="bottom"></usa-scroll-progress>
2295
+ ```
2296
+
2297
+ ### <usa-scroll-scene> — Scroll scene
2298
+
2299
+ 10.2: a scroll-linked scene — children with data-scrub="opacity: 0 -> 1; x: -80 -> 0" are tweened as you scroll, scrubbed directly or smoothed (scrub="120"), with optional pin, markers and stagger. Requires motionary/runtime/scroll — npm i motionary, then use(scroll) before the scene mounts.
2300
+
2301
+ - Import: `import { defineScrollScene } from 'motionary/components/widgets'; defineScrollScene();`
2302
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2303
+ - Attributes: `start`, `end`, `scrub`, `pin`, `markers`, `stagger`, `toggle-class`, `preview`
2304
+ - Events: `usa:enter`, `usa:leave`, `usa:progress`, `usa:runtime-missing`
2305
+ - Methods: `refresh()`, `timeline()`
2306
+ - Requires: motionary/runtime/scroll
2307
+ - Install: `npm i motionary`
2308
+ - Order: Register the core first, then the module: use(scroll) also registers the core. CDN: load runtime.iife.js, then runtime/scroll.iife.js (it registers itself).
2309
+
2310
+ ```js
2311
+ import { use } from 'motionary/runtime';
2312
+ import { scroll } from 'motionary/runtime/scroll';
2313
+ import { defineScrollScene } from 'motionary/components/widgets';
2314
+
2315
+ use(scroll);
2316
+ defineScrollScene(); // registers <usa-scroll-scene> — after the prerequisites
2317
+ ```
2318
+
2319
+ ```html
2320
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
2321
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/scroll.iife.js"></script>
2322
+ <!-- then the component bundles -->
2323
+ <script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
2324
+ <script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
2325
+ ```
2326
+
2327
+ ```html
2328
+ <usa-scroll-scene start="top 80%" end="bottom 20%" scrub="120" stagger="120">
2329
+ <h2 data-scrub="x: -80 -> 0; opacity: 0 -> 1">Scroll</h2>
2330
+ <p data-scrub="y: 40 -> 0; opacity: 0 -> 1">and it follows.</p>
2331
+ </usa-scroll-scene>
2332
+ ```
2333
+
2334
+ ### <usa-scrolly> — Sticky scrollytelling
2335
+
2336
+ A pinned graphic while [data-step] blocks scroll past; the active step drives the graphic via attributes, a CSS variable and events.
2337
+
2338
+ - Import: `import { defineScrolly } from 'motionary/components/reveal'; defineScrolly();`
2339
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2340
+ - Attributes: `offset`
2341
+ - Events: `usa:step`
2342
+
2343
+ ```html
2344
+ <usa-scrolly>
2345
+ <figure data-sticky>…</figure>
2346
+ <section data-step="intro">…</section>
2347
+ <section data-step="detail">…</section>
2348
+ </usa-scrolly>
2349
+ ```
2350
+
2351
+ ### <usa-segmented> — Segmented control
2352
+
2353
+ 6.7: an iOS-style thumb slides under the chosen segment with a spring and stretches while it travels. A real radio group: arrow keys, Home / End. iOS, pill or outline.
2354
+
2355
+ - Import: `import { defineSegmented } from 'motionary/components/widgets'; defineSegmented();`
2356
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2357
+ - Attributes: `variant`
2358
+ - Events: `usa:change`
2359
+
2360
+ ```html
2361
+ <usa-segmented variant="ios" label="View">
2362
+ <button>Day</button>
2363
+ <button>Week</button>
2364
+ <button>Month</button>
2365
+ </usa-segmented>
2366
+ ```
2367
+
2368
+ ### <usa-shader> — Shader background
2369
+
2370
+ A GPU shader behind your content: gradient, plasma, waves or aurora presets — or your own fragment shader in a <script type="x-shader/x-fragment">. Falls back to the CSS background.
2371
+
2372
+ - Import: `import { defineShader } from 'motionary/components/webgl'; defineShader();`
2373
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2374
+
2375
+ ```html
2376
+ <usa-shader preset="aurora" speed="1">
2377
+ <h1>Hero title</h1>
2378
+ </usa-shader>
2379
+
2380
+ <usa-shader>
2381
+ <script type="x-shader/x-fragment">
2382
+ void main() { gl_FragColor = vec4(v_uv, 0.5 + 0.5 * sin(u_time), 1.0); }
2383
+ </script>
2384
+ </usa-shader>
2385
+ ```
2386
+
2387
+ ### <usa-sheet> — Drawer / bottom sheet
2388
+
2389
+ 6.3: a side sheet from the right, left, top or bottom with a blurred backdrop; the bottom sheet can be dragged down to dismiss and springs back otherwise. Native <dialog> underneath.
2390
+
2391
+ - Import: `import { defineSheet } from 'motionary/components/widgets'; defineSheet();`
2392
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2393
+
2394
+ ```html
2395
+ <button data-usa-open="cart">Cart</button>
2396
+ <usa-sheet id="cart" side="right" label="Cart">
2397
+ <h2>Your cart</h2>
2398
+ …
2399
+ <button data-usa-close>Close</button>
2400
+ </usa-sheet>
2401
+ ```
2402
+
2403
+ ### <usa-shimmer-text> — Shimmer text
2404
+
2405
+ A light sweep across gradient-filled text. CSS only; colours and speed via attributes or custom properties.
2406
+
2407
+ - Import: `import { defineShimmerText } from 'motionary/components/text'; defineShimmerText();`
2408
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2409
+ - Attributes: `duration`, `color`, `shine`, `angle`
2410
+
2411
+ ```html
2412
+ <usa-shimmer-text shine="#fff">Premium</usa-shimmer-text>
2413
+ ```
2414
+
2415
+ ### <usa-shortcut> — Shortcut hint
2416
+
2417
+ 7.9: keyboard-shortcut hints as keycaps (⌘ on Apple, Ctrl elsewhere); press the combination anywhere and the caps press down one after another and usa:trigger fires.
2418
+
2419
+ - Import: `import { defineShortcut } from 'motionary/components/widgets'; defineShortcut();`
2420
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2421
+ - Attributes: `keys`, `label`, `listen`, `for`
2422
+ - Events: `usa:trigger`
2423
+ - Methods: `press()`
2424
+
2425
+ ```html
2426
+ <usa-shortcut keys="mod+k" label="Search"></usa-shortcut>
2427
+ <usa-shortcut keys="mod+shift+p" for="palette-button"></usa-shortcut>
2428
+ ```
2429
+
2430
+ ### <usa-skeleton> — Skeleton
2431
+
2432
+ Shimmering placeholders while loading; remove loading and the real content fades in. aria-busy included.
2433
+
2434
+ - Import: `import { defineSkeleton } from 'motionary/components/feedback'; defineSkeleton();`
2435
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2436
+ - Attributes: `loading`, `lines`, `width`, `height`, `circle`, `avatar`, `radius`
2437
+ - Events: `usa:loaded`
2438
+
2439
+ ```html
2440
+ <usa-skeleton loading avatar lines="3">
2441
+ <article>…</article>
2442
+ </usa-skeleton>
2443
+ ```
2444
+
2445
+ ### <usa-skeleton-reveal> — Skeleton → content reveal
2446
+
2447
+ 6.4: the skeleton is generated from the real content — one bar per rendered text line, blocks for images and marked elements — with one synchronized shimmer (wave, pulse or glow). Remove loading and the bars dissolve top-to-bottom while the content fades in from a blur.
2448
+
2449
+ - Import: `import { defineSkeletonReveal } from 'motionary/components/widgets'; defineSkeletonReveal();`
2450
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2451
+ - Attributes: `loading`, `variant`
2452
+ - Events: `usa:reveal`
2453
+ - Methods: `reveal()`
2454
+
2455
+ ```html
2456
+ <usa-skeleton-reveal loading variant="wave">
2457
+ <img src="avatar.jpg" alt="" data-skeleton="circle">
2458
+ <h3>Ada Lovelace</h3>
2459
+ <p>…</p>
2460
+ </usa-skeleton-reveal>
2461
+ <!-- el.loading = false (or el.reveal()) when the data arrived -->
2462
+ ```
2463
+
2464
+ ### <usa-sketch-chart> — Sketch chart
2465
+
2466
+ 8.5: a hand-drawn chart — wobbly pencil axes with hatched bars or a sketchy line, sketched in stroke by stroke when it scrolls into view.
2467
+
2468
+ - Import: `import { defineSketchChart } from 'motionary/components/widgets'; defineSketchChart();`
2469
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2470
+ - Attributes: `values`, `labels`, `type`, `color`, `label`
2471
+ - Events: `usa:drawn`
2472
+ - Methods: `setValues()`, `redraw()`
2473
+
2474
+ ```html
2475
+ <usa-sketch-chart values="3,7,5,9" labels="Q1,Q2,Q3,Q4" label="Revenue"></usa-sketch-chart>
2476
+ ```
2477
+
2478
+ ### <usa-slider> — Slider
2479
+
2480
+ A form-associated range slider: spring-following thumb, value bubble, full keyboard support (arrows, Page Up/Down, Home/End).
2481
+
2482
+ - Import: `import { defineSlider } from 'motionary/components/ui'; defineSlider();`
2483
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2484
+ - Attributes: `min`, `max`, `disabled`, `label`
2485
+ - Events: `usa:input`, `usa:change`
2486
+
2487
+ ```html
2488
+ <usa-slider name="volume" value="40" bubble label="Volume"></usa-slider>
2489
+ ```
2490
+
2491
+ ### <usa-sparkline> — Sparkline
2492
+
2493
+ 7.2: a tiny inline trend — draws itself on first view, a soft area fades in, the last point pulses and new data morphs the line point by point. line | area | bars; hover shows the value.
2494
+
2495
+ - Import: `import { defineSparkline } from 'motionary/components/widgets'; defineSparkline();`
2496
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2497
+ - Attributes: `variant`, `color`
2498
+
2499
+ ```html
2500
+ <usa-sparkline values="3,5,4,8,6,9,12" variant="area"></usa-sparkline>
2501
+ ```
2502
+
2503
+ ### <usa-spatial-card> — Spatial card
2504
+
2505
+ 8.8: a spatial-computing window — frosted glass floating in depth, a soft gaze highlight that follows the pointer, layered content and an ornament bar; it eases towards you on hover and sinks on press.
2506
+
2507
+ - Import: `import { defineSpatialCard } from 'motionary/components/widgets'; defineSpatialCard();`
2508
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2509
+ - Events: `usa:focus-depth`
2510
+
2511
+ ```html
2512
+ <usa-spatial-card>
2513
+ <h3 data-depth="2">Photos</h3>
2514
+ <p data-depth="1">Spatial window</p>
2515
+ <nav slot="ornament"><button>⟲</button><button>♡</button></nav>
2516
+ </usa-spatial-card>
2517
+ ```
2518
+
2519
+ ### <usa-spinner> — Spinners
2520
+
2521
+ Six indeterminate indicators: the WinUI progress ring, the Windows 10 orbiting dots, ring, typing dots, pulse and bars.
2522
+
2523
+ - Import: `import { defineSpinner } from 'motionary/components/feedback'; defineSpinner();`
2524
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2525
+ - Attributes: `kind`, `size`, `label`
2526
+
2527
+ ```html
2528
+ <usa-spinner kind="fluent"></usa-spinner>
2529
+ <usa-spinner kind="windows" size="40"></usa-spinner>
2530
+ ```
2531
+
2532
+ ### <usa-splash> — Splash screen
2533
+
2534
+ An app launch screen that leaves (fade, scale, slide-up, circle) once the page has loaded — never sooner than min ms.
2535
+
2536
+ - Import: `import { defineSplash } from 'motionary/components/page'; defineSplash();`
2537
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2538
+ - Events: `usa:done`
2539
+ - Methods: `done()`
2540
+
2541
+ ```html
2542
+ <usa-splash exit="circle" min="800">
2543
+ <img src="logo.svg" alt="">
2544
+ </usa-splash>
2545
+ ```
2546
+
2547
+ ### <usa-split-text> — Split-text reveal
2548
+
2549
+ Splits a headline into letters or words and cascades them in: rise, fade, blur, flip or pop. Words never break.
2550
+
2551
+ - Import: `import { defineSplitText } from 'motionary/components/text'; defineSplitText();`
2552
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2553
+ - Attributes: `by`, `text`
2554
+ - Events: `usa:complete`
2555
+ - Methods: `play()`, `reset()`
2556
+
2557
+ ```html
2558
+ <usa-split-text effect="rise">Animated headline</usa-split-text>
2559
+ ```
2560
+
2561
+ ### <usa-spotlight> — Reveal highlight
2562
+
2563
+ The Windows Fluent “Reveal” effect: a light follows the pointer, lighting the borders of nearby items and the hovered one.
2564
+
2565
+ - Import: `import { defineSpotlight } from 'motionary/components/interaction'; defineSpotlight();`
2566
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2567
+ - Attributes: `size`, `color`, `border`
2568
+
2569
+ ```html
2570
+ <usa-spotlight>
2571
+ <button>Mail</button>
2572
+ <button>Calendar</button>
2573
+ <button>Photos</button>
2574
+ </usa-spotlight>
2575
+ ```
2576
+
2577
+ ### <usa-spring> — Spring effects
2578
+
2579
+ bounce-in, pop and drop entrances with true spring timing (CSS linear() easing), plus jelly and rubber-band attention effects on view, hover or click.
2580
+
2581
+ - Import: `import { defineSpring } from 'motionary/components/physics'; defineSpring();`
2582
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2583
+ - Attributes: `effect`, `trigger`, `repeat`
2584
+ - Events: `usa:complete`
2585
+ - Methods: `play()`, `reset()`
2586
+
2587
+ ```html
2588
+ <usa-spring effect="bounce-in" preset="bouncy">
2589
+ <div class="card">Hello</div>
2590
+ </usa-spring>
2591
+ <usa-spring effect="jelly" trigger="click">
2592
+ <button>Tap me</button>
2593
+ </usa-spring>
2594
+ ```
2595
+
2596
+ ### <usa-stagger> — Stagger list
2597
+
2598
+ Reveals direct children one after another — lists, grids, feature rows.
2599
+
2600
+ - Import: `import { defineStagger } from 'motionary/components/reveal'; defineStagger();`
2601
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2602
+ - Attributes: `effect`, `repeat`, `threshold`
2603
+ - Events: `usa:enter`, `usa:complete`
2604
+ - Methods: `reveal()`, `reset()`
2605
+
2606
+ ```html
2607
+ <usa-stagger effect="rise" interval="80">
2608
+ <li>One</li>
2609
+ <li>Two</li>
2610
+ <li>Three</li>
2611
+ </usa-stagger>
2612
+ ```
2613
+
2614
+ ### <usa-star-rating> — Star rating 2.0
2615
+
2616
+ 6.4: the fill follows the pointer (half stars with step="0.5"), a click pops the chosen star with a sparkle burst while the others ripple; stars or hearts; a keyboard slider (arrows, Home / End); readonly mode.
2617
+
2618
+ - Import: `import { defineStarRating } from 'motionary/components/widgets'; defineStarRating();`
2619
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2620
+ - Attributes: `max`, `icon`, `readonly`, `step`
2621
+ - Events: `usa:change`
2622
+
2623
+ ```html
2624
+ <usa-star-rating value="3.5" step="0.5" label="Your rating"></usa-star-rating>
2625
+ <usa-star-rating value="4" readonly></usa-star-rating>
2626
+ ```
2627
+
2628
+ ### <usa-stepper> — Stepper / wizard
2629
+
2630
+ 6.7: the rail fills toward the current step, finished steps pop a drawn check mark and the current step pulses. Horizontal or vertical; next() / prev() / value.
2631
+
2632
+ - Import: `import { defineStepper } from 'motionary/components/widgets'; defineStepper();`
2633
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2634
+ - Attributes: `orientation`
2635
+ - Events: `usa:change`
2636
+ - Methods: `next()`, `prev()`
2637
+
2638
+ ```html
2639
+ <usa-stepper value="1" label="Checkout">
2640
+ <span>Cart</span>
2641
+ <span>Shipping</span>
2642
+ <span>Payment</span>
2643
+ <span>Done</span>
2644
+ </usa-stepper>
2645
+ ```
2646
+
2647
+ ### <usa-sticky-stack> — Sticky stack
2648
+
2649
+ Cards stick while you scroll and the covered ones shrink and dim as the next slides over them.
2650
+
2651
+ - Import: `import { defineStickyStack } from 'motionary/components/cards'; defineStickyStack();`
2652
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2653
+ - Attributes: `top`, `gap`, `scale`
2654
+ - Methods: `update()`
2655
+
2656
+ ```html
2657
+ <usa-sticky-stack top="80">
2658
+ <section>One</section>
2659
+ <section>Two</section>
2660
+ <section>Three</section>
2661
+ </usa-sticky-stack>
2662
+ ```
2663
+
2664
+ ### <usa-sticky-wall> — Sticky-note wall
2665
+
2666
+ 8.5: a wall of sticky notes — each child becomes a pinned paper note with a slight tilt, the notes drop onto the wall one by one, and a tap lifts a note to the front.
2667
+
2668
+ - Import: `import { defineStickyWall } from 'motionary/components/widgets'; defineStickyWall();`
2669
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2670
+ - Attributes: `seed`, `label`
2671
+ - Events: `usa:pick`
2672
+ - Methods: `pick()`
2673
+
2674
+ ```html
2675
+ <usa-sticky-wall label="Ideas">
2676
+ <p>Ship 8.5 ✏️</p>
2677
+ <p data-color="pink">Call Mia</p>
2678
+ <p data-color="blue">Buy paper</p>
2679
+ </usa-sticky-wall>
2680
+ ```
2681
+
2682
+ ### <usa-stories> — Stories viewer
2683
+
2684
+ 6.2: segmented progress bars, auto-advance, tap left / right to step, press and hold to pause, plus a pause button. Under reduced motion it waits for the user instead of advancing.
2685
+
2686
+ - Import: `import { defineStories } from 'motionary/components/widgets'; defineStories();`
2687
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2688
+ - Attributes: `duration`, `loop`
2689
+ - Events: `usa:end`, `usa:change`
2690
+ - Methods: `next()`, `prev()`, `goTo()`, `pause()`, `play()`
2691
+
2692
+ ```html
2693
+ <usa-stories duration="5000" loop>
2694
+ <img src="1.jpg" alt="…">
2695
+ <img src="2.jpg" alt="…">
2696
+ </usa-stories>
2697
+ ```
2698
+
2699
+ ### <usa-story> — Story: before / after
2700
+
2701
+ 5.4: <usa-story template="compare"> wipes from before to after as you scroll; the handle is draggable and a keyboard slider (←/→, Home/End). Full-page templates (pin, gallery, zoom) live on the Scroll stories page.
2702
+
2703
+ - Import: `import { defineStory } from 'motionary/components/effects'; defineStory();`
2704
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2705
+ - Attributes: `template`, `zoom`
2706
+
2707
+ ```html
2708
+ <usa-story template="compare" label="2019 vs 2026">
2709
+ <div data-sticky>
2710
+ <img data-before src="before.jpg" alt="Before">
2711
+ <img data-after src="after.jpg" alt="After">
2712
+ </div>
2713
+ </usa-story>
2714
+ ```
2715
+
2716
+ ### <usa-suggestion-chips> — Suggestion chips
2717
+
2718
+ 7.8: follow-up prompt chips that slide in one after another; picking one pulses it and (with dismiss) the others fade away. Real buttons, arrow-key navigation.
2719
+
2720
+ - Import: `import { defineSuggestionChips } from 'motionary/components/widgets'; defineSuggestionChips();`
2721
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2722
+ - Attributes: `items`, `label`, `dismiss`
2723
+ - Events: `usa:pick`
2724
+ - Methods: `setItems()`
2725
+
2726
+ ```html
2727
+ <usa-suggestion-chips items="Summarise|Translate|Explain like I'm 5" dismiss></usa-suggestion-chips>
2728
+ ```
2729
+
2730
+ ### <usa-swipe-deck> — Swipe cards deck
2731
+
2732
+ 6.8: drag the top card — it rotates with the pointer, LIKE / NOPE stamps fade in and past the threshold (or on a fling) it flies off; otherwise it springs back. like(), nope(), undo(), ← / →.
2733
+
2734
+ - Import: `import { defineSwipeDeck } from 'motionary/components/widgets'; defineSwipeDeck();`
2735
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2736
+ - Events: `usa:swipe`, `usa:empty`
2737
+ - Methods: `like()`, `nope()`, `undo()`
2738
+
2739
+ ```html
2740
+ <usa-swipe-deck threshold="110" label="Matches">
2741
+ <article>Ada</article>
2742
+ <article>Linus</article>
2743
+ <article>Grace</article>
2744
+ </usa-swipe-deck>
2745
+ ```
2746
+
2747
+ ### <usa-swipeable> — Swipeable
2748
+
2749
+ Swipe-to-dismiss and swipe actions: content follows the finger, flies out on a fast swipe or past the distance, otherwise springs home with your release velocity. Delete / arrow keys work too.
2750
+
2751
+ - Import: `import { defineSwipeable } from 'motionary/components/gesture'; defineSwipeable();`
2752
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2753
+ - Attributes: `axis`, `disabled`
2754
+ - Events: `usa:swipe`, `usa:dismiss`
2755
+ - Methods: `swipe()`, `reset()`
2756
+
2757
+ ```html
2758
+ <usa-swipeable distance="120" dismiss>
2759
+ <div class="card">Swipe me away</div>
2760
+ </usa-swipeable>
2761
+ ```
2762
+
2763
+ ### <usa-switch> — Toggle switch variants
2764
+
2765
+ 6.7: four switches — iOS (the thumb stretches while pressed), day / night (sun becomes moon, stars appear), bounce (squash at the end) and liquid (a gooey fill pours in). role="switch", forms, keyboard.
2766
+
2767
+ - Import: `import { defineSwitch } from 'motionary/components/widgets'; defineSwitch();`
2768
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2769
+ - Attributes: `variant`
2770
+ - Events: `usa:change`
2771
+ - Methods: `toggle()`
2772
+
2773
+ ```html
2774
+ <usa-switch variant="daynight" name="dark" label="Dark mode"></usa-switch>
2775
+ ```
2776
+
2777
+ ### <usa-tab-bar> — Tabs with animated indicator
2778
+
2779
+ 6.2: the indicator stretches from the old tab to the new one (leading edge first) and the panel slides in from the side of travel. Pill, underline, glow or gooey; full tablist keyboard support.
2780
+
2781
+ - Import: `import { defineTabBar } from 'motionary/components/widgets'; defineTabBar();`
2782
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2783
+ - Attributes: `indicator`
2784
+ - Events: `usa:change`
2785
+ - Methods: `select()`
2786
+
2787
+ ```html
2788
+ <usa-tab-bar indicator="pill">
2789
+ <button>Overview</button>
2790
+ <button>Specs</button>
2791
+ <button>Reviews</button>
2792
+ <div data-panel>…</div>
2793
+ <div data-panel>…</div>
2794
+ <div data-panel>…</div>
2795
+ </usa-tab-bar>
2796
+ ```
2797
+
2798
+ ### <usa-tabs> — Tabs
2799
+
2800
+ Accessible tabs whose indicator slides between tabs with a spring; panels slide in from the direction you moved. Line or pill indicator.
2801
+
2802
+ - Import: `import { defineTabs } from 'motionary/components/ui'; defineTabs();`
2803
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2804
+ - Attributes: `indicator`
2805
+ - Events: `usa:change`
2806
+ - Methods: `select()`
2807
+
2808
+ ```html
2809
+ <usa-tabs>
2810
+ <nav><button data-tab>One</button><button data-tab>Two</button></nav>
2811
+ <section data-panel>…</section>
2812
+ <section data-panel>…</section>
2813
+ </usa-tabs>
2814
+ ```
2815
+
2816
+ ### <usa-terminal> — Terminal window
2817
+
2818
+ 8.2: a retro terminal window that types its commands after the prompt with a blinking block cursor and prints the output line by line when it scrolls into view — dark, green-phosphor or amber.
2819
+
2820
+ - Import: `import { defineTerminal } from 'motionary/components/widgets'; defineTerminal();`
2821
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2822
+ - Attributes: `title`, `prompt`, `theme`, `speed`
2823
+ - Events: `usa:done`
2824
+ - Methods: `replay()`, `skip()`
2825
+
2826
+ ```html
2827
+ <usa-terminal title="zsh" theme="green">
2828
+ <p data-cmd>npm i motionary</p>
2829
+ <p>added 1 package in 2s</p>
2830
+ </usa-terminal>
2831
+ ```
2832
+
2833
+ ### <usa-text-rotate> — Rotating words
2834
+
2835
+ Cycles words in place — the box keeps the width of the longest word, so nothing around it reflows.
2836
+
2837
+ - Import: `import { defineTextRotate } from 'motionary/components/text'; defineTextRotate();`
2838
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2839
+ - Attributes: `words`, `interval`, `paused`
2840
+ - Events: `usa:change`
2841
+ - Methods: `next()`
2842
+
2843
+ ```html
2844
+ Build <usa-text-rotate words="fast|tiny|typed"></usa-text-rotate> apps
2845
+ ```
2846
+
2847
+ ### <usa-theme-surface> — Theme surface
2848
+
2849
+ 8.6: a themeable card that follows the nearest theme — light, dark, neon (pulsing glow edge), glass (frosted backdrop with a sheen) or soft neumorphic relief — and cross-fades when the theme changes.
2850
+
2851
+ - Import: `import { defineThemeSurface } from 'motionary/components/widgets'; defineThemeSurface();`
2852
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2853
+ - Attributes: `theme`
2854
+ - Events: `usa:theme`
2855
+
2856
+ ```html
2857
+ <usa-theme-surface theme="glass">
2858
+ <h3>Frosted</h3><p>Content…</p>
2859
+ </usa-theme-surface>
2860
+ ```
2861
+
2862
+ ### <usa-theme-switcher> — Theme switcher
2863
+
2864
+ 8.6: a segmented switcher for the 8.6 theme system — light, dark, neon, glass and soft (neumorphism); a pill slides under the active option and the page change is revealed with a circular wipe from the click point.
2865
+
2866
+ - Import: `import { defineThemeSwitcher } from 'motionary/components/widgets'; defineThemeSwitcher();`
2867
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2868
+ - Attributes: `themes`, `target`, `label`
2869
+ - Events: `usa:change`
2870
+
2871
+ ```html
2872
+ <usa-theme-switcher themes="light,dark,neon,glass,neu" persist></usa-theme-switcher>
2873
+ ```
2874
+
2875
+ ### <usa-tilt> — 3D tilt card
2876
+
2877
+ Tilts toward the pointer in 3D with an optional glare; exposes --usa-tilt-x/y for parallax layers inside.
2878
+
2879
+ - Import: `import { defineTilt } from 'motionary/components/interaction'; defineTilt();`
2880
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2881
+ - Attributes: `max`, `scale`, `perspective`, `glare`, `reverse`, `disabled`
2882
+
2883
+ ```html
2884
+ <usa-tilt glare max="12">
2885
+ <div class="card">…</div>
2886
+ </usa-tilt>
2887
+ ```
2888
+
2889
+ ### <usa-timeline> — Timeline
2890
+
2891
+ Every data-tl child becomes a step in document order. data-at ('-=200', '<', 'label+=100') overlaps or aligns steps; scrub ties progress to scroll; trigger view / click / manual.
2892
+
2893
+ - Import: `import { defineTimeline } from 'motionary/components/timeline'; defineTimeline();`
2894
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2895
+ - Attributes: `scrub`, `trigger`, `overlap`
2896
+ - Events: `usa:complete`
2897
+ - Methods: `play()`, `reverse()`, `seek()`
2898
+
2899
+ ```html
2900
+ <usa-timeline overlap="150">
2901
+ <h2 data-tl="fade-up">Title</h2>
2902
+ <p data-tl="blur">Subtitle</p>
2903
+ <button data-tl="scale" data-at="<+=100">CTA</button>
2904
+ </usa-timeline>
2905
+ ```
2906
+
2907
+ ### <usa-tip> — Tooltip / popover 2.0
2908
+
2909
+ 6.6: springs out of its trigger with an arrow, flips to stay inside the viewport and shifts along the edge; hover + keyboard focus (Esc closes) or click popovers with rich content.
2910
+
2911
+ - Import: `import { defineTip } from 'motionary/components/widgets'; defineTip();`
2912
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2913
+ - Attributes: `text`, `placement`, `trigger`
2914
+ - Events: `usa:open`, `usa:close`
2915
+ - Methods: `show()`, `hide()`
2916
+
2917
+ ```html
2918
+ <usa-tip text="Copied to clipboard" placement="top">
2919
+ <button>Copy</button>
2920
+ </usa-tip>
2921
+ <usa-tip trigger="click" placement="bottom">
2922
+ <button>Details</button>
2923
+ <div slot="tip"><strong>Pro tip</strong> …</div>
2924
+ </usa-tip>
2925
+ ```
2926
+
2927
+ ### <usa-toast-stack> — Toast stack
2928
+
2929
+ 6.3: toasts pile up into a collapsed stack (newest in front, older ones peeking behind), fan out on hover or focus, auto-dismiss (paused while hovered) and swipe away. Six positions, a polite live region, stackToast() helper and data-usa-toast triggers.
2930
+
2931
+ - Import: `import { defineToastStack } from 'motionary/components/widgets'; defineToastStack();`
2932
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2933
+ - Attributes: `position`
2934
+ - Events: `usa:show`, `usa:dismiss`
2935
+ - Methods: `show()`, `dismiss()`, `clear()`
2936
+
2937
+ ```html
2938
+ <button data-usa-toast="Saved to your library" data-usa-toast-type="success">Save</button>
2939
+ <usa-toast-stack position="bottom-right" duration="4000" max="3"></usa-toast-stack>
2940
+ <!-- or from JS: stackToast({ title: 'Done', message: 'Saved', type: 'success' }) -->
2941
+ ```
2942
+
2943
+ ### <usa-toaster> — Toasts
2944
+
2945
+ toast("Saved") slides a notification in; it pauses on hover, stacks with FLIP and announces politely (errors assertively).
2946
+
2947
+ - Import: `import { defineToaster } from 'motionary/components/feedback'; defineToaster();`
2948
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2949
+ - Attributes: `label`
2950
+ - Events: `usa:toast`
2951
+ - Methods: `show()`, `clear()`
2952
+
2953
+ ```html
2954
+ <usa-toaster position="bottom-right"></usa-toaster>
2955
+ <script type="module">
2956
+ import { toast } from 'motionary/components/feedback';
2957
+ toast('Saved', { type: 'success' });
2958
+ </script>
2959
+ ```
2960
+
2961
+ ### <usa-typewriter> — Typewriter
2962
+
2963
+ Types text, or cycles through phrases with delete and pause. Full text stays available to screen readers.
2964
+
2965
+ - Import: `import { defineTypewriter } from 'motionary/components/text'; defineTypewriter();`
2966
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
2967
+ - Attributes: `text`, `words`
2968
+ - Events: `usa:complete`
2969
+ - Methods: `start()`, `stop()`, `restart()`
2970
+
2971
+ ```html
2972
+ <usa-typewriter words="Hello, Windows.|Hello, web." loop></usa-typewriter>
2973
+ ```
2974
+
2975
+ ### <usa-upload-progress> — Upload progress
2976
+
2977
+ 7.7: a file row whose bar eases to value with a running shine; at 100 it turns into a check that draws itself, on error it shakes and offers Retry.
2978
+
2979
+ - Import: `import { defineUploadProgress } from 'motionary/components/widgets'; defineUploadProgress();`
2980
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2981
+ - Attributes: `name`, `size`, `value`, `status`, `message`
2982
+ - Events: `usa:retry`, `usa:done`, `usa:error`
2983
+
2984
+ ```html
2985
+ <usa-upload-progress name="report.pdf" size="2400000" value="40"></usa-upload-progress>
2986
+ <script>row.value = 75; row.status = 'error';</script>
2987
+ ```
2988
+
2989
+ ### <usa-video-card> — Video card
2990
+
2991
+ 9.4: a video thumbnail card — hover or focus plays a muted preview with a progress line, a play badge and a duration chip; without a video the poster drifts (Ken Burns).
2992
+
2993
+ - Import: `import { defineVideoCard } from 'motionary/components/widgets'; defineVideoCard();`
2994
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2995
+ - Attributes: `label`, `duration`
2996
+ - Events: `usa:open`
2997
+
2998
+ ```html
2999
+ <usa-video-card duration="2:41">
3000
+ <img src="poster.jpg" alt="">
3001
+ <video src="preview.mp4" muted playsinline></video>
3002
+ <h3>Making of Motionary</h3>
3003
+ </usa-video-card>
3004
+ ```
3005
+
3006
+ ### <usa-view-switch> — View switch
3007
+
3008
+ One view at a time with direction-aware slide, fade, scale or drill transitions — tabs, wizards, app pages.
3009
+
3010
+ - Import: `import { defineViewSwitch } from 'motionary/components/transitions'; defineViewSwitch();`
3011
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
3012
+ - Attributes: `active`
3013
+ - Events: `usa:change`
3014
+ - Methods: `show()`
3015
+
3016
+ ```html
3017
+ <usa-view-switch active="home">
3018
+ <section data-view="home">…</section>
3019
+ <section data-view="about">…</section>
3020
+ </usa-view-switch>
3021
+ ```
3022
+
3023
+ ### <usa-voice-button> — Voice button
3024
+
3025
+ 7.8: a push-to-talk mic button — while listening a halo breathes and level bars wave; feed it live input levels with level (0–1) and they follow your voice.
3026
+
3027
+ - Import: `import { defineVoiceButton } from 'motionary/components/widgets'; defineVoiceButton();`
3028
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
3029
+ - Attributes: `label`, `bars`, `listening`
3030
+ - Methods: `toggle()`
3031
+
3032
+ ```html
3033
+ <usa-voice-button label="Talk to the assistant"></usa-voice-button>
3034
+ <script>vb.addEventListener('usa:start', start); analyser.onlevel = (l) => (vb.level = l);</script>
3035
+ ```
3036
+
3037
+ ### <usa-volume-knob> — Volume knob
3038
+
3039
+ 7.1: a rotary knob — drag up / down, scroll or use the keys; the value arc fills, a ring of LED ticks lights up and the pointer springs to the angle. role="slider".
3040
+
3041
+ - Import: `import { defineVolumeKnob } from 'motionary/components/widgets'; defineVolumeKnob();`
3042
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
3043
+ - Attributes: `min`, `max`
3044
+ - Events: `usa:change`, `usa:input`
3045
+
3046
+ ```html
3047
+ <usa-volume-knob value="60" label="Volume"></usa-volume-knob>
3048
+ ```
3049
+
3050
+ ### <usa-water-ripple> — Water ripple
3051
+
3052
+ Interactive water ripples on a canvas over the content: move or tap to disturb the surface.
3053
+
3054
+ - Import: `import { defineWaterRipple } from 'motionary/components/background'; defineWaterRipple();`
3055
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
3056
+ - Methods: `mount()`
3057
+
3058
+ ```html
3059
+ <usa-water-ripple>
3060
+ <img src="lake.jpg" alt="">
3061
+ </usa-water-ripple>
3062
+ ```
3063
+
3064
+ ### <usa-wave-text> — Wave text
3065
+
3066
+ Letters bob in a travelling wave — playful headlines and loading labels.
3067
+
3068
+ - Import: `import { defineWaveText } from 'motionary/components/text'; defineWaveText();`
3069
+ - CDN: https://unpkg.com/motionary@10/dist/components.umd.js
3070
+ - Attributes: `text`
3071
+ - Methods: `mount()`, `splitChars()`
3072
+
3073
+ ```html
3074
+ <usa-wave-text>Loading…</usa-wave-text>
3075
+ ```
3076
+
3077
+ ### <usa-weather-card> — Animated weather card
3078
+
3079
+ 6.8: sun rays turn, clouds drift, rain and snow fall, a flash-safe bolt glows, fog bands and stars — pick a condition and the scene cross-fades; the temperature counts up.
3080
+
3081
+ - Import: `import { defineWeatherCard } from 'motionary/components/widgets'; defineWeatherCard();`
3082
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
3083
+ - Attributes: `condition`, `temp`, `place`, `unit`, `label`
3084
+
3085
+ ```html
3086
+ <usa-weather-card condition="rain" temp="12" place="Lisbon"></usa-weather-card>
3087
+ ```
3088
+
3089
+ ### <usa-worker-canvas> — Worker canvas
3090
+
3091
+ 9.6: a canvas animation rendered in a Web Worker on an OffscreenCanvas — the main thread stays free for input — with a main-thread fallback; particles, orbits, starfield or your own draw program.
3092
+
3093
+ - Import: `import { defineWorkerCanvas } from 'motionary/components/widgets'; defineWorkerCanvas();`
3094
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
3095
+ - Attributes: `scene`, `label`
3096
+ - Events: `usa:backend`
3097
+
3098
+ ```html
3099
+ <usa-worker-canvas scene="starfield" style="height:240px"></usa-worker-canvas>
3100
+ ```
3101
+
3102
+ ### <usa-xp-bar> — XP bar
3103
+
3104
+ 7.5: an experience bar — add(n) fills it smoothly; overflowing fills to the end, the level badge pops and the bar restarts with the remainder (several levels if needed).
3105
+
3106
+ - Import: `import { defineXpBar } from 'motionary/components/widgets'; defineXpBar();`
3107
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
3108
+ - Attributes: `level`, `xp`, `per`
3109
+ - Events: `usa:levelup`, `usa:xp`
3110
+ - Methods: `add()`
3111
+
3112
+ ```html
3113
+ <usa-xp-bar level="3" xp="40" per="100"></usa-xp-bar>
3114
+ <script>bar.add(75); // → level 4, 15 XP</script>
3115
+ ```