motionary 10.1.0 → 10.3.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.
- package/AGENTS.md +61 -0
- package/CHANGELOG.md +36 -0
- package/README.md +69 -0
- package/dist/chunks/{keyframes-CyH_abhI.js → keyframes-DVAC5sQI.js} +2 -2
- package/dist/chunks/{keyframes-CyH_abhI.js.map → keyframes-DVAC5sQI.js.map} +1 -1
- package/dist/chunks/{keyframes-cUdsXSXQ.cjs → keyframes-Dw9zwVQa.cjs} +2 -2
- package/dist/chunks/{keyframes-cUdsXSXQ.cjs.map → keyframes-Dw9zwVQa.cjs.map} +1 -1
- package/dist/chunks/{registry-jF8VIA_9.js → registry-46AAzyeC.js} +2 -2
- package/dist/chunks/{registry-jF8VIA_9.js.map → registry-46AAzyeC.js.map} +1 -1
- package/dist/chunks/{registry-C0xLNq3-.cjs → registry-CSVil2qJ.cjs} +2 -2
- package/dist/chunks/{registry-C0xLNq3-.cjs.map → registry-CSVil2qJ.cjs.map} +1 -1
- package/dist/chunks/ticker-COOYAyQy.js +70 -0
- package/dist/chunks/ticker-COOYAyQy.js.map +1 -0
- package/dist/chunks/ticker-gHv6pNfx.cjs +72 -0
- package/dist/chunks/ticker-gHv6pNfx.cjs.map +1 -0
- package/dist/chunks/{tween-JEthWrjo.cjs → tween-CFN0WcOb.cjs} +16 -73
- package/dist/chunks/tween-CFN0WcOb.cjs.map +1 -0
- package/dist/chunks/{tween-DDObu9iA.js → tween-CGyolmzB.js} +16 -72
- package/dist/chunks/tween-CGyolmzB.js.map +1 -0
- package/dist/components/core.cjs +106 -0
- package/dist/components/core.cjs.map +1 -1
- package/dist/components/core.d.cts +44 -2
- package/dist/components/core.d.ts +44 -2
- package/dist/components/core.js +105 -1
- package/dist/components/core.js.map +1 -1
- package/dist/components/widgets.cjs +602 -198
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +186 -2
- package/dist/components/widgets.d.ts +186 -2
- package/dist/components/widgets.js +598 -199
- package/dist/components/widgets.js.map +1 -1
- package/dist/llms-full.txt +194 -1
- package/dist/llms.txt +10 -2
- package/dist/manifest.json +492 -1
- package/dist/runtime/format-css.cjs +4 -3
- package/dist/runtime/format-css.cjs.map +1 -1
- package/dist/runtime/format-css.js +4 -3
- package/dist/runtime/format-css.js.map +1 -1
- package/dist/runtime/format-motion.cjs +4 -3
- package/dist/runtime/format-motion.cjs.map +1 -1
- package/dist/runtime/format-motion.js +4 -3
- package/dist/runtime/format-motion.js.map +1 -1
- package/dist/runtime/format-sprite.cjs +225 -0
- package/dist/runtime/format-sprite.cjs.map +1 -0
- package/dist/runtime/format-sprite.d.cts +224 -0
- package/dist/runtime/format-sprite.d.ts +224 -0
- package/dist/runtime/format-sprite.iife.js +2 -0
- package/dist/runtime/format-sprite.iife.js.map +1 -0
- package/dist/runtime/format-sprite.js +215 -0
- package/dist/runtime/format-sprite.js.map +1 -0
- package/dist/runtime/format-svg.cjs +457 -0
- package/dist/runtime/format-svg.cjs.map +1 -0
- package/dist/runtime/format-svg.d.cts +214 -0
- package/dist/runtime/format-svg.d.ts +214 -0
- package/dist/runtime/format-svg.iife.js +2 -0
- package/dist/runtime/format-svg.iife.js.map +1 -0
- package/dist/runtime/format-svg.js +446 -0
- package/dist/runtime/format-svg.js.map +1 -0
- package/dist/runtime/scroll.cjs +301 -0
- package/dist/runtime/scroll.cjs.map +1 -0
- package/dist/runtime/scroll.d.cts +236 -0
- package/dist/runtime/scroll.d.ts +236 -0
- package/dist/runtime/scroll.iife.js +2 -0
- package/dist/runtime/scroll.iife.js.map +1 -0
- package/dist/runtime/scroll.js +292 -0
- package/dist/runtime/scroll.js.map +1 -0
- package/dist/runtime/text.cjs +147 -0
- package/dist/runtime/text.cjs.map +1 -0
- package/dist/runtime/text.d.cts +65 -0
- package/dist/runtime/text.d.ts +65 -0
- package/dist/runtime/text.iife.js +2 -0
- package/dist/runtime/text.iife.js.map +1 -0
- package/dist/runtime/text.js +143 -0
- package/dist/runtime/text.js.map +1 -0
- package/dist/runtime.cjs +5 -4
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.d.cts +9 -2
- package/dist/runtime.d.ts +9 -2
- package/dist/runtime.iife.js +1 -1
- package/dist/runtime.iife.js.map +1 -1
- package/dist/runtime.js +5 -4
- package/dist/runtime.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +2 -2
- package/docs/ai-prompt-guide.md +54 -0
- package/docs/components/README.md +255 -0
- package/docs/components/usa-accordion.md +38 -0
- package/docs/components/usa-acrylic.md +38 -0
- package/docs/components/usa-add-to-cart.md +40 -0
- package/docs/components/usa-ambient.md +32 -0
- package/docs/components/usa-anim-icon.md +34 -0
- package/docs/components/usa-audio.md +38 -0
- package/docs/components/usa-aurora.md +36 -0
- package/docs/components/usa-auto-animate.md +44 -0
- package/docs/components/usa-auto-skeleton.md +38 -0
- package/docs/components/usa-avatar-stack.md +38 -0
- package/docs/components/usa-back-to-top.md +32 -0
- package/docs/components/usa-badge-wall.md +39 -0
- package/docs/components/usa-badge.md +36 -0
- package/docs/components/usa-bar-chart.md +33 -0
- package/docs/components/usa-bg-generator.md +32 -0
- package/docs/components/usa-blobs.md +32 -0
- package/docs/components/usa-bottom-sheet.md +32 -0
- package/docs/components/usa-button.md +78 -0
- package/docs/components/usa-card-stack.md +40 -0
- package/docs/components/usa-card.md +94 -0
- package/docs/components/usa-carousel-3d.md +40 -0
- package/docs/components/usa-carousel.md +40 -0
- package/docs/components/usa-cart-drawer.md +33 -0
- package/docs/components/usa-chapter-nav.md +40 -0
- package/docs/components/usa-chat-composer.md +33 -0
- package/docs/components/usa-check.md +32 -0
- package/docs/components/usa-checkbox.md +32 -0
- package/docs/components/usa-click.md +36 -0
- package/docs/components/usa-clock-control.md +37 -0
- package/docs/components/usa-code-export.md +36 -0
- package/docs/components/usa-color-picker.md +32 -0
- package/docs/components/usa-command-palette.md +39 -0
- package/docs/components/usa-compare.md +38 -0
- package/docs/components/usa-countdown.md +32 -0
- package/docs/components/usa-counter.md +32 -0
- package/docs/components/usa-cube-gallery.md +40 -0
- package/docs/components/usa-cube.md +36 -0
- package/docs/components/usa-cursor.md +32 -0
- package/docs/components/usa-date-picker.md +32 -0
- package/docs/components/usa-depth.md +44 -0
- package/docs/components/usa-dialog.md +40 -0
- package/docs/components/usa-disclosure.md +38 -0
- package/docs/components/usa-distort.md +36 -0
- package/docs/components/usa-dock.md +40 -0
- package/docs/components/usa-dot-network.md +32 -0
- package/docs/components/usa-double-tap.md +36 -0
- package/docs/components/usa-draggable.md +38 -0
- package/docs/components/usa-draw.md +36 -0
- package/docs/components/usa-drawer.md +34 -0
- package/docs/components/usa-equalizer.md +33 -0
- package/docs/components/usa-fab.md +40 -0
- package/docs/components/usa-festival-banner.md +32 -0
- package/docs/components/usa-field.md +34 -0
- package/docs/components/usa-file-drop.md +35 -0
- package/docs/components/usa-fullpage.md +38 -0
- package/docs/components/usa-fx.md +851 -0
- package/docs/components/usa-gauge.md +32 -0
- package/docs/components/usa-gen-art.md +32 -0
- package/docs/components/usa-gesture-fx.md +36 -0
- package/docs/components/usa-gesture-sticker.md +36 -0
- package/docs/components/usa-glitch.md +32 -0
- package/docs/components/usa-globe.md +33 -0
- package/docs/components/usa-gradient-text.md +32 -0
- package/docs/components/usa-grain.md +36 -0
- package/docs/components/usa-grid-glow.md +36 -0
- package/docs/components/usa-gyro-card.md +38 -0
- package/docs/components/usa-handwriting.md +32 -0
- package/docs/components/usa-hero-video.md +38 -0
- package/docs/components/usa-hold.md +32 -0
- package/docs/components/usa-hud-panel.md +38 -0
- package/docs/components/usa-hydrate.md +42 -0
- package/docs/components/usa-icon-morph.md +34 -0
- package/docs/components/usa-install-button.md +32 -0
- package/docs/components/usa-kanban.md +46 -0
- package/docs/components/usa-keyframe-editor.md +37 -0
- package/docs/components/usa-kpi.md +32 -0
- package/docs/components/usa-leaderboard.md +41 -0
- package/docs/components/usa-like.md +32 -0
- package/docs/components/usa-liquid-nav.md +36 -0
- package/docs/components/usa-liquid.md +36 -0
- package/docs/components/usa-loading-bar.md +35 -0
- package/docs/components/usa-location-card.md +34 -0
- package/docs/components/usa-lottie-icon.md +34 -0
- package/docs/components/usa-lottie.md +32 -0
- package/docs/components/usa-lyrics.md +38 -0
- package/docs/components/usa-magnetic.md +32 -0
- package/docs/components/usa-marquee.md +38 -0
- package/docs/components/usa-mask-reveal.md +36 -0
- package/docs/components/usa-masonry-flow.md +42 -0
- package/docs/components/usa-masonry.md +38 -0
- package/docs/components/usa-menu-toggle.md +34 -0
- package/docs/components/usa-menu.md +44 -0
- package/docs/components/usa-message-list.md +39 -0
- package/docs/components/usa-milestones.md +40 -0
- package/docs/components/usa-modal.md +42 -0
- package/docs/components/usa-morph.md +34 -0
- package/docs/components/usa-motion-inspector.md +32 -0
- package/docs/components/usa-motion-prefs.md +32 -0
- package/docs/components/usa-motion-spec.md +32 -0
- package/docs/components/usa-motion-switch.md +34 -0
- package/docs/components/usa-motion-theme.md +40 -0
- package/docs/components/usa-motion.md +42 -0
- package/docs/components/usa-music-player.md +36 -0
- package/docs/components/usa-native-preview.md +36 -0
- package/docs/components/usa-nav-morph.md +40 -0
- package/docs/components/usa-navbar.md +36 -0
- package/docs/components/usa-notification-bell.md +37 -0
- package/docs/components/usa-odometer.md +34 -0
- package/docs/components/usa-organic-card.md +36 -0
- package/docs/components/usa-otp.md +33 -0
- package/docs/components/usa-overscroll.md +36 -0
- package/docs/components/usa-pack.md +111 -0
- package/docs/components/usa-pagination.md +32 -0
- package/docs/components/usa-panorama.md +32 -0
- package/docs/components/usa-particles.md +32 -0
- package/docs/components/usa-pause-all.md +32 -0
- package/docs/components/usa-perf-monitor.md +32 -0
- package/docs/components/usa-pinch-zoom.md +36 -0
- package/docs/components/usa-player.md +38 -0
- package/docs/components/usa-plugin-card.md +61 -0
- package/docs/components/usa-plugin-store.md +36 -0
- package/docs/components/usa-popover.md +38 -0
- package/docs/components/usa-post-fx.md +36 -0
- package/docs/components/usa-presence.md +36 -0
- package/docs/components/usa-press.md +32 -0
- package/docs/components/usa-prize-wheel.md +32 -0
- package/docs/components/usa-product-gallery.md +40 -0
- package/docs/components/usa-progress-ring.md +38 -0
- package/docs/components/usa-progress.md +34 -0
- package/docs/components/usa-prop-panel.md +34 -0
- package/docs/components/usa-pull-cord.md +32 -0
- package/docs/components/usa-pull-refresh.md +37 -0
- package/docs/components/usa-radar.md +32 -0
- package/docs/components/usa-reactions.md +32 -0
- package/docs/components/usa-red-envelope.md +32 -0
- package/docs/components/usa-retro-button.md +34 -0
- package/docs/components/usa-reveal.md +36 -0
- package/docs/components/usa-ripple.md +32 -0
- package/docs/components/usa-route-transition.md +38 -0
- package/docs/components/usa-scene.md +38 -0
- package/docs/components/usa-scramble.md +32 -0
- package/docs/components/usa-scroll-highlight.md +34 -0
- package/docs/components/usa-scroll-progress.md +36 -0
- package/docs/components/usa-scroll-scene.md +66 -0
- package/docs/components/usa-scrolly.md +40 -0
- package/docs/components/usa-segmented.md +40 -0
- package/docs/components/usa-shader.md +74 -0
- package/docs/components/usa-sheet.md +42 -0
- package/docs/components/usa-shimmer-text.md +32 -0
- package/docs/components/usa-shortcut.md +34 -0
- package/docs/components/usa-skeleton-reveal.md +42 -0
- package/docs/components/usa-skeleton.md +36 -0
- package/docs/components/usa-sketch-chart.md +32 -0
- package/docs/components/usa-slider.md +32 -0
- package/docs/components/usa-sparkline.md +32 -0
- package/docs/components/usa-spatial-card.md +40 -0
- package/docs/components/usa-spinner.md +34 -0
- package/docs/components/usa-splash.md +36 -0
- package/docs/components/usa-split-text.md +32 -0
- package/docs/components/usa-spotlight.md +40 -0
- package/docs/components/usa-spring.md +42 -0
- package/docs/components/usa-stagger.md +40 -0
- package/docs/components/usa-star-rating.md +34 -0
- package/docs/components/usa-stepper.md +42 -0
- package/docs/components/usa-sticky-stack.md +40 -0
- package/docs/components/usa-sticky-wall.md +40 -0
- package/docs/components/usa-stories.md +38 -0
- package/docs/components/usa-story.md +80 -0
- package/docs/components/usa-suggestion-chips.md +32 -0
- package/docs/components/usa-swipe-deck.md +40 -0
- package/docs/components/usa-swipeable.md +36 -0
- package/docs/components/usa-switch.md +32 -0
- package/docs/components/usa-tab-bar.md +46 -0
- package/docs/components/usa-tabs.md +40 -0
- package/docs/components/usa-terminal.md +38 -0
- package/docs/components/usa-text-rotate.md +32 -0
- package/docs/components/usa-text-splitter.md +60 -0
- package/docs/components/usa-theme-surface.md +36 -0
- package/docs/components/usa-theme-switcher.md +32 -0
- package/docs/components/usa-tilt.md +36 -0
- package/docs/components/usa-timeline.md +40 -0
- package/docs/components/usa-tip.md +44 -0
- package/docs/components/usa-toast-stack.md +36 -0
- package/docs/components/usa-toaster.md +36 -0
- package/docs/components/usa-typewriter.md +32 -0
- package/docs/components/usa-upload-progress.md +33 -0
- package/docs/components/usa-video-card.md +40 -0
- package/docs/components/usa-view-switch.md +38 -0
- package/docs/components/usa-voice-button.md +33 -0
- package/docs/components/usa-volume-knob.md +32 -0
- package/docs/components/usa-water-ripple.md +36 -0
- package/docs/components/usa-wave-text.md +32 -0
- package/docs/components/usa-weather-card.md +32 -0
- package/docs/components/usa-worker-canvas.md +32 -0
- package/docs/components/usa-xp-bar.md +33 -0
- package/docs/components.md +95 -0
- package/docs/runtime/format-sprite.md +60 -0
- package/docs/runtime/format-svg.md +62 -0
- package/docs/runtime/scroll.md +61 -0
- package/docs/runtime/text.md +59 -0
- package/package.json +45 -3
- package/dist/chunks/tween-DDObu9iA.js.map +0 -1
- package/dist/chunks/tween-JEthWrjo.cjs.map +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-gauge>` — Spring gauge
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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".
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 7.2
|
|
8
|
+
- **Import:** `import { defineGauge } from 'motionary/components/widgets'` then `defineGauge();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `min`, `max`, `zones`, `unit`, `label`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/gauge.ts](../../src/components/widgets/gauge.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-gauge value="72" unit="%" label="CPU" zones="60:#22c55e,85:#f59e0b,100:#ef4444"></usa-gauge>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineGauge } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
defineGauge(); // registers <usa-gauge>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-gauge value="72" unit="%" label="CPU" zones="60:#22c55e,85:#f59e0b,100:#ef4444"></usa-gauge>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-gen-art>` — Generative artwork
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 9.3
|
|
8
|
+
- **Import:** `import { defineGenArt } from 'motionary/components/widgets'` then `defineGenArt();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `art`, `seed`, `palette`, `label`
|
|
11
|
+
- **Events:** `usa:generate`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `generate()`, `toDataURL()`
|
|
14
|
+
- **Source:** [src/components/widgets/gen-art.ts](../../src/components/widgets/gen-art.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-gen-art art="flow" seed="7" palette="ocean" style="height:240px"></usa-gen-art>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineGenArt } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
defineGenArt(); // registers <usa-gen-art>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-gen-art art="flow" seed="7" palette="ocean" style="height:240px"></usa-gen-art>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-gesture-fx>` — Gesture triggers
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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").
|
|
6
|
+
|
|
7
|
+
- **Category:** fx
|
|
8
|
+
- **Import:** `import { defineGestureFx } from 'motionary/components/effects'` then `defineGestureFx();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `gesture`, `effect`, `options`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/effects/cursor.ts](../../src/components/effects/cursor.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-gesture-fx gesture="long-press" effect="tada">
|
|
20
|
+
<button>Hold me</button>
|
|
21
|
+
</usa-gesture-fx>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineGestureFx } from 'motionary/components/effects';
|
|
28
|
+
|
|
29
|
+
defineGestureFx(); // registers <usa-gesture-fx>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-gesture-fx gesture="long-press" effect="tada">
|
|
33
|
+
<button>Hold me</button>
|
|
34
|
+
</usa-gesture-fx>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-gesture-sticker>` — Multi-touch sticker
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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).
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 8.7
|
|
8
|
+
- **Import:** `import { defineGestureSticker } from 'motionary/components/widgets'` then `defineGestureSticker();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `min`, `max`, `label`
|
|
11
|
+
- **Events:** `usa:transform`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `transformTo()`, `reset()`
|
|
14
|
+
- **Source:** [src/components/widgets/gesture-sticker.ts](../../src/components/widgets/gesture-sticker.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-gesture-sticker label="Star sticker" max="3">
|
|
20
|
+
<img src="star.png" alt="Star" width="120">
|
|
21
|
+
</usa-gesture-sticker>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineGestureSticker } from 'motionary/components/widgets';
|
|
28
|
+
|
|
29
|
+
defineGestureSticker(); // registers <usa-gesture-sticker>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-gesture-sticker label="Star sticker" max="3">
|
|
33
|
+
<img src="star.png" alt="Star" width="120">
|
|
34
|
+
</usa-gesture-sticker>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-glitch>` — Glitch text
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
An RGB-split, sliced glitch — always on or on hover.
|
|
6
|
+
|
|
7
|
+
- **Category:** text
|
|
8
|
+
- **Import:** `import { defineGlitch } from 'motionary/components/text'` then `defineGlitch();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `text`, `intensity`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `mount()`, `splitChars()`
|
|
14
|
+
- **Source:** [src/components/text/text-fx.ts](../../src/components/text/text-fx.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-glitch trigger="hover">SYSTEM ERROR</usa-glitch>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineGlitch } from 'motionary/components/text';
|
|
26
|
+
|
|
27
|
+
defineGlitch(); // registers <usa-glitch>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-glitch trigger="hover">SYSTEM ERROR</usa-glitch>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# `<usa-globe>` — Spinning globe
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 7.6
|
|
8
|
+
- **Import:** `import { defineGlobe } from 'motionary/components/widgets'` then `defineGlobe();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `markers`, `speed`, `tilt`
|
|
11
|
+
- **Events:** `usa:focus`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `flyTo()`
|
|
14
|
+
- **Source:** [src/components/widgets/globe.ts](../../src/components/widgets/globe.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-globe markers="Shanghai:31.2,121.5; London:51.5,-0.1; New York:40.7,-74"></usa-globe>
|
|
20
|
+
<script>globe.flyTo('London');</script>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ES module
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { defineGlobe } from 'motionary/components/widgets';
|
|
27
|
+
|
|
28
|
+
defineGlobe(); // registers <usa-globe>
|
|
29
|
+
|
|
30
|
+
/* then use it in your HTML:
|
|
31
|
+
<usa-globe markers="Shanghai:31.2,121.5; London:51.5,-0.1; New York:40.7,-74"></usa-globe>
|
|
32
|
+
*/
|
|
33
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-gradient-text>` — Gradient flow
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
Text filled with a multi-colour gradient that keeps flowing.
|
|
6
|
+
|
|
7
|
+
- **Category:** text
|
|
8
|
+
- **Import:** `import { defineGradientText } from 'motionary/components/text'` then `defineGradientText();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `colors`, `speed`, `angle`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `mount()`, `splitChars()`
|
|
14
|
+
- **Source:** [src/components/text/text-fx.ts](../../src/components/text/text-fx.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-gradient-text colors="#7c5cff,#22d3ee,#f472b6">Gradient</usa-gradient-text>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineGradientText } from 'motionary/components/text';
|
|
26
|
+
|
|
27
|
+
defineGradientText(); // registers <usa-gradient-text>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-gradient-text colors="#7c5cff,#22d3ee,#f472b6">Gradient</usa-gradient-text>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-grain>` — Film grain
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
An SVG-noise grain overlay — no image to ship. animated makes it jitter like film.
|
|
6
|
+
|
|
7
|
+
- **Category:** background
|
|
8
|
+
- **Import:** `import { defineGrain } from 'motionary/components/background'` then `defineGrain();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `opacity`, `blend`, `scale`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/background/grain.ts](../../src/components/background/grain.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-grain animated opacity="0.15">
|
|
20
|
+
<img src="hero.jpg" alt="">
|
|
21
|
+
</usa-grain>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineGrain } from 'motionary/components/background';
|
|
28
|
+
|
|
29
|
+
defineGrain(); // registers <usa-grain>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-grain animated opacity="0.15">
|
|
33
|
+
<img src="hero.jpg" alt="">
|
|
34
|
+
</usa-grain>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-grid-glow>` — Grid glow
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
A line grid behind the content that lights up around the pointer.
|
|
6
|
+
|
|
7
|
+
- **Category:** background
|
|
8
|
+
- **Import:** `import { defineGridGlow } from 'motionary/components/background'` then `defineGridGlow();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `mount()`
|
|
14
|
+
- **Source:** [src/components/background/bg-fx.ts](../../src/components/background/bg-fx.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-grid-glow size="32">
|
|
20
|
+
<h2>Hero</h2>
|
|
21
|
+
</usa-grid-glow>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineGridGlow } from 'motionary/components/background';
|
|
28
|
+
|
|
29
|
+
defineGridGlow(); // registers <usa-grid-glow>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-grid-glow size="32">
|
|
33
|
+
<h2>Hero</h2>
|
|
34
|
+
</usa-grid-glow>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-gyro-card>` — Gyro 3D card
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 8.7
|
|
8
|
+
- **Import:** `import { defineGyroCard } from 'motionary/components/widgets'` then `defineGyroCard();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `max`, `glare`
|
|
11
|
+
- **Events:** `usa:tilt`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `tilt()`, `wobble()`
|
|
14
|
+
- **Source:** [src/components/widgets/gyro-card.ts](../../src/components/widgets/gyro-card.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-gyro-card max="15">
|
|
20
|
+
<h3 data-depth="2">Gyro</h3>
|
|
21
|
+
<p data-depth="1">Tilt your phone</p>
|
|
22
|
+
</usa-gyro-card>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineGyroCard } from 'motionary/components/widgets';
|
|
29
|
+
|
|
30
|
+
defineGyroCard(); // registers <usa-gyro-card>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-gyro-card max="15">
|
|
34
|
+
<h3 data-depth="2">Gyro</h3>
|
|
35
|
+
<p data-depth="1">Tilt your phone</p>
|
|
36
|
+
</usa-gyro-card>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-handwriting>` — Handwriting draw
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
The text draws itself stroke by stroke, then fills in — signatures, hero words.
|
|
6
|
+
|
|
7
|
+
- **Category:** text
|
|
8
|
+
- **Import:** `import { defineHandwriting } from 'motionary/components/text'` then `defineHandwriting();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `text`, `size`, `font`
|
|
11
|
+
- **Events:** `usa:complete`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `mount()`, `splitChars()`
|
|
14
|
+
- **Source:** [src/components/text/text-fx.ts](../../src/components/text/text-fx.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-handwriting text="Thank you" size="72"></usa-handwriting>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineHandwriting } from 'motionary/components/text';
|
|
26
|
+
|
|
27
|
+
defineHandwriting(); // registers <usa-handwriting>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-handwriting text="Thank you" size="72"></usa-handwriting>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-hero-video>` — Hero video
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 9.4
|
|
8
|
+
- **Import:** `import { defineHeroVideo } from 'motionary/components/widgets'` then `defineHeroVideo();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `label`, `scrub`, `poster`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `toggle()`
|
|
14
|
+
- **Source:** [src/components/widgets/hero-video.ts](../../src/components/widgets/hero-video.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-hero-video label="Welcome" poster="poster.jpg">
|
|
20
|
+
<video src="hero.mp4" autoplay muted loop playsinline></video>
|
|
21
|
+
<h1>Motion, declared.</h1>
|
|
22
|
+
</usa-hero-video>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineHeroVideo } from 'motionary/components/widgets';
|
|
29
|
+
|
|
30
|
+
defineHeroVideo(); // registers <usa-hero-video>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-hero-video label="Welcome" poster="poster.jpg">
|
|
34
|
+
<video src="hero.mp4" autoplay muted loop playsinline></video>
|
|
35
|
+
<h1>Motion, declared.</h1>
|
|
36
|
+
</usa-hero-video>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-hold>` — Hold to confirm
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
Press and hold (pointer, Space or Enter) while a ring fills; releasing early rewinds. For destructive actions.
|
|
6
|
+
|
|
7
|
+
- **Category:** click
|
|
8
|
+
- **Import:** `import { defineHold } from 'motionary/components/click'` then `defineHold();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `duration`, `disabled`
|
|
11
|
+
- **Events:** `usa:progress`, `usa:confirm`, `usa:cancel`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `cancel()`
|
|
14
|
+
- **Source:** [src/components/click/hold.ts](../../src/components/click/hold.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-hold duration="1200" label="Delete project">Hold to delete</usa-hold>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineHold } from 'motionary/components/click';
|
|
26
|
+
|
|
27
|
+
defineHold(); // registers <usa-hold>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-hold duration="1200" label="Delete project">Hold to delete</usa-hold>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-hud-panel>` — HUD panel
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 8.4
|
|
8
|
+
- **Import:** `import { defineHudPanel } from 'motionary/components/widgets'` then `defineHudPanel();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `title`, `status`, `color`
|
|
11
|
+
- **Events:** `usa:boot`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `boot()`
|
|
14
|
+
- **Source:** [src/components/widgets/hud-panel.ts](../../src/components/widgets/hud-panel.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-hud-panel title="SHIP STATUS" status="ONLINE">
|
|
20
|
+
<p data-value="82">Shields</p>
|
|
21
|
+
<p data-value="47">Fuel</p>
|
|
22
|
+
</usa-hud-panel>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineHudPanel } from 'motionary/components/widgets';
|
|
29
|
+
|
|
30
|
+
defineHudPanel(); // registers <usa-hud-panel>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-hud-panel title="SHIP STATUS" status="ONLINE">
|
|
34
|
+
<p data-value="82">Shields</p>
|
|
35
|
+
<p data-value="47">Fuel</p>
|
|
36
|
+
</usa-hud-panel>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# `<usa-hydrate>` — SSR hydration animation
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 8.0
|
|
8
|
+
- **Import:** `import { defineHydrate } from 'motionary/components/widgets'` then `defineHydrate();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `effect`, `stagger`, `duration`
|
|
11
|
+
- **Events:** `usa:hydrated`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `replay()`
|
|
14
|
+
- **Source:** [src/components/widgets/hydrate.ts](../../src/components/widgets/hydrate.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<!-- <head> -->${ssrHead()}
|
|
20
|
+
<usa-hydrate effect="fade-up" stagger="80">
|
|
21
|
+
<h1>Server-rendered title</h1>
|
|
22
|
+
<p>…</p>
|
|
23
|
+
</usa-hydrate>
|
|
24
|
+
<!-- or: <section data-usa-hydrate="blur">…</section> + hydrateMotion() -->
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## ES module
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
import { defineHydrate } from 'motionary/components/widgets';
|
|
31
|
+
|
|
32
|
+
defineHydrate(); // registers <usa-hydrate>
|
|
33
|
+
|
|
34
|
+
/* then use it in your HTML:
|
|
35
|
+
<!-- <head> -->${ssrHead()}
|
|
36
|
+
<usa-hydrate effect="fade-up" stagger="80">
|
|
37
|
+
<h1>Server-rendered title</h1>
|
|
38
|
+
<p>…</p>
|
|
39
|
+
</usa-hydrate>
|
|
40
|
+
<!-- or: <section data-usa-hydrate="blur">…</section> + hydrateMotion() -->
|
|
41
|
+
*/
|
|
42
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `<usa-icon-morph>` — Icon morph
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
- **Category:** click
|
|
8
|
+
- **Import:** `import { defineIconMorph } from 'motionary/components/click'` then `defineIconMorph();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `icons`, `size`, `toggle`
|
|
11
|
+
- **Events:** `usa:change`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `next()`, `show()`
|
|
14
|
+
- **Source:** [src/components/click/icon-morph.ts](../../src/components/click/icon-morph.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-icon-morph icons="play,pause" labels="Play,Pause" toggle></usa-icon-morph>
|
|
20
|
+
<usa-icon-morph icons="menu,close" labels="Open menu,Close menu" toggle></usa-icon-morph>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ES module
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { defineIconMorph } from 'motionary/components/click';
|
|
27
|
+
|
|
28
|
+
defineIconMorph(); // registers <usa-icon-morph>
|
|
29
|
+
|
|
30
|
+
/* then use it in your HTML:
|
|
31
|
+
<usa-icon-morph icons="play,pause" labels="Play,Pause" toggle></usa-icon-morph>
|
|
32
|
+
<usa-icon-morph icons="menu,close" labels="Open menu,Close menu" toggle></usa-icon-morph>
|
|
33
|
+
*/
|
|
34
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-install-button>` — Install button
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 10.1
|
|
8
|
+
- **Import:** `import { defineInstallButton } from 'motionary/components/widgets'` then `defineInstallButton();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `package`, `managers`, `cdn`, `dev`, `manager`
|
|
11
|
+
- **Events:** `usa:copy`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `command()`, `copy()`
|
|
14
|
+
- **Source:** [src/components/widgets/install-button.ts](../../src/components/widgets/install-button.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<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>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineInstallButton } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
defineInstallButton(); // registers <usa-install-button>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<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>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# `<usa-kanban>` — Kanban board (drag-sort)
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
- **Category:** layout · **since** 6.8
|
|
8
|
+
- **Import:** `import { defineKanban } from 'motionary/components/widgets'` then `defineKanban();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** `usa:move`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `cardsOf()`, `move()`
|
|
14
|
+
- **Source:** [src/components/widgets/kanban.ts](../../src/components/widgets/kanban.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-kanban label="Sprint">
|
|
20
|
+
<section data-title="To do">
|
|
21
|
+
<h3>To do</h3>
|
|
22
|
+
<div data-card>Design</div>
|
|
23
|
+
<div data-card>Write docs</div>
|
|
24
|
+
</section>
|
|
25
|
+
<section data-title="Done"><h3>Done</h3></section>
|
|
26
|
+
</usa-kanban>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## ES module
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
import { defineKanban } from 'motionary/components/widgets';
|
|
33
|
+
|
|
34
|
+
defineKanban(); // registers <usa-kanban>
|
|
35
|
+
|
|
36
|
+
/* then use it in your HTML:
|
|
37
|
+
<usa-kanban label="Sprint">
|
|
38
|
+
<section data-title="To do">
|
|
39
|
+
<h3>To do</h3>
|
|
40
|
+
<div data-card>Design</div>
|
|
41
|
+
<div data-card>Write docs</div>
|
|
42
|
+
</section>
|
|
43
|
+
<section data-title="Done"><h3>Done</h3></section>
|
|
44
|
+
</usa-kanban>
|
|
45
|
+
*/
|
|
46
|
+
```
|