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,40 @@
|
|
|
1
|
+
# `<usa-tabs>` — Tabs
|
|
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
|
+
Accessible tabs whose indicator slides between tabs with a spring; panels slide in from the direction you moved. Line or pill indicator.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui
|
|
8
|
+
- **Import:** `import { defineTabs } from 'motionary/components/ui'` then `defineTabs();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `indicator`
|
|
11
|
+
- **Events:** `usa:change`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `select()`
|
|
14
|
+
- **Source:** [src/components/ui/tabs.ts](../../src/components/ui/tabs.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-tabs>
|
|
20
|
+
<nav><button data-tab>One</button><button data-tab>Two</button></nav>
|
|
21
|
+
<section data-panel>…</section>
|
|
22
|
+
<section data-panel>…</section>
|
|
23
|
+
</usa-tabs>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## ES module
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import { defineTabs } from 'motionary/components/ui';
|
|
30
|
+
|
|
31
|
+
defineTabs(); // registers <usa-tabs>
|
|
32
|
+
|
|
33
|
+
/* then use it in your HTML:
|
|
34
|
+
<usa-tabs>
|
|
35
|
+
<nav><button data-tab>One</button><button data-tab>Two</button></nav>
|
|
36
|
+
<section data-panel>…</section>
|
|
37
|
+
<section data-panel>…</section>
|
|
38
|
+
</usa-tabs>
|
|
39
|
+
*/
|
|
40
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-terminal>` — Terminal window
|
|
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: 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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 8.2
|
|
8
|
+
- **Import:** `import { defineTerminal } from 'motionary/components/widgets'` then `defineTerminal();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `title`, `prompt`, `theme`, `speed`
|
|
11
|
+
- **Events:** `usa:done`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `replay()`, `skip()`
|
|
14
|
+
- **Source:** [src/components/widgets/terminal.ts](../../src/components/widgets/terminal.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-terminal title="zsh" theme="green">
|
|
20
|
+
<p data-cmd>npm i motionary</p>
|
|
21
|
+
<p>added 1 package in 2s</p>
|
|
22
|
+
</usa-terminal>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineTerminal } from 'motionary/components/widgets';
|
|
29
|
+
|
|
30
|
+
defineTerminal(); // registers <usa-terminal>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-terminal title="zsh" theme="green">
|
|
34
|
+
<p data-cmd>npm i motionary</p>
|
|
35
|
+
<p>added 1 package in 2s</p>
|
|
36
|
+
</usa-terminal>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-text-rotate>` — Rotating words
|
|
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
|
+
Cycles words in place — the box keeps the width of the longest word, so nothing around it reflows.
|
|
6
|
+
|
|
7
|
+
- **Category:** text
|
|
8
|
+
- **Import:** `import { defineTextRotate } from 'motionary/components/text'` then `defineTextRotate();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `words`, `interval`, `paused`
|
|
11
|
+
- **Events:** `usa:change`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `next()`
|
|
14
|
+
- **Source:** [src/components/text/text-rotate.ts](../../src/components/text/text-rotate.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
Build <usa-text-rotate words="fast|tiny|typed"></usa-text-rotate> apps
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineTextRotate } from 'motionary/components/text';
|
|
26
|
+
|
|
27
|
+
defineTextRotate(); // registers <usa-text-rotate>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
Build <usa-text-rotate words="fast|tiny|typed"></usa-text-rotate> apps
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# `<usa-text-splitter>` — Text splitter
|
|
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: splits its text into characters, words or lines and animates them in with a stagger (rise, fade, blur, flip, wave) when it scrolls into view — accessible, grapheme-aware. Requires motionary/runtime/text — npm i motionary, then use(text) before it mounts.
|
|
6
|
+
|
|
7
|
+
- **Category:** text · **since** 10.3
|
|
8
|
+
- **Import:** `import { defineTextSplitter } from 'motionary/components/widgets'` then `defineTextSplitter();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `split`, `effect`, `stagger`, `duration`, `loop`, `trigger`
|
|
11
|
+
- **Events:** `usa:split`, `usa:done`, `usa:runtime-missing`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `replay()`, `pieces()`
|
|
14
|
+
- **Source:** [src/components/widgets/text-splitter.ts](../../src/components/widgets/text-splitter.ts)
|
|
15
|
+
|
|
16
|
+
## Prerequisites — Requires: motionary/runtime/text
|
|
17
|
+
|
|
18
|
+
1. **Install:** `npm i motionary`
|
|
19
|
+
2. **Import order & registration:** Register the core first, then the module: use(text) also registers the core. CDN: load runtime.iife.js, then runtime/text.iife.js (it registers itself).
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import { use } from 'motionary/runtime';
|
|
23
|
+
import { text } from 'motionary/runtime/text';
|
|
24
|
+
import { defineTextSplitter } from 'motionary/components/widgets';
|
|
25
|
+
|
|
26
|
+
use(text);
|
|
27
|
+
defineTextSplitter(); // registers <usa-text-splitter> — after the prerequisites
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
3. **CDN:**
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
34
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/text.iife.js"></script>
|
|
35
|
+
<!-- then the component bundles -->
|
|
36
|
+
<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
|
|
37
|
+
<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Minimal example
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<usa-text-splitter split="chars" effect="rise" stagger="30">Motion, made simple.</usa-text-splitter>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## ES module
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
import { use } from 'motionary/runtime';
|
|
50
|
+
import { text } from 'motionary/runtime/text';
|
|
51
|
+
|
|
52
|
+
use(text);
|
|
53
|
+
import { defineTextSplitter } from 'motionary/components/widgets';
|
|
54
|
+
|
|
55
|
+
defineTextSplitter(); // registers <usa-text-splitter>
|
|
56
|
+
|
|
57
|
+
/* then use it in your HTML:
|
|
58
|
+
<usa-text-splitter split="chars" effect="rise" stagger="30">Motion, made simple.</usa-text-splitter>
|
|
59
|
+
*/
|
|
60
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-theme-surface>` — Theme surface
|
|
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.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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 8.6
|
|
8
|
+
- **Import:** `import { defineThemeSurface } from 'motionary/components/widgets'` then `defineThemeSurface();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `theme`
|
|
11
|
+
- **Events:** `usa:theme`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/theme-surface.ts](../../src/components/widgets/theme-surface.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-theme-surface theme="glass">
|
|
20
|
+
<h3>Frosted</h3><p>Content…</p>
|
|
21
|
+
</usa-theme-surface>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineThemeSurface } from 'motionary/components/widgets';
|
|
28
|
+
|
|
29
|
+
defineThemeSurface(); // registers <usa-theme-surface>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-theme-surface theme="glass">
|
|
33
|
+
<h3>Frosted</h3><p>Content…</p>
|
|
34
|
+
</usa-theme-surface>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-theme-switcher>` — Theme switcher
|
|
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.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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 8.6
|
|
8
|
+
- **Import:** `import { defineThemeSwitcher } from 'motionary/components/widgets'` then `defineThemeSwitcher();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `themes`, `target`, `label`
|
|
11
|
+
- **Events:** `usa:change`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/theme-switcher.ts](../../src/components/widgets/theme-switcher.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-theme-switcher themes="light,dark,neon,glass,neu" persist></usa-theme-switcher>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineThemeSwitcher } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
defineThemeSwitcher(); // registers <usa-theme-switcher>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-theme-switcher themes="light,dark,neon,glass,neu" persist></usa-theme-switcher>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-tilt>` — 3D tilt 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
|
+
Tilts toward the pointer in 3D with an optional glare; exposes --usa-tilt-x/y for parallax layers inside.
|
|
6
|
+
|
|
7
|
+
- **Category:** interaction
|
|
8
|
+
- **Import:** `import { defineTilt } from 'motionary/components/interaction'` then `defineTilt();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `max`, `scale`, `perspective`, `glare`, `reverse`, `disabled`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/interaction/tilt.ts](../../src/components/interaction/tilt.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-tilt glare max="12">
|
|
20
|
+
<div class="card">…</div>
|
|
21
|
+
</usa-tilt>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineTilt } from 'motionary/components/interaction';
|
|
28
|
+
|
|
29
|
+
defineTilt(); // registers <usa-tilt>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-tilt glare max="12">
|
|
33
|
+
<div class="card">…</div>
|
|
34
|
+
</usa-tilt>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# `<usa-timeline>` — Timeline
|
|
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
|
+
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.
|
|
6
|
+
|
|
7
|
+
- **Category:** timeline
|
|
8
|
+
- **Import:** `import { defineTimeline } from 'motionary/components/timeline'` then `defineTimeline();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `scrub`, `trigger`, `overlap`
|
|
11
|
+
- **Events:** `usa:complete`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `play()`, `reverse()`, `seek()`
|
|
14
|
+
- **Source:** [src/components/timeline/timeline-el.ts](../../src/components/timeline/timeline-el.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-timeline overlap="150">
|
|
20
|
+
<h2 data-tl="fade-up">Title</h2>
|
|
21
|
+
<p data-tl="blur">Subtitle</p>
|
|
22
|
+
<button data-tl="scale" data-at="<+=100">CTA</button>
|
|
23
|
+
</usa-timeline>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## ES module
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import { defineTimeline } from 'motionary/components/timeline';
|
|
30
|
+
|
|
31
|
+
defineTimeline(); // registers <usa-timeline>
|
|
32
|
+
|
|
33
|
+
/* then use it in your HTML:
|
|
34
|
+
<usa-timeline overlap="150">
|
|
35
|
+
<h2 data-tl="fade-up">Title</h2>
|
|
36
|
+
<p data-tl="blur">Subtitle</p>
|
|
37
|
+
<button data-tl="scale" data-at="<+=100">CTA</button>
|
|
38
|
+
</usa-timeline>
|
|
39
|
+
*/
|
|
40
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# `<usa-tip>` — Tooltip / popover 2.0
|
|
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.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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 6.6
|
|
8
|
+
- **Import:** `import { defineTip } from 'motionary/components/widgets'` then `defineTip();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `text`, `placement`, `trigger`
|
|
11
|
+
- **Events:** `usa:open`, `usa:close`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `show()`, `hide()`
|
|
14
|
+
- **Source:** [src/components/widgets/tip.ts](../../src/components/widgets/tip.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-tip text="Copied to clipboard" placement="top">
|
|
20
|
+
<button>Copy</button>
|
|
21
|
+
</usa-tip>
|
|
22
|
+
<usa-tip trigger="click" placement="bottom">
|
|
23
|
+
<button>Details</button>
|
|
24
|
+
<div slot="tip"><strong>Pro tip</strong> …</div>
|
|
25
|
+
</usa-tip>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## ES module
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
import { defineTip } from 'motionary/components/widgets';
|
|
32
|
+
|
|
33
|
+
defineTip(); // registers <usa-tip>
|
|
34
|
+
|
|
35
|
+
/* then use it in your HTML:
|
|
36
|
+
<usa-tip text="Copied to clipboard" placement="top">
|
|
37
|
+
<button>Copy</button>
|
|
38
|
+
</usa-tip>
|
|
39
|
+
<usa-tip trigger="click" placement="bottom">
|
|
40
|
+
<button>Details</button>
|
|
41
|
+
<div slot="tip"><strong>Pro tip</strong> …</div>
|
|
42
|
+
</usa-tip>
|
|
43
|
+
*/
|
|
44
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-toast-stack>` — Toast stack
|
|
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.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.
|
|
6
|
+
|
|
7
|
+
- **Category:** feedback · **since** 6.3
|
|
8
|
+
- **Import:** `import { defineToastStack } from 'motionary/components/widgets'` then `defineToastStack();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `position`
|
|
11
|
+
- **Events:** `usa:show`, `usa:dismiss`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `show()`, `dismiss()`, `clear()`
|
|
14
|
+
- **Source:** [src/components/widgets/toast.ts](../../src/components/widgets/toast.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<button data-usa-toast="Saved to your library" data-usa-toast-type="success">Save</button>
|
|
20
|
+
<usa-toast-stack position="bottom-right" duration="4000" max="3"></usa-toast-stack>
|
|
21
|
+
<!-- or from JS: stackToast({ title: 'Done', message: 'Saved', type: 'success' }) -->
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineToastStack } from 'motionary/components/widgets';
|
|
28
|
+
|
|
29
|
+
defineToastStack(); // registers <usa-toast-stack>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<button data-usa-toast="Saved to your library" data-usa-toast-type="success">Save</button>
|
|
33
|
+
<usa-toast-stack position="bottom-right" duration="4000" max="3"></usa-toast-stack>
|
|
34
|
+
<!-- or from JS: stackToast({ title: 'Done', message: 'Saved', type: 'success' }) -->
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-toaster>` — Toasts
|
|
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
|
+
toast("Saved") slides a notification in; it pauses on hover, stacks with FLIP and announces politely (errors assertively).
|
|
6
|
+
|
|
7
|
+
- **Category:** feedback
|
|
8
|
+
- **Import:** `import { defineToaster } from 'motionary/components/feedback'` then `defineToaster();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `label`
|
|
11
|
+
- **Events:** `usa:toast`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `show()`, `clear()`
|
|
14
|
+
- **Source:** [src/components/feedback/toast.ts](../../src/components/feedback/toast.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-toaster position="bottom-right"></usa-toaster>
|
|
20
|
+
<script type="module">
|
|
21
|
+
import { toast } from 'motionary/components/feedback';
|
|
22
|
+
toast('Saved', { type: 'success' });
|
|
23
|
+
</script>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## ES module
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import { defineToaster } from 'motionary/components/feedback';
|
|
30
|
+
|
|
31
|
+
defineToaster(); // registers <usa-toaster>
|
|
32
|
+
|
|
33
|
+
/* then use it in your HTML:
|
|
34
|
+
<usa-toaster position="bottom-right"></usa-toaster>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-typewriter>` — Typewriter
|
|
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
|
+
Types text, or cycles through phrases with delete and pause. Full text stays available to screen readers.
|
|
6
|
+
|
|
7
|
+
- **Category:** text
|
|
8
|
+
- **Import:** `import { defineTypewriter } from 'motionary/components/text'` then `defineTypewriter();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `text`, `words`
|
|
11
|
+
- **Events:** `usa:complete`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `start()`, `stop()`, `restart()`
|
|
14
|
+
- **Source:** [src/components/text/typewriter.ts](../../src/components/text/typewriter.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-typewriter words="Hello, Windows.|Hello, web." loop></usa-typewriter>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineTypewriter } from 'motionary/components/text';
|
|
26
|
+
|
|
27
|
+
defineTypewriter(); // registers <usa-typewriter>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-typewriter words="Hello, Windows.|Hello, web." loop></usa-typewriter>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# `<usa-upload-progress>` — Upload progress
|
|
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.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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 7.7
|
|
8
|
+
- **Import:** `import { defineUploadProgress } from 'motionary/components/widgets'` then `defineUploadProgress();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `name`, `size`, `value`, `status`, `message`
|
|
11
|
+
- **Events:** `usa:retry`, `usa:done`, `usa:error`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/upload-progress.ts](../../src/components/widgets/upload-progress.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-upload-progress name="report.pdf" size="2400000" value="40"></usa-upload-progress>
|
|
20
|
+
<script>row.value = 75; row.status = 'error';</script>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ES module
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { defineUploadProgress } from 'motionary/components/widgets';
|
|
27
|
+
|
|
28
|
+
defineUploadProgress(); // registers <usa-upload-progress>
|
|
29
|
+
|
|
30
|
+
/* then use it in your HTML:
|
|
31
|
+
<usa-upload-progress name="report.pdf" size="2400000" value="40"></usa-upload-progress>
|
|
32
|
+
*/
|
|
33
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# `<usa-video-card>` — Video 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
|
+
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).
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 9.4
|
|
8
|
+
- **Import:** `import { defineVideoCard } from 'motionary/components/widgets'` then `defineVideoCard();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `label`, `duration`
|
|
11
|
+
- **Events:** `usa:open`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/video-card.ts](../../src/components/widgets/video-card.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-video-card duration="2:41">
|
|
20
|
+
<img src="poster.jpg" alt="">
|
|
21
|
+
<video src="preview.mp4" muted playsinline></video>
|
|
22
|
+
<h3>Making of Motionary</h3>
|
|
23
|
+
</usa-video-card>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## ES module
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import { defineVideoCard } from 'motionary/components/widgets';
|
|
30
|
+
|
|
31
|
+
defineVideoCard(); // registers <usa-video-card>
|
|
32
|
+
|
|
33
|
+
/* then use it in your HTML:
|
|
34
|
+
<usa-video-card duration="2:41">
|
|
35
|
+
<img src="poster.jpg" alt="">
|
|
36
|
+
<video src="preview.mp4" muted playsinline></video>
|
|
37
|
+
<h3>Making of Motionary</h3>
|
|
38
|
+
</usa-video-card>
|
|
39
|
+
*/
|
|
40
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-view-switch>` — View 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
|
+
One view at a time with direction-aware slide, fade, scale or drill transitions — tabs, wizards, app pages.
|
|
6
|
+
|
|
7
|
+
- **Category:** transitions
|
|
8
|
+
- **Import:** `import { defineViewSwitch } from 'motionary/components/transitions'` then `defineViewSwitch();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `active`
|
|
11
|
+
- **Events:** `usa:change`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `show()`
|
|
14
|
+
- **Source:** [src/components/transitions/view-switch.ts](../../src/components/transitions/view-switch.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-view-switch active="home">
|
|
20
|
+
<section data-view="home">…</section>
|
|
21
|
+
<section data-view="about">…</section>
|
|
22
|
+
</usa-view-switch>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineViewSwitch } from 'motionary/components/transitions';
|
|
29
|
+
|
|
30
|
+
defineViewSwitch(); // registers <usa-view-switch>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-view-switch active="home">
|
|
34
|
+
<section data-view="home">…</section>
|
|
35
|
+
<section data-view="about">…</section>
|
|
36
|
+
</usa-view-switch>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# `<usa-voice-button>` — Voice 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
|
+
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.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 7.8
|
|
8
|
+
- **Import:** `import { defineVoiceButton } from 'motionary/components/widgets'` then `defineVoiceButton();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `label`, `bars`, `listening`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `toggle()`
|
|
14
|
+
- **Source:** [src/components/widgets/voice-button.ts](../../src/components/widgets/voice-button.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-voice-button label="Talk to the assistant"></usa-voice-button>
|
|
20
|
+
<script>vb.addEventListener('usa:start', start); analyser.onlevel = (l) => (vb.level = l);</script>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ES module
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { defineVoiceButton } from 'motionary/components/widgets';
|
|
27
|
+
|
|
28
|
+
defineVoiceButton(); // registers <usa-voice-button>
|
|
29
|
+
|
|
30
|
+
/* then use it in your HTML:
|
|
31
|
+
<usa-voice-button label="Talk to the assistant"></usa-voice-button>
|
|
32
|
+
*/
|
|
33
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-volume-knob>` — Volume knob
|
|
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.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".
|
|
6
|
+
|
|
7
|
+
- **Category:** interaction · **since** 7.1
|
|
8
|
+
- **Import:** `import { defineVolumeKnob } from 'motionary/components/widgets'` then `defineVolumeKnob();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `min`, `max`
|
|
11
|
+
- **Events:** `usa:change`, `usa:input`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/volume-knob.ts](../../src/components/widgets/volume-knob.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-volume-knob value="60" label="Volume"></usa-volume-knob>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineVolumeKnob } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
defineVolumeKnob(); // registers <usa-volume-knob>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-volume-knob value="60" label="Volume"></usa-volume-knob>
|
|
31
|
+
*/
|
|
32
|
+
```
|