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,36 @@
|
|
|
1
|
+
# `<usa-presence>` — Presence avatar
|
|
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.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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 7.4
|
|
8
|
+
- **Import:** `import { definePresence } from 'motionary/components/widgets'` then `definePresence();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `status`, `speaking`, `name`, `src`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/presence.ts](../../src/components/widgets/presence.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-presence name="Ada Lovelace" status="online"></usa-presence>
|
|
20
|
+
<usa-presence name="Alan Turing" status="away" speaking></usa-presence>
|
|
21
|
+
<usa-presence name="Grace Hopper" status="busy" story></usa-presence>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { definePresence } from 'motionary/components/widgets';
|
|
28
|
+
|
|
29
|
+
definePresence(); // registers <usa-presence>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-presence name="Ada Lovelace" status="online"></usa-presence>
|
|
33
|
+
<usa-presence name="Alan Turing" status="away" speaking></usa-presence>
|
|
34
|
+
<usa-presence name="Grace Hopper" status="busy" story></usa-presence>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-press>` — Press feedback
|
|
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
|
+
Tactile press: dips while pressed and springs back, or bounces once with bounce. Mouse, touch, pen and keyboard.
|
|
6
|
+
|
|
7
|
+
- **Category:** interaction
|
|
8
|
+
- **Import:** `import { definePress } from 'motionary/components/interaction'` then `definePress();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `disabled`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/interaction/press.ts](../../src/components/interaction/press.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-press bounce><button>Press</button></usa-press>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { definePress } from 'motionary/components/interaction';
|
|
26
|
+
|
|
27
|
+
definePress(); // registers <usa-press>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-press bounce><button>Press</button></usa-press>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-prize-wheel>` — Prize wheel
|
|
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.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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 7.5
|
|
8
|
+
- **Import:** `import { definePrizeWheel } from 'motionary/components/widgets'` then `definePrizeWheel();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** `usa:result`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `spin()`
|
|
14
|
+
- **Source:** [src/components/widgets/prize-wheel.ts](../../src/components/widgets/prize-wheel.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-prize-wheel segments="10% off,Free ship,Try again,🎁 Gift,5% off,Jackpot"></usa-prize-wheel>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { definePrizeWheel } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
definePrizeWheel(); // registers <usa-prize-wheel>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-prize-wheel segments="10% off,Free ship,Try again,🎁 Gift,5% off,Jackpot"></usa-prize-wheel>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# `<usa-product-gallery>` — Product gallery
|
|
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.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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 7.3
|
|
8
|
+
- **Import:** `import { defineProductGallery } from 'motionary/components/widgets'` then `defineProductGallery();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `index`
|
|
11
|
+
- **Events:** `usa:change`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `go()`, `next()`, `prev()`
|
|
14
|
+
- **Source:** [src/components/widgets/product-gallery.ts](../../src/components/widgets/product-gallery.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-product-gallery zoom="2">
|
|
20
|
+
<img src="front.jpg" alt="Front">
|
|
21
|
+
<img src="side.jpg" alt="Side">
|
|
22
|
+
<img src="back.jpg" alt="Back">
|
|
23
|
+
</usa-product-gallery>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## ES module
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import { defineProductGallery } from 'motionary/components/widgets';
|
|
30
|
+
|
|
31
|
+
defineProductGallery(); // registers <usa-product-gallery>
|
|
32
|
+
|
|
33
|
+
/* then use it in your HTML:
|
|
34
|
+
<usa-product-gallery zoom="2">
|
|
35
|
+
<img src="front.jpg" alt="Front">
|
|
36
|
+
<img src="side.jpg" alt="Side">
|
|
37
|
+
<img src="back.jpg" alt="Back">
|
|
38
|
+
</usa-product-gallery>
|
|
39
|
+
*/
|
|
40
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-progress-ring>` — Progress ring / bar / 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
|
+
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%.
|
|
6
|
+
|
|
7
|
+
- **Category:** feedback · **since** 6.4
|
|
8
|
+
- **Import:** `import { defineProgressRing } from 'motionary/components/widgets'` then `defineProgressRing();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `variant`, `value`, `max`, `gradient`
|
|
11
|
+
- **Events:** `usa:complete`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/meters.ts](../../src/components/widgets/meters.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-progress-ring value="72" gradient="#7c5cff,#22d3ee"></usa-progress-ring>
|
|
20
|
+
<usa-progress-ring variant="bar" value="40"></usa-progress-ring>
|
|
21
|
+
<usa-progress-ring variant="semi" value="88"></usa-progress-ring>
|
|
22
|
+
<!-- el.value = 90 animates to the new value -->
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineProgressRing } from 'motionary/components/widgets';
|
|
29
|
+
|
|
30
|
+
defineProgressRing(); // registers <usa-progress-ring>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-progress-ring value="72" gradient="#7c5cff,#22d3ee"></usa-progress-ring>
|
|
34
|
+
<usa-progress-ring variant="bar" value="40"></usa-progress-ring>
|
|
35
|
+
<usa-progress-ring variant="semi" value="88"></usa-progress-ring>
|
|
36
|
+
<!-- el.value = 90 animates to the new value -->
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `<usa-progress>` — Progress bar
|
|
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
|
+
Determinate bars glide between values; without a value it shows the Fluent indeterminate animation. Paused / error states.
|
|
6
|
+
|
|
7
|
+
- **Category:** feedback
|
|
8
|
+
- **Import:** `import { defineProgress } from 'motionary/components/feedback'` then `defineProgress();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `value`, `max`, `indeterminate`, `label`
|
|
11
|
+
- **Events:** `usa:complete`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/feedback/progress.ts](../../src/components/feedback/progress.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-progress value="40"></usa-progress>
|
|
20
|
+
<usa-progress indeterminate></usa-progress>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ES module
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { defineProgress } from 'motionary/components/feedback';
|
|
27
|
+
|
|
28
|
+
defineProgress(); // registers <usa-progress>
|
|
29
|
+
|
|
30
|
+
/* then use it in your HTML:
|
|
31
|
+
<usa-progress value="40"></usa-progress>
|
|
32
|
+
<usa-progress indeterminate></usa-progress>
|
|
33
|
+
*/
|
|
34
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `<usa-prop-panel>` — Property 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.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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 8.9
|
|
8
|
+
- **Import:** `import { definePropPanel } from 'motionary/components/widgets'` then `definePropPanel();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `for`, `props`, `label`
|
|
11
|
+
- **Events:** `usa:prop`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `reset()`
|
|
14
|
+
- **Source:** [src/components/widgets/prop-panel.ts](../../src/components/widgets/prop-panel.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-star-rating id="r" value="3"></usa-star-rating>
|
|
20
|
+
<usa-prop-panel for="#r" props="value:number:0:5, icon:select:star|heart, readonly:boolean"></usa-prop-panel>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ES module
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { definePropPanel } from 'motionary/components/widgets';
|
|
27
|
+
|
|
28
|
+
definePropPanel(); // registers <usa-prop-panel>
|
|
29
|
+
|
|
30
|
+
/* then use it in your HTML:
|
|
31
|
+
<usa-star-rating id="r" value="3"></usa-star-rating>
|
|
32
|
+
<usa-prop-panel for="#r" props="value:number:0:5, icon:select:star|heart, readonly:boolean"></usa-prop-panel>
|
|
33
|
+
*/
|
|
34
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-pull-cord>` — Lamp pull-cord switch
|
|
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: 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".
|
|
6
|
+
|
|
7
|
+
- **Category:** click · **since** 6.8
|
|
8
|
+
- **Import:** `import { definePullCord } from 'motionary/components/widgets'` then `definePullCord();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** `usa:change`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `toggle()`
|
|
14
|
+
- **Source:** [src/components/widgets/pull-cord.ts](../../src/components/widgets/pull-cord.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-pull-cord label="Desk lamp"></usa-pull-cord>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { definePullCord } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
definePullCord(); // registers <usa-pull-cord>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-pull-cord label="Desk lamp"></usa-pull-cord>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# `<usa-pull-refresh>` — Pull to refresh
|
|
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
|
+
Pull down at the top of a list: the spinner stretches in with rubber-band resistance; release past the threshold to refresh.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui
|
|
8
|
+
- **Import:** `import { definePullRefresh } from 'motionary/components/ui'` then `definePullRefresh();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `refresh()`
|
|
14
|
+
- **Source:** [src/components/ui/pull-refresh.ts](../../src/components/ui/pull-refresh.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-pull-refresh style="height: 300px">
|
|
20
|
+
<ul>…</ul>
|
|
21
|
+
</usa-pull-refresh>
|
|
22
|
+
<script>el.addEventListener('usa:refresh', async (e) => { await load(); e.detail.done(); });</script>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { definePullRefresh } from 'motionary/components/ui';
|
|
29
|
+
|
|
30
|
+
definePullRefresh(); // registers <usa-pull-refresh>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-pull-refresh style="height: 300px">
|
|
34
|
+
<ul>…</ul>
|
|
35
|
+
</usa-pull-refresh>
|
|
36
|
+
*/
|
|
37
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-radar>` — Radar scope
|
|
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 radar scope — a conic beam sweeps round and each target lights up and fades as the beam passes over it.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 8.4
|
|
8
|
+
- **Import:** `import { defineRadar } from 'motionary/components/widgets'` then `defineRadar();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `targets`, `rings`, `speed`, `label`
|
|
11
|
+
- **Events:** `usa:ping`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `setTargets()`
|
|
14
|
+
- **Source:** [src/components/widgets/radar.ts](../../src/components/widgets/radar.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-radar targets="Alpha:40,0.6; Bravo:200,0.35; Echo:300,0.8" speed="4"></usa-radar>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineRadar } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
defineRadar(); // registers <usa-radar>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-radar targets="Alpha:40,0.6; Bravo:200,0.35; Echo:300,0.8" speed="4"></usa-radar>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-reactions>` — Emoji reactions
|
|
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.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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 7.4
|
|
8
|
+
- **Import:** `import { defineReactions } from 'motionary/components/widgets'` then `defineReactions();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** `usa:react`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `toggle()`
|
|
14
|
+
- **Source:** [src/components/widgets/reactions.ts](../../src/components/widgets/reactions.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-reactions emojis="👍,❤️,😂,🎉" counts="3,1,0,2"></usa-reactions>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineReactions } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
defineReactions(); // registers <usa-reactions>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-reactions emojis="👍,❤️,😂,🎉" counts="3,1,0,2"></usa-reactions>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-red-envelope>` — Red envelope (红包)
|
|
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.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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 8.1
|
|
8
|
+
- **Import:** `import { defineRedEnvelope } from 'motionary/components/widgets'` then `defineRedEnvelope();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `amount`, `currency`, `message`, `from`
|
|
11
|
+
- **Events:** `usa:open`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `open()`, `close()`
|
|
14
|
+
- **Source:** [src/components/widgets/red-envelope.ts](../../src/components/widgets/red-envelope.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-red-envelope amount="88.88" from="Grandma" message="恭喜发财"></usa-red-envelope>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineRedEnvelope } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
defineRedEnvelope(); // registers <usa-red-envelope>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-red-envelope amount="88.88" from="Grandma" message="恭喜发财"></usa-red-envelope>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `<usa-retro-button>` — Retro buttons
|
|
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.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).
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 8.2
|
|
8
|
+
- **Import:** `import { defineRetroButton } from 'motionary/components/widgets'` then `defineRetroButton();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `variant`, `disabled`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/retro-button.ts](../../src/components/widgets/retro-button.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-retro-button variant="pixel">Start</usa-retro-button>
|
|
20
|
+
<usa-retro-button variant="win95">OK</usa-retro-button>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ES module
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { defineRetroButton } from 'motionary/components/widgets';
|
|
27
|
+
|
|
28
|
+
defineRetroButton(); // registers <usa-retro-button>
|
|
29
|
+
|
|
30
|
+
/* then use it in your HTML:
|
|
31
|
+
<usa-retro-button variant="pixel">Start</usa-retro-button>
|
|
32
|
+
<usa-retro-button variant="win95">OK</usa-retro-button>
|
|
33
|
+
*/
|
|
34
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-reveal>` — Reveal
|
|
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
|
+
Fade, slide, zoom, blur or flip content in as it enters the viewport. 12 effects, replay on re-entry with repeat.
|
|
6
|
+
|
|
7
|
+
- **Category:** reveal
|
|
8
|
+
- **Import:** `import { defineReveal } from 'motionary/components/reveal'` then `defineReveal();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `effect`, `distance`, `repeat`, `threshold`, `root-margin`
|
|
11
|
+
- **Events:** `usa:enter`, `usa:leave`, `usa:complete`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `reveal()`, `reset()`
|
|
14
|
+
- **Source:** [src/components/reveal/reveal.ts](../../src/components/reveal/reveal.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-reveal effect="fade-up" duration="700">
|
|
20
|
+
<h2>Hello</h2>
|
|
21
|
+
</usa-reveal>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineReveal } from 'motionary/components/reveal';
|
|
28
|
+
|
|
29
|
+
defineReveal(); // registers <usa-reveal>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-reveal effect="fade-up" duration="700">
|
|
33
|
+
<h2>Hello</h2>
|
|
34
|
+
</usa-reveal>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-ripple>` — Ripple
|
|
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
|
+
Ink ripple from the pointer — or from the centre for Space/Enter — on any button, list item or card.
|
|
6
|
+
|
|
7
|
+
- **Category:** interaction
|
|
8
|
+
- **Import:** `import { defineRipple } from 'motionary/components/interaction'` then `defineRipple();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `ripple()`
|
|
14
|
+
- **Source:** [src/components/interaction/ripple.ts](../../src/components/interaction/ripple.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-ripple><button>Click me</button></usa-ripple>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineRipple } from 'motionary/components/interaction';
|
|
26
|
+
|
|
27
|
+
defineRipple(); // registers <usa-ripple>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-ripple><button>Click me</button></usa-ripple>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-route-transition>` — Route transition container
|
|
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.3: View Transitions 2.0 — link clicks swap the container’s content with the target page (fetched) or an inline <template data-route>, animated with the View Transitions API (Web Animations fallback); data-shared elements morph between routes; cross-document enables native MPA transitions.
|
|
6
|
+
|
|
7
|
+
- **Category:** transitions · **since** 10.3
|
|
8
|
+
- **Import:** `import { defineRouteTransition } from 'motionary/components/widgets'` then `defineRouteTransition();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `effect`, `engine`, `cross-document`
|
|
11
|
+
- **Events:** `usa:navigate`, `usa:navigated`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `navigate()`
|
|
14
|
+
- **Source:** [src/components/widgets/route-transition.ts](../../src/components/widgets/route-transition.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-route-transition id="app" effect="slide" cross-document>
|
|
20
|
+
<nav><a href="/">Home</a> <a href="/about">About</a></nav>
|
|
21
|
+
<h1 data-shared="title">Home</h1>
|
|
22
|
+
</usa-route-transition>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineRouteTransition } from 'motionary/components/widgets';
|
|
29
|
+
|
|
30
|
+
defineRouteTransition(); // registers <usa-route-transition>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-route-transition id="app" effect="slide" cross-document>
|
|
34
|
+
<nav><a href="/">Home</a> <a href="/about">About</a></nav>
|
|
35
|
+
<h1 data-shared="title">Home</h1>
|
|
36
|
+
</usa-route-transition>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-scene>` — Cinematic scene
|
|
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.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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 9.1
|
|
8
|
+
- **Import:** `import { defineScene } from 'motionary/components/widgets'` then `defineScene();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `camera`, `strength`, `autoplay`
|
|
11
|
+
- **Events:** `usa:shot`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `setProgress()`
|
|
14
|
+
- **Source:** [src/components/widgets/scene.ts](../../src/components/widgets/scene.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-scene camera="dolly-in">
|
|
20
|
+
<img src="harbor.jpg" alt="Harbor at dawn">
|
|
21
|
+
<p data-caption data-at="0.4">Dawn, 1912.</p>
|
|
22
|
+
</usa-scene>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineScene } from 'motionary/components/widgets';
|
|
29
|
+
|
|
30
|
+
defineScene(); // registers <usa-scene>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-scene camera="dolly-in">
|
|
34
|
+
<img src="harbor.jpg" alt="Harbor at dawn">
|
|
35
|
+
<p data-caption data-at="0.4">Dawn, 1912.</p>
|
|
36
|
+
</usa-scene>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-scramble>` — Scramble / decode
|
|
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
|
+
Decodes text out of random glyphs, left to right. Trigger on view, hover/focus or manually.
|
|
6
|
+
|
|
7
|
+
- **Category:** text
|
|
8
|
+
- **Import:** `import { defineScramble } from 'motionary/components/text'` then `defineScramble();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `text`
|
|
11
|
+
- **Events:** `usa:complete`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `play()`
|
|
14
|
+
- **Source:** [src/components/text/scramble.ts](../../src/components/text/scramble.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-scramble trigger="hover">ACCESS GRANTED</usa-scramble>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineScramble } from 'motionary/components/text';
|
|
26
|
+
|
|
27
|
+
defineScramble(); // registers <usa-scramble>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-scramble trigger="hover">ACCESS GRANTED</usa-scramble>
|
|
31
|
+
*/
|
|
32
|
+
```
|