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
package/docs/ROADMAP.md
CHANGED
|
@@ -47,12 +47,12 @@ Store 卡片显示 **「Requires: motionary/runtime/<module>」** 徽章(官
|
|
|
47
47
|
- 主线 B:**runtime 核心** —— 共享 ticker / RAF 调度器、tween + timeline 引擎与缓动、`use()` / `requireModule()` 注册 API 与清晰错误、「Requires: motionary/runtime/…」徽章、前置条件模板、`check:peer-docs`(检查 runtime 模块文档与 5 处前置条件)、清单列出 runtime 模块。
|
|
48
48
|
- 格式:CSS `@keyframes` + WAAPI 关键帧(`motionary/runtime/format-css`)、Motion / Framer 关键帧 JSON(`motionary/runtime/format-motion`)。
|
|
49
49
|
- 新组件:插件详情卡 `<usa-plugin-card>`(Requires: motionary/runtime)、安装按钮 `<usa-install-button>`。
|
|
50
|
-
- **v10.2** — 核心 DSL 化:`motionary/core` 直接支持 `data-motion` 声明式语法。
|
|
50
|
+
- ✅ **v10.2** — 核心 DSL 化:`motionary/core` 直接支持 `data-motion` 声明式语法。
|
|
51
51
|
- 主线 A:逐组件 Markdown 文档(`/docs/components/<tag>.md`,由清单生成);仓库根目录新增 `AGENTS.md` 与提示指南。
|
|
52
52
|
- 主线 B:**scroll 模块**(`motionary/runtime/scroll`)—— pin、scrub、markers、start / end 规则(自研,功能对标 ScrollTrigger,但不复制其代码或 API)。
|
|
53
53
|
- 格式:SVG SMIL 回放、路径变形、CSS 动画 SVG(`motionary/runtime/format-svg`)。
|
|
54
54
|
- 新组件:动效检查器面板、`<usa-scroll-scene>`(Requires: motionary/runtime/scroll)。
|
|
55
|
-
- **v10.3** — View Transitions 2.0:跨文档页面转场、共享元素动画。
|
|
55
|
+
- ✅ **v10.3** — View Transitions 2.0:跨文档页面转场、共享元素动画。
|
|
56
56
|
- 主线 B:**text 模块** —— 逐字 / 逐词 / 逐行拆分(保留可访问文本)。
|
|
57
57
|
- 格式:精灵图(TexturePacker / Aseprite JSON)、图片序列(`motionary/runtime/format-sprite`)。
|
|
58
58
|
- 新组件:路由转场容器、`<usa-text-splitter>`(`<usa-split-text>` 已被 4.x 文本组件占用)。
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Prompt guide: getting good Motionary code from an AI assistant
|
|
2
|
+
|
|
3
|
+
Motionary publishes machine-readable docs so assistants can stop guessing. These prompts and checks get reliable results.
|
|
4
|
+
|
|
5
|
+
## 1. Give the model the manifest
|
|
6
|
+
|
|
7
|
+
> Use Motionary. Before writing code, read https://harrisoncn.github.io/Motionary/llms.txt (and llms-full.txt for details). Only use tags, attributes and events listed there.
|
|
8
|
+
|
|
9
|
+
With an MCP-capable client (from 10.4) connect `npx motionary-mcp` instead; it answers `search_components` / `get_component` / `scaffold_snippet` from the same manifest.
|
|
10
|
+
|
|
11
|
+
## 2. Ask for a component by intent, then let the model pick
|
|
12
|
+
|
|
13
|
+
Good: *"A pricing section where the cards slide in as you scroll and the middle one is pinned while the others pass."*
|
|
14
|
+
The model should search the manifest (`scroll`, `pin`, `reveal`) and pick, e.g., `<usa-scroll-scene pin>` + `<usa-reveal>`.
|
|
15
|
+
|
|
16
|
+
Less good: *"Use usa-pin-cards"* — a tag that does not exist. Ask the model to confirm every tag against the manifest.
|
|
17
|
+
|
|
18
|
+
## 3. Ask for the minimal example first
|
|
19
|
+
|
|
20
|
+
> Start from the component's `example` in the manifest, then change only what I asked for.
|
|
21
|
+
|
|
22
|
+
Manifest examples are tested in the gallery, so starting from them avoids broken markup.
|
|
23
|
+
|
|
24
|
+
## 4. Prerequisites — the most common mistake
|
|
25
|
+
|
|
26
|
+
If a component's manifest entry has `requires`, the generated code **must** include, in this order:
|
|
27
|
+
|
|
28
|
+
1. the install command (`npm i motionary`, or the official runtime it names, e.g. `npm i @rive-app/canvas`);
|
|
29
|
+
2. the runtime import and `use(...)` registration (or the CDN `<script>` tags: `runtime.iife.js` first, then the module);
|
|
30
|
+
3. the component's define function;
|
|
31
|
+
4. the markup.
|
|
32
|
+
|
|
33
|
+
Checklist to paste into a review prompt:
|
|
34
|
+
|
|
35
|
+
- [ ] every `<usa-*>` tag exists in `components.json`;
|
|
36
|
+
- [ ] every attribute is listed in that component's `attributes`;
|
|
37
|
+
- [ ] events are `usa:*` names from `events`;
|
|
38
|
+
- [ ] `requires` prerequisites are installed, imported and registered before the define call;
|
|
39
|
+
- [ ] no third-party animation library was added unless the manifest asks for it;
|
|
40
|
+
- [ ] nothing disables reduced-motion handling.
|
|
41
|
+
|
|
42
|
+
## 5. Common misuses
|
|
43
|
+
|
|
44
|
+
| Mistake | Fix |
|
|
45
|
+
|---|---|
|
|
46
|
+
| Importing from `use-scroll-animate` in new code | import from `motionary` (same build) |
|
|
47
|
+
| Calling `defineX()` during SSR and expecting output | define on the client; SSR renders the light-DOM content |
|
|
48
|
+
| Forgetting `use(module)` for runtime-powered components | follow the component's Prerequisites (the visible error tells you the exact line) |
|
|
49
|
+
| Using `<usa-carousel>` APIs from other libraries (Swiper, Embla) | use only the documented attributes of the Motionary element |
|
|
50
|
+
| Animating with inline `transition` on the same properties a component animates | let the component own its motion |
|
|
51
|
+
|
|
52
|
+
## 6. Validation
|
|
53
|
+
|
|
54
|
+
From 10.7, `motionary-mcp`'s `validate_snippet` checks tags, attributes and prerequisites automatically.
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# Motionary components (195)
|
|
2
|
+
|
|
3
|
+
One page per `<usa-*>` element, generated from the source. Machine-readable: `motionary/manifest.json` · Pages `/components.json` · `/llms.txt` · `/llms-full.txt`. How to use these with an AI assistant: [AGENTS.md](../../AGENTS.md) and [the prompt guide](../ai-prompt-guide.md).
|
|
4
|
+
|
|
5
|
+
## transitions
|
|
6
|
+
|
|
7
|
+
- [`<usa-accordion>`](usa-accordion.md) — Accordion
|
|
8
|
+
- [`<usa-dialog>`](usa-dialog.md) — Modal & drawer
|
|
9
|
+
- [`<usa-disclosure>`](usa-disclosure.md) — Accordion 2.0
|
|
10
|
+
- [`<usa-modal>`](usa-modal.md) — Modal dialog
|
|
11
|
+
- [`<usa-route-transition>`](usa-route-transition.md) — Route transition container
|
|
12
|
+
- [`<usa-sheet>`](usa-sheet.md) — Drawer / bottom sheet
|
|
13
|
+
- [`<usa-view-switch>`](usa-view-switch.md) — View switch
|
|
14
|
+
|
|
15
|
+
## background
|
|
16
|
+
|
|
17
|
+
- [`<usa-acrylic>`](usa-acrylic.md) — Acrylic & Mica
|
|
18
|
+
- [`<usa-aurora>`](usa-aurora.md) — Aurora
|
|
19
|
+
- [`<usa-blobs>`](usa-blobs.md) — Fluid blobs
|
|
20
|
+
- [`<usa-dot-network>`](usa-dot-network.md) — Dot network
|
|
21
|
+
- [`<usa-grain>`](usa-grain.md) — Film grain
|
|
22
|
+
- [`<usa-grid-glow>`](usa-grid-glow.md) — Grid glow
|
|
23
|
+
- [`<usa-marquee>`](usa-marquee.md) — Marquee
|
|
24
|
+
- [`<usa-particles>`](usa-particles.md) — Particles
|
|
25
|
+
- [`<usa-water-ripple>`](usa-water-ripple.md) — Water ripple
|
|
26
|
+
|
|
27
|
+
## ui
|
|
28
|
+
|
|
29
|
+
- [`<usa-add-to-cart>`](usa-add-to-cart.md) — Add to cart (fly-to-cart)
|
|
30
|
+
- [`<usa-avatar-stack>`](usa-avatar-stack.md) — Avatar stack
|
|
31
|
+
- [`<usa-badge>`](usa-badge.md) — Badge
|
|
32
|
+
- [`<usa-badge-wall>`](usa-badge-wall.md) — Badge wall
|
|
33
|
+
- [`<usa-bar-chart>`](usa-bar-chart.md) — Animated bar chart
|
|
34
|
+
- [`<usa-bg-generator>`](usa-bg-generator.md) — Background generator
|
|
35
|
+
- [`<usa-bottom-sheet>`](usa-bottom-sheet.md) — Bottom sheet
|
|
36
|
+
- [`<usa-carousel>`](usa-carousel.md) — Carousel / slider
|
|
37
|
+
- [`<usa-cart-drawer>`](usa-cart-drawer.md) — Cart drawer
|
|
38
|
+
- [`<usa-chapter-nav>`](usa-chapter-nav.md) — Chapter nav
|
|
39
|
+
- [`<usa-chat-composer>`](usa-chat-composer.md) — AI chat composer
|
|
40
|
+
- [`<usa-clock-control>`](usa-clock-control.md) — Motion clock control
|
|
41
|
+
- [`<usa-code-export>`](usa-code-export.md) — Code export
|
|
42
|
+
- [`<usa-color-picker>`](usa-color-picker.md) — Color picker
|
|
43
|
+
- [`<usa-command-palette>`](usa-command-palette.md) — Command palette (⌘K)
|
|
44
|
+
- [`<usa-countdown>`](usa-countdown.md) — Flip countdown
|
|
45
|
+
- [`<usa-date-picker>`](usa-date-picker.md) — Date picker
|
|
46
|
+
- [`<usa-dock>`](usa-dock.md) — macOS-style dock
|
|
47
|
+
- [`<usa-drawer>`](usa-drawer.md) — Drawer
|
|
48
|
+
- [`<usa-fab>`](usa-fab.md) — FAB speed dial
|
|
49
|
+
- [`<usa-festival-banner>`](usa-festival-banner.md) — Festival banner
|
|
50
|
+
- [`<usa-field>`](usa-field.md) — Animated field
|
|
51
|
+
- [`<usa-gauge>`](usa-gauge.md) — Spring gauge
|
|
52
|
+
- [`<usa-gen-art>`](usa-gen-art.md) — Generative artwork
|
|
53
|
+
- [`<usa-gesture-sticker>`](usa-gesture-sticker.md) — Multi-touch sticker
|
|
54
|
+
- [`<usa-globe>`](usa-globe.md) — Spinning globe
|
|
55
|
+
- [`<usa-gyro-card>`](usa-gyro-card.md) — Gyro 3D card
|
|
56
|
+
- [`<usa-hero-video>`](usa-hero-video.md) — Hero video
|
|
57
|
+
- [`<usa-hud-panel>`](usa-hud-panel.md) — HUD panel
|
|
58
|
+
- [`<usa-hydrate>`](usa-hydrate.md) — SSR hydration animation
|
|
59
|
+
- [`<usa-install-button>`](usa-install-button.md) — Install button
|
|
60
|
+
- [`<usa-kpi>`](usa-kpi.md) — KPI card
|
|
61
|
+
- [`<usa-leaderboard>`](usa-leaderboard.md) — Leaderboard
|
|
62
|
+
- [`<usa-liquid-nav>`](usa-liquid-nav.md) — Liquid nav
|
|
63
|
+
- [`<usa-location-card>`](usa-location-card.md) — Location card
|
|
64
|
+
- [`<usa-lottie>`](usa-lottie.md) — Lottie player
|
|
65
|
+
- [`<usa-lottie-icon>`](usa-lottie-icon.md) — Animated icon set
|
|
66
|
+
- [`<usa-menu>`](usa-menu.md) — Dropdown menu
|
|
67
|
+
- [`<usa-message-list>`](usa-message-list.md) — Chat thread
|
|
68
|
+
- [`<usa-motion>`](usa-motion.md) — Motion DSL
|
|
69
|
+
- [`<usa-motion-inspector>`](usa-motion-inspector.md) — Motion inspector
|
|
70
|
+
- [`<usa-motion-prefs>`](usa-motion-prefs.md) — Motion preference panel
|
|
71
|
+
- [`<usa-motion-spec>`](usa-motion-spec.md) — Motion spec sheet
|
|
72
|
+
- [`<usa-music-player>`](usa-music-player.md) — Music player
|
|
73
|
+
- [`<usa-native-preview>`](usa-native-preview.md) — Native preview
|
|
74
|
+
- [`<usa-nav-morph>`](usa-nav-morph.md) — Navbar with morphing indicator
|
|
75
|
+
- [`<usa-navbar>`](usa-navbar.md) — Auto-hide navbar
|
|
76
|
+
- [`<usa-notification-bell>`](usa-notification-bell.md) — Notification bell
|
|
77
|
+
- [`<usa-organic-card>`](usa-organic-card.md) — Organic card
|
|
78
|
+
- [`<usa-otp>`](usa-otp.md) — OTP code input
|
|
79
|
+
- [`<usa-pagination>`](usa-pagination.md) — Pagination with sliding ink
|
|
80
|
+
- [`<usa-panorama>`](usa-panorama.md) — 360° panorama viewer
|
|
81
|
+
- [`<usa-pause-all>`](usa-pause-all.md) — Pause all motion
|
|
82
|
+
- [`<usa-perf-monitor>`](usa-perf-monitor.md) — Perf monitor
|
|
83
|
+
- [`<usa-plugin-card>`](usa-plugin-card.md) — Plugin detail card · Requires: motionary/runtime
|
|
84
|
+
- [`<usa-plugin-store>`](usa-plugin-store.md) — Plugin marketplace
|
|
85
|
+
- [`<usa-popover>`](usa-popover.md) — Popover
|
|
86
|
+
- [`<usa-presence>`](usa-presence.md) — Presence avatar
|
|
87
|
+
- [`<usa-prize-wheel>`](usa-prize-wheel.md) — Prize wheel
|
|
88
|
+
- [`<usa-product-gallery>`](usa-product-gallery.md) — Product gallery
|
|
89
|
+
- [`<usa-prop-panel>`](usa-prop-panel.md) — Property panel
|
|
90
|
+
- [`<usa-pull-refresh>`](usa-pull-refresh.md) — Pull to refresh
|
|
91
|
+
- [`<usa-radar>`](usa-radar.md) — Radar scope
|
|
92
|
+
- [`<usa-reactions>`](usa-reactions.md) — Emoji reactions
|
|
93
|
+
- [`<usa-red-envelope>`](usa-red-envelope.md) — Red envelope (红包)
|
|
94
|
+
- [`<usa-retro-button>`](usa-retro-button.md) — Retro buttons
|
|
95
|
+
- [`<usa-scene>`](usa-scene.md) — Cinematic scene
|
|
96
|
+
- [`<usa-segmented>`](usa-segmented.md) — Segmented control
|
|
97
|
+
- [`<usa-shortcut>`](usa-shortcut.md) — Shortcut hint
|
|
98
|
+
- [`<usa-sketch-chart>`](usa-sketch-chart.md) — Sketch chart
|
|
99
|
+
- [`<usa-slider>`](usa-slider.md) — Slider
|
|
100
|
+
- [`<usa-sparkline>`](usa-sparkline.md) — Sparkline
|
|
101
|
+
- [`<usa-spatial-card>`](usa-spatial-card.md) — Spatial card
|
|
102
|
+
- [`<usa-stepper>`](usa-stepper.md) — Stepper / wizard
|
|
103
|
+
- [`<usa-sticky-wall>`](usa-sticky-wall.md) — Sticky-note wall
|
|
104
|
+
- [`<usa-stories>`](usa-stories.md) — Stories viewer
|
|
105
|
+
- [`<usa-suggestion-chips>`](usa-suggestion-chips.md) — Suggestion chips
|
|
106
|
+
- [`<usa-tab-bar>`](usa-tab-bar.md) — Tabs with animated indicator
|
|
107
|
+
- [`<usa-tabs>`](usa-tabs.md) — Tabs
|
|
108
|
+
- [`<usa-terminal>`](usa-terminal.md) — Terminal window
|
|
109
|
+
- [`<usa-theme-surface>`](usa-theme-surface.md) — Theme surface
|
|
110
|
+
- [`<usa-theme-switcher>`](usa-theme-switcher.md) — Theme switcher
|
|
111
|
+
- [`<usa-tip>`](usa-tip.md) — Tooltip / popover 2.0
|
|
112
|
+
- [`<usa-upload-progress>`](usa-upload-progress.md) — Upload progress
|
|
113
|
+
- [`<usa-video-card>`](usa-video-card.md) — Video card
|
|
114
|
+
- [`<usa-voice-button>`](usa-voice-button.md) — Voice button
|
|
115
|
+
- [`<usa-worker-canvas>`](usa-worker-canvas.md) — Worker canvas
|
|
116
|
+
- [`<usa-xp-bar>`](usa-xp-bar.md) — XP bar
|
|
117
|
+
|
|
118
|
+
## page
|
|
119
|
+
|
|
120
|
+
- [`<usa-ambient>`](usa-ambient.md) — Ambient layer
|
|
121
|
+
- [`<usa-auto-skeleton>`](usa-auto-skeleton.md) — Auto skeleton
|
|
122
|
+
- [`<usa-back-to-top>`](usa-back-to-top.md) — Back to top
|
|
123
|
+
- [`<usa-cursor>`](usa-cursor.md) — Custom cursor
|
|
124
|
+
- [`<usa-fullpage>`](usa-fullpage.md) — Full-page sections
|
|
125
|
+
- [`<usa-loading-bar>`](usa-loading-bar.md) — Top loading bar
|
|
126
|
+
- [`<usa-motion-switch>`](usa-motion-switch.md) — Motion intensity
|
|
127
|
+
- [`<usa-splash>`](usa-splash.md) — Splash screen
|
|
128
|
+
|
|
129
|
+
## svg
|
|
130
|
+
|
|
131
|
+
- [`<usa-anim-icon>`](usa-anim-icon.md) — Animated icons
|
|
132
|
+
- [`<usa-draw>`](usa-draw.md) — Line drawing
|
|
133
|
+
- [`<usa-mask-reveal>`](usa-mask-reveal.md) — Mask reveal
|
|
134
|
+
- [`<usa-morph>`](usa-morph.md) — Path morph
|
|
135
|
+
|
|
136
|
+
## fx
|
|
137
|
+
|
|
138
|
+
- [`<usa-audio>`](usa-audio.md) — Beat-triggered effects
|
|
139
|
+
- [`<usa-fx>`](usa-fx.md) — Attention seekers
|
|
140
|
+
- [`<usa-gesture-fx>`](usa-gesture-fx.md) — Gesture triggers
|
|
141
|
+
- [`<usa-motion-theme>`](usa-motion-theme.md) — Theme packs
|
|
142
|
+
- [`<usa-player>`](usa-player.md) — JSON animation player
|
|
143
|
+
- [`<usa-story>`](usa-story.md) — Story: before / after
|
|
144
|
+
|
|
145
|
+
## layout
|
|
146
|
+
|
|
147
|
+
- [`<usa-auto-animate>`](usa-auto-animate.md) — Auto-animate
|
|
148
|
+
- [`<usa-kanban>`](usa-kanban.md) — Kanban board (drag-sort)
|
|
149
|
+
- [`<usa-masonry>`](usa-masonry.md) — Masonry
|
|
150
|
+
- [`<usa-masonry-flow>`](usa-masonry-flow.md) — Masonry with layout animation
|
|
151
|
+
|
|
152
|
+
## click
|
|
153
|
+
|
|
154
|
+
- [`<usa-button>`](usa-button.md) — Button deformation
|
|
155
|
+
- [`<usa-checkbox>`](usa-checkbox.md) — Animated checkbox
|
|
156
|
+
- [`<usa-click>`](usa-click.md) — Click effects
|
|
157
|
+
- [`<usa-double-tap>`](usa-double-tap.md) — Double tap
|
|
158
|
+
- [`<usa-hold>`](usa-hold.md) — Hold to confirm
|
|
159
|
+
- [`<usa-icon-morph>`](usa-icon-morph.md) — Icon morph
|
|
160
|
+
- [`<usa-like>`](usa-like.md) — Like button
|
|
161
|
+
- [`<usa-menu-toggle>`](usa-menu-toggle.md) — Hamburger → close
|
|
162
|
+
- [`<usa-pull-cord>`](usa-pull-cord.md) — Lamp pull-cord switch
|
|
163
|
+
- [`<usa-star-rating>`](usa-star-rating.md) — Star rating 2.0
|
|
164
|
+
- [`<usa-switch>`](usa-switch.md) — Toggle switch variants
|
|
165
|
+
|
|
166
|
+
## cards
|
|
167
|
+
|
|
168
|
+
- [`<usa-card>`](usa-card.md) — Card
|
|
169
|
+
- [`<usa-card-stack>`](usa-card-stack.md) — Swipe stack
|
|
170
|
+
- [`<usa-carousel-3d>`](usa-carousel-3d.md) — 3D carousel
|
|
171
|
+
- [`<usa-cube-gallery>`](usa-cube-gallery.md) — Cube gallery
|
|
172
|
+
- [`<usa-sticky-stack>`](usa-sticky-stack.md) — Sticky stack
|
|
173
|
+
|
|
174
|
+
## feedback
|
|
175
|
+
|
|
176
|
+
- [`<usa-check>`](usa-check.md) — Result icon
|
|
177
|
+
- [`<usa-file-drop>`](usa-file-drop.md) — File drop zone
|
|
178
|
+
- [`<usa-progress>`](usa-progress.md) — Progress bar
|
|
179
|
+
- [`<usa-progress-ring>`](usa-progress-ring.md) — Progress ring / bar / gauge
|
|
180
|
+
- [`<usa-skeleton>`](usa-skeleton.md) — Skeleton
|
|
181
|
+
- [`<usa-skeleton-reveal>`](usa-skeleton-reveal.md) — Skeleton → content reveal
|
|
182
|
+
- [`<usa-spinner>`](usa-spinner.md) — Spinners
|
|
183
|
+
- [`<usa-toast-stack>`](usa-toast-stack.md) — Toast stack
|
|
184
|
+
- [`<usa-toaster>`](usa-toaster.md) — Toasts
|
|
185
|
+
- [`<usa-weather-card>`](usa-weather-card.md) — Animated weather card
|
|
186
|
+
|
|
187
|
+
## interaction
|
|
188
|
+
|
|
189
|
+
- [`<usa-compare>`](usa-compare.md) — Before / after compare
|
|
190
|
+
- [`<usa-equalizer>`](usa-equalizer.md) — Graphic equalizer
|
|
191
|
+
- [`<usa-magnetic>`](usa-magnetic.md) — Magnetic button
|
|
192
|
+
- [`<usa-press>`](usa-press.md) — Press feedback
|
|
193
|
+
- [`<usa-ripple>`](usa-ripple.md) — Ripple
|
|
194
|
+
- [`<usa-spotlight>`](usa-spotlight.md) — Reveal highlight
|
|
195
|
+
- [`<usa-tilt>`](usa-tilt.md) — 3D tilt card
|
|
196
|
+
- [`<usa-volume-knob>`](usa-volume-knob.md) — Volume knob
|
|
197
|
+
|
|
198
|
+
## text
|
|
199
|
+
|
|
200
|
+
- [`<usa-counter>`](usa-counter.md) — Number counter
|
|
201
|
+
- [`<usa-glitch>`](usa-glitch.md) — Glitch text
|
|
202
|
+
- [`<usa-gradient-text>`](usa-gradient-text.md) — Gradient flow
|
|
203
|
+
- [`<usa-handwriting>`](usa-handwriting.md) — Handwriting draw
|
|
204
|
+
- [`<usa-lyrics>`](usa-lyrics.md) — Synced karaoke lyrics
|
|
205
|
+
- [`<usa-odometer>`](usa-odometer.md) — Odometer counter
|
|
206
|
+
- [`<usa-scramble>`](usa-scramble.md) — Scramble / decode
|
|
207
|
+
- [`<usa-scroll-highlight>`](usa-scroll-highlight.md) — Scroll highlight
|
|
208
|
+
- [`<usa-shimmer-text>`](usa-shimmer-text.md) — Shimmer text
|
|
209
|
+
- [`<usa-split-text>`](usa-split-text.md) — Split-text reveal
|
|
210
|
+
- [`<usa-text-rotate>`](usa-text-rotate.md) — Rotating words
|
|
211
|
+
- [`<usa-text-splitter>`](usa-text-splitter.md) — Text splitter · Requires: motionary/runtime/text
|
|
212
|
+
- [`<usa-typewriter>`](usa-typewriter.md) — Typewriter
|
|
213
|
+
- [`<usa-wave-text>`](usa-wave-text.md) — Wave text
|
|
214
|
+
|
|
215
|
+
## depth
|
|
216
|
+
|
|
217
|
+
- [`<usa-cube>`](usa-cube.md) — 3D cube
|
|
218
|
+
- [`<usa-depth>`](usa-depth.md) — Depth parallax
|
|
219
|
+
|
|
220
|
+
## webgl
|
|
221
|
+
|
|
222
|
+
- [`<usa-distort>`](usa-distort.md) — Hover distortion
|
|
223
|
+
- [`<usa-liquid>`](usa-liquid.md) — Liquid image
|
|
224
|
+
- [`<usa-post-fx>`](usa-post-fx.md) — Post-processing
|
|
225
|
+
- [`<usa-shader>`](usa-shader.md) — Shader background
|
|
226
|
+
|
|
227
|
+
## physics
|
|
228
|
+
|
|
229
|
+
- [`<usa-draggable>`](usa-draggable.md) — Draggable
|
|
230
|
+
- [`<usa-overscroll>`](usa-overscroll.md) — Elastic overscroll
|
|
231
|
+
- [`<usa-spring>`](usa-spring.md) — Spring effects
|
|
232
|
+
|
|
233
|
+
## timeline
|
|
234
|
+
|
|
235
|
+
- [`<usa-keyframe-editor>`](usa-keyframe-editor.md) — Animation editor 2.0
|
|
236
|
+
- [`<usa-milestones>`](usa-milestones.md) — Scroll-drawn milestones
|
|
237
|
+
- [`<usa-timeline>`](usa-timeline.md) — Timeline
|
|
238
|
+
|
|
239
|
+
## packs
|
|
240
|
+
|
|
241
|
+
- [`<usa-pack>`](usa-pack.md) — E-commerce pack
|
|
242
|
+
|
|
243
|
+
## gesture
|
|
244
|
+
|
|
245
|
+
- [`<usa-pinch-zoom>`](usa-pinch-zoom.md) — Pinch zoom
|
|
246
|
+
- [`<usa-swipe-deck>`](usa-swipe-deck.md) — Swipe cards deck
|
|
247
|
+
- [`<usa-swipeable>`](usa-swipeable.md) — Swipeable
|
|
248
|
+
|
|
249
|
+
## reveal
|
|
250
|
+
|
|
251
|
+
- [`<usa-reveal>`](usa-reveal.md) — Reveal
|
|
252
|
+
- [`<usa-scroll-progress>`](usa-scroll-progress.md) — Scroll progress bar
|
|
253
|
+
- [`<usa-scroll-scene>`](usa-scroll-scene.md) — Scroll scene · Requires: motionary/runtime/scroll
|
|
254
|
+
- [`<usa-scrolly>`](usa-scrolly.md) — Sticky scrollytelling
|
|
255
|
+
- [`<usa-stagger>`](usa-stagger.md) — Stagger list
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-accordion>` — Accordion
|
|
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
|
+
Smooth expand / collapse for native <details> — semantics, keyboard and find-in-page kept; no wrapper elements.
|
|
6
|
+
|
|
7
|
+
- **Category:** transitions
|
|
8
|
+
- **Import:** `import { defineAccordion } from 'motionary/components/transitions'` then `defineAccordion();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** `usa:toggle`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `toggleItem()`
|
|
14
|
+
- **Source:** [src/components/transitions/accordion.ts](../../src/components/transitions/accordion.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-accordion>
|
|
20
|
+
<details><summary>Shipping</summary><p>…</p></details>
|
|
21
|
+
<details><summary>Returns</summary><p>…</p></details>
|
|
22
|
+
</usa-accordion>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineAccordion } from 'motionary/components/transitions';
|
|
29
|
+
|
|
30
|
+
defineAccordion(); // registers <usa-accordion>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-accordion>
|
|
34
|
+
<details><summary>Shipping</summary><p>…</p></details>
|
|
35
|
+
<details><summary>Returns</summary><p>…</p></details>
|
|
36
|
+
</usa-accordion>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-acrylic>` — Acrylic & Mica
|
|
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
|
+
Windows Fluent materials: frosted acrylic (backdrop blur + tint + noise) and mica. Solid fallback when transparency is reduced.
|
|
6
|
+
|
|
7
|
+
- **Category:** background
|
|
8
|
+
- **Import:** `import { defineAcrylic } from 'motionary/components/background'` then `defineAcrylic();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `tint`, `tint-opacity`, `blur`, `shimmer`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/background/acrylic.ts](../../src/components/background/acrylic.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-acrylic shimmer="hover">
|
|
20
|
+
<nav>…</nav>
|
|
21
|
+
</usa-acrylic>
|
|
22
|
+
<usa-acrylic kind="mica">…</usa-acrylic>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineAcrylic } from 'motionary/components/background';
|
|
29
|
+
|
|
30
|
+
defineAcrylic(); // registers <usa-acrylic>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-acrylic shimmer="hover">
|
|
34
|
+
<nav>…</nav>
|
|
35
|
+
</usa-acrylic>
|
|
36
|
+
<usa-acrylic kind="mica">…</usa-acrylic>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# `<usa-add-to-cart>` — Add to cart (fly-to-cart)
|
|
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: a buy button — the product photo flies on an arc into the cart, the cart badge bumps and the button morphs into a ✓ “Added” state. Works with <usa-cart-drawer> (calls add(item)) or any [data-cart] icon.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 7.3
|
|
8
|
+
- **Import:** `import { defineAddToCart } from 'motionary/components/widgets'` then `defineAddToCart();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** `usa:add`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `add()`
|
|
14
|
+
- **Source:** [src/components/widgets/add-to-cart.ts](../../src/components/widgets/add-to-cart.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-cart-drawer id="cart"></usa-cart-drawer>
|
|
20
|
+
<div data-product>
|
|
21
|
+
<img src="shoe.jpg" alt="Sneaker">
|
|
22
|
+
<usa-add-to-cart cart="#cart" item='{"name":"Sneaker","price":89}'></usa-add-to-cart>
|
|
23
|
+
</div>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## ES module
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import { defineAddToCart } from 'motionary/components/widgets';
|
|
30
|
+
|
|
31
|
+
defineAddToCart(); // registers <usa-add-to-cart>
|
|
32
|
+
|
|
33
|
+
/* then use it in your HTML:
|
|
34
|
+
<usa-cart-drawer id="cart"></usa-cart-drawer>
|
|
35
|
+
<div data-product>
|
|
36
|
+
<img src="shoe.jpg" alt="Sneaker">
|
|
37
|
+
<usa-add-to-cart cart="#cart" item='{"name":"Sneaker","price":89}'></usa-add-to-cart>
|
|
38
|
+
</div>
|
|
39
|
+
*/
|
|
40
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-ambient>` — Ambient layer
|
|
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 fixed page-wide layer: drifting particles, falling snow, twinkling stars, film grain or a gradient that shifts with scroll.
|
|
6
|
+
|
|
7
|
+
- **Category:** page
|
|
8
|
+
- **Import:** `import { defineAmbient } from 'motionary/components/page'` then `defineAmbient();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `effect`, `density`, `color`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `mount()`, `upd()`, `resize()`, `resize()`, `draw()`, `draw()`, `unmount()`, `caf()`
|
|
14
|
+
- **Source:** [src/components/page/ambient.ts](../../src/components/page/ambient.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-ambient effect="snow" density="1.2"></usa-ambient>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineAmbient } from 'motionary/components/page';
|
|
26
|
+
|
|
27
|
+
defineAmbient(); // registers <usa-ambient>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-ambient effect="snow" density="1.2"></usa-ambient>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `<usa-anim-icon>` — Animated icons
|
|
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
|
+
Stroke icons that move: the bell rings, the heart beats, the check draws, the gear turns. Hover, click, in view or loop; decorative unless labelled.
|
|
6
|
+
|
|
7
|
+
- **Category:** svg
|
|
8
|
+
- **Import:** `import { defineAnimIcon } from 'motionary/components/svg'` then `defineAnimIcon();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `name`, `size`, `label`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `play()`
|
|
14
|
+
- **Source:** [src/components/svg/anim-icon.ts](../../src/components/svg/anim-icon.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-anim-icon name="bell" label="Notifications"></usa-anim-icon>
|
|
20
|
+
<usa-anim-icon name="heart" trigger="click"></usa-anim-icon>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ES module
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { defineAnimIcon } from 'motionary/components/svg';
|
|
27
|
+
|
|
28
|
+
defineAnimIcon(); // registers <usa-anim-icon>
|
|
29
|
+
|
|
30
|
+
/* then use it in your HTML:
|
|
31
|
+
<usa-anim-icon name="bell" label="Notifications"></usa-anim-icon>
|
|
32
|
+
<usa-anim-icon name="heart" trigger="click"></usa-anim-icon>
|
|
33
|
+
*/
|
|
34
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-audio>` — Beat-triggered effects
|
|
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.6: <usa-audio> renders a toggle (a user gesture starts Web Audio), detects beats and plays any registered effect on children with data-usa-beat="effect". JS: bindBeat(el, "pop"). Beats play nothing under reduced motion.
|
|
6
|
+
|
|
7
|
+
- **Category:** fx
|
|
8
|
+
- **Import:** `import { defineAudio } from 'motionary/components/effects'` then `defineAudio();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `source`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `toggle()`
|
|
14
|
+
- **Source:** [src/components/effects/audio.ts](../../src/components/effects/audio.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<audio id="track" src="song.mp3" controls></audio>
|
|
20
|
+
<usa-audio source="#track" label="Play with visuals">
|
|
21
|
+
<div data-usa-beat="pop">♪</div>
|
|
22
|
+
</usa-audio>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineAudio } from 'motionary/components/effects';
|
|
29
|
+
|
|
30
|
+
defineAudio(); // registers <usa-audio>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<audio id="track" src="song.mp3" controls></audio>
|
|
34
|
+
<usa-audio source="#track" label="Play with visuals">
|
|
35
|
+
<div data-usa-beat="pop">♪</div>
|
|
36
|
+
</usa-audio>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-aurora>` — Aurora
|
|
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 slow drifting gradient mesh behind its content. Transforms only, paused off-screen, still under reduced motion.
|
|
6
|
+
|
|
7
|
+
- **Category:** background
|
|
8
|
+
- **Import:** `import { defineAurora } from 'motionary/components/background'` then `defineAurora();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `colors`, `speed`, `intensity`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/background/aurora.ts](../../src/components/background/aurora.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-aurora colors="#7c5cff,#22d3ee,#f472b6">
|
|
20
|
+
<h1>Hero</h1>
|
|
21
|
+
</usa-aurora>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineAurora } from 'motionary/components/background';
|
|
28
|
+
|
|
29
|
+
defineAurora(); // registers <usa-aurora>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-aurora colors="#7c5cff,#22d3ee,#f472b6">
|
|
33
|
+
<h1>Hero</h1>
|
|
34
|
+
</usa-aurora>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# `<usa-auto-animate>` — Auto-animate
|
|
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
|
+
Wrap a list or grid: items that are added fade in, removed ones fade out in place, and everything else glides to its new spot — on sort, filter or resize. Zero code at the call site.
|
|
6
|
+
|
|
7
|
+
- **Category:** layout
|
|
8
|
+
- **Import:** `import { defineAutoAnimate } from 'motionary/components/layout'` then `defineAutoAnimate();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `enable()`, `disable()`
|
|
14
|
+
- **Source:** [src/components/layout/elements.ts](../../src/components/layout/elements.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-auto-animate>
|
|
20
|
+
<ul class="todo">…</ul>
|
|
21
|
+
</usa-auto-animate>
|
|
22
|
+
|
|
23
|
+
<!-- or on any element: -->
|
|
24
|
+
<script type="module">
|
|
25
|
+
import { autoAnimate } from 'motionary/components/layout';
|
|
26
|
+
autoAnimate(document.querySelector('.grid'));
|
|
27
|
+
</script>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## ES module
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import { defineAutoAnimate } from 'motionary/components/layout';
|
|
34
|
+
|
|
35
|
+
defineAutoAnimate(); // registers <usa-auto-animate>
|
|
36
|
+
|
|
37
|
+
/* then use it in your HTML:
|
|
38
|
+
<usa-auto-animate>
|
|
39
|
+
<ul class="todo">…</ul>
|
|
40
|
+
</usa-auto-animate>
|
|
41
|
+
|
|
42
|
+
<!-- or on any element: -->
|
|
43
|
+
*/
|
|
44
|
+
```
|