use-scroll-animate 6.1.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +157 -411
- package/README_ja.md +170 -175
- package/README_zh.md +169 -198
- package/dist/chunks/{base-B5i8qQPR.cjs → base-BaQV-2ha.cjs} +3 -3
- package/dist/chunks/base-BaQV-2ha.cjs.map +1 -0
- package/dist/chunks/{base-C3Sw9sAO.js → base-C_3cAoRz.js} +4 -4
- package/dist/chunks/base-C_3cAoRz.js.map +1 -0
- package/dist/chunks/{core-BYLtO0Po.cjs → core-B5T0dhFH.cjs} +3 -3
- package/dist/chunks/core-B5T0dhFH.cjs.map +1 -0
- package/dist/chunks/{core-BDcszY4L.cjs → core-BGAyaY6L.cjs} +2 -2
- package/dist/chunks/{core-BDcszY4L.cjs.map → core-BGAyaY6L.cjs.map} +1 -1
- package/dist/chunks/{core-BVQW34aX.js → core-D7cVumUu.js} +3 -3
- package/dist/chunks/core-D7cVumUu.js.map +1 -0
- package/dist/chunks/{core-DN3hHbHh.js → core-VEBw36QK.js} +2 -2
- package/dist/chunks/{core-DN3hHbHh.js.map → core-VEBw36QK.js.map} +1 -1
- package/dist/chunks/{core-BTf__I-8.js → core-ps8uvYuN.js} +2 -2
- package/dist/chunks/{core-BTf__I-8.js.map → core-ps8uvYuN.js.map} +1 -1
- package/dist/chunks/{core-BjOYKSrV.cjs → core-zq17EeCI.cjs} +2 -2
- package/dist/chunks/{core-BjOYKSrV.cjs.map → core-zq17EeCI.cjs.map} +1 -1
- package/dist/chunks/{fx-ChjxrMBo.js → fx-Bs6IrV4Q.js} +2 -2
- package/dist/chunks/{fx-ChjxrMBo.js.map → fx-Bs6IrV4Q.js.map} +1 -1
- package/dist/chunks/{fx-B8hk1Fby.cjs → fx-lBGVtQO1.cjs} +2 -2
- package/dist/chunks/{fx-B8hk1Fby.cjs.map → fx-lBGVtQO1.cjs.map} +1 -1
- package/dist/chunks/generative-D2YyhaeO.js +336 -0
- package/dist/chunks/generative-D2YyhaeO.js.map +1 -0
- package/dist/chunks/generative-DzIZq-_g.cjs +348 -0
- package/dist/chunks/generative-DzIZq-_g.cjs.map +1 -0
- package/dist/chunks/gpu-Bu7qwugO.js +380 -0
- package/dist/chunks/gpu-Bu7qwugO.js.map +1 -0
- package/dist/chunks/gpu-CenK2l6b.cjs +387 -0
- package/dist/chunks/gpu-CenK2l6b.cjs.map +1 -0
- package/dist/chunks/{presets-BJ09NeTo.js → presets-BYBVJVeP.js} +3 -3
- package/dist/chunks/presets-BYBVJVeP.js.map +1 -0
- package/dist/chunks/{presets-D2ksQNzJ.cjs → presets-CUHys3sK.cjs} +3 -3
- package/dist/chunks/presets-CUHys3sK.cjs.map +1 -0
- package/dist/chunks/registry-CKNLQpwd.js +121 -0
- package/dist/chunks/registry-CKNLQpwd.js.map +1 -0
- package/dist/chunks/registry-DehBVRDV.cjs +131 -0
- package/dist/chunks/registry-DehBVRDV.cjs.map +1 -0
- package/dist/chunks/{spring-CckMe3x0.js → spring-CbvHfVtP.js} +2 -2
- package/dist/chunks/{spring-CckMe3x0.js.map → spring-CbvHfVtP.js.map} +1 -1
- package/dist/chunks/{spring--oZh55tB.cjs → spring-Dgx187Vh.cjs} +2 -2
- package/dist/chunks/{spring--oZh55tB.cjs.map → spring-Dgx187Vh.cjs.map} +1 -1
- package/dist/chunks/{stagger-CvhYlKrF.cjs → stagger-CCFyhzSw.cjs} +3 -3
- package/dist/chunks/stagger-CCFyhzSw.cjs.map +1 -0
- package/dist/chunks/{stagger-Dh4V-OL0.js → stagger-DtMKo2SK.js} +3 -3
- package/dist/chunks/stagger-DtMKo2SK.js.map +1 -0
- package/dist/chunks/{variants-DxPmgrNX.cjs → variants-BhjyddG8.cjs} +2 -2
- package/dist/chunks/{variants-DxPmgrNX.cjs.map → variants-BhjyddG8.cjs.map} +1 -1
- package/dist/chunks/{variants-Bsevy6Xm.js → variants-DRlKVHvu.js} +2 -2
- package/dist/chunks/{variants-Bsevy6Xm.js.map → variants-DRlKVHvu.js.map} +1 -1
- package/dist/components/a11y.cjs +4 -4
- package/dist/components/a11y.cjs.map +1 -1
- package/dist/components/a11y.d.cts +2 -2
- package/dist/components/a11y.d.ts +2 -2
- package/dist/components/a11y.js +5 -5
- package/dist/components/a11y.js.map +1 -1
- package/dist/components/angular.cjs +9 -8
- package/dist/components/angular.cjs.map +1 -1
- package/dist/components/angular.d.cts +22 -22
- package/dist/components/angular.d.ts +22 -22
- package/dist/components/angular.js +9 -8
- package/dist/components/angular.js.map +1 -1
- package/dist/components/background.cjs +3 -3
- package/dist/components/background.cjs.map +1 -1
- package/dist/components/background.css +1 -1
- package/dist/components/background.d.cts +1 -1
- package/dist/components/background.d.ts +1 -1
- package/dist/components/background.js +3 -3
- package/dist/components/background.js.map +1 -1
- package/dist/components/bridge.cjs +2 -2
- package/dist/components/bridge.cjs.map +1 -1
- package/dist/components/bridge.d.cts +1 -1
- package/dist/components/bridge.d.ts +1 -1
- package/dist/components/bridge.js +2 -2
- package/dist/components/bridge.js.map +1 -1
- package/dist/components/cards.cjs +3 -3
- package/dist/components/cards.cjs.map +1 -1
- package/dist/components/cards.css +1 -1
- package/dist/components/cards.d.cts +1 -1
- package/dist/components/cards.d.ts +1 -1
- package/dist/components/cards.js +3 -3
- package/dist/components/cards.js.map +1 -1
- package/dist/components/click.cjs +4 -4
- package/dist/components/click.cjs.map +1 -1
- package/dist/components/click.css +1 -1
- package/dist/components/click.d.cts +1 -1
- package/dist/components/click.d.ts +1 -1
- package/dist/components/click.js +4 -4
- package/dist/components/click.js.map +1 -1
- package/dist/components/depth.cjs +4 -4
- package/dist/components/depth.cjs.map +1 -1
- package/dist/components/depth.css +1 -1
- package/dist/components/depth.d.cts +1 -1
- package/dist/components/depth.d.ts +1 -1
- package/dist/components/depth.js +4 -4
- package/dist/components/depth.js.map +1 -1
- package/dist/components/effects.cjs +84 -416
- package/dist/components/effects.cjs.map +1 -1
- package/dist/components/effects.d.cts +2 -2
- package/dist/components/effects.d.ts +2 -2
- package/dist/components/effects.js +18 -349
- package/dist/components/effects.js.map +1 -1
- package/dist/components/feedback.cjs +2 -2
- package/dist/components/feedback.cjs.map +1 -1
- package/dist/components/feedback.css +1 -1
- package/dist/components/feedback.d.cts +1 -1
- package/dist/components/feedback.d.ts +1 -1
- package/dist/components/feedback.js +2 -2
- package/dist/components/feedback.js.map +1 -1
- package/dist/components/fx-gpu.cjs +12 -0
- package/dist/components/fx-gpu.cjs.map +1 -0
- package/dist/components/fx-gpu.d.cts +63 -0
- package/dist/components/fx-gpu.d.ts +63 -0
- package/dist/components/fx-gpu.js +5 -0
- package/dist/components/fx-gpu.js.map +1 -0
- package/dist/components/fx.cjs +18 -138
- package/dist/components/fx.cjs.map +1 -1
- package/dist/components/fx.css +1 -1
- package/dist/components/fx.d.cts +2 -2
- package/dist/components/fx.d.ts +2 -2
- package/dist/components/fx.js +8 -127
- package/dist/components/fx.js.map +1 -1
- package/dist/components/fx2.cjs +25 -0
- package/dist/components/fx2.cjs.map +1 -0
- package/dist/components/fx2.d.cts +136 -0
- package/dist/components/fx2.d.ts +136 -0
- package/dist/components/fx2.js +17 -0
- package/dist/components/fx2.js.map +1 -0
- package/dist/components/gesture.cjs +4 -4
- package/dist/components/gesture.cjs.map +1 -1
- package/dist/components/gesture.css +1 -1
- package/dist/components/gesture.d.cts +1 -1
- package/dist/components/gesture.d.ts +1 -1
- package/dist/components/gesture.js +5 -5
- package/dist/components/gesture.js.map +1 -1
- package/dist/components/interaction.cjs +2 -2
- package/dist/components/interaction.cjs.map +1 -1
- package/dist/components/interaction.css +1 -1
- package/dist/components/interaction.d.cts +1 -1
- package/dist/components/interaction.d.ts +1 -1
- package/dist/components/interaction.js +2 -2
- package/dist/components/interaction.js.map +1 -1
- package/dist/components/jsx.d.cts +2 -2
- package/dist/components/jsx.d.ts +2 -2
- package/dist/components/layout.cjs +2 -2
- package/dist/components/layout.cjs.map +1 -1
- package/dist/components/layout.css +1 -1
- package/dist/components/layout.d.cts +1 -1
- package/dist/components/layout.d.ts +1 -1
- package/dist/components/layout.js +2 -2
- package/dist/components/layout.js.map +1 -1
- package/dist/components/lazy.cjs +2 -2
- package/dist/components/lazy.cjs.map +1 -1
- package/dist/components/lazy.d.cts +2 -2
- package/dist/components/lazy.d.ts +2 -2
- package/dist/components/lazy.js +2 -2
- package/dist/components/lazy.js.map +1 -1
- package/dist/components/lite.cjs +46 -50
- package/dist/components/lite.cjs.map +1 -1
- package/dist/components/lite.js +46 -50
- package/dist/components/lite.js.map +1 -1
- package/dist/components/packs.cjs +2 -2
- package/dist/components/packs.cjs.map +1 -1
- package/dist/components/packs.css +1 -1
- package/dist/components/packs.d.cts +1 -1
- package/dist/components/packs.d.ts +1 -1
- package/dist/components/packs.js +2 -2
- package/dist/components/packs.js.map +1 -1
- package/dist/components/page.cjs +3 -3
- package/dist/components/page.cjs.map +1 -1
- package/dist/components/page.css +1 -1
- package/dist/components/page.d.cts +1 -1
- package/dist/components/page.d.ts +1 -1
- package/dist/components/page.js +4 -4
- package/dist/components/page.js.map +1 -1
- package/dist/components/perf.cjs +3 -3
- package/dist/components/perf.cjs.map +1 -1
- package/dist/components/perf.d.cts +2 -2
- package/dist/components/perf.d.ts +2 -2
- package/dist/components/perf.js +4 -4
- package/dist/components/perf.js.map +1 -1
- package/dist/components/physics.cjs +3 -3
- package/dist/components/physics.cjs.map +1 -1
- package/dist/components/physics.css +1 -1
- package/dist/components/physics.d.cts +1 -1
- package/dist/components/physics.d.ts +1 -1
- package/dist/components/physics.js +4 -4
- package/dist/components/physics.js.map +1 -1
- package/dist/components/react.cjs +4 -4
- package/dist/components/react.cjs.map +1 -1
- package/dist/components/react.js +4 -4
- package/dist/components/react.js.map +1 -1
- package/dist/components/reveal.cjs +2 -2
- package/dist/components/reveal.cjs.map +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.d.cts +1 -1
- package/dist/components/reveal.d.ts +1 -1
- package/dist/components/reveal.js +2 -2
- package/dist/components/reveal.js.map +1 -1
- package/dist/components/solid.cjs +10 -9
- package/dist/components/solid.cjs.map +1 -1
- package/dist/components/solid.d.cts +22 -22
- package/dist/components/solid.d.ts +22 -22
- package/dist/components/solid.js +10 -9
- package/dist/components/solid.js.map +1 -1
- package/dist/components/svelte.cjs +9 -8
- package/dist/components/svelte.cjs.map +1 -1
- package/dist/components/svelte.d.cts +22 -22
- package/dist/components/svelte.d.ts +22 -22
- package/dist/components/svelte.js +9 -8
- package/dist/components/svelte.js.map +1 -1
- package/dist/components/svg.cjs +2 -2
- package/dist/components/svg.cjs.map +1 -1
- package/dist/components/svg.css +1 -1
- package/dist/components/svg.d.cts +1 -1
- package/dist/components/svg.d.ts +1 -1
- package/dist/components/svg.js +2 -2
- package/dist/components/svg.js.map +1 -1
- package/dist/components/text.cjs +3 -3
- package/dist/components/text.cjs.map +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.d.cts +1 -1
- package/dist/components/text.d.ts +1 -1
- package/dist/components/text.js +3 -3
- package/dist/components/text.js.map +1 -1
- package/dist/components/timeline.cjs +3 -3
- package/dist/components/timeline.cjs.map +1 -1
- package/dist/components/timeline.css +1 -1
- package/dist/components/timeline.d.cts +1 -1
- package/dist/components/timeline.d.ts +1 -1
- package/dist/components/timeline.js +4 -4
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/tokens.cjs +2 -2
- package/dist/components/tokens.cjs.map +1 -1
- package/dist/components/tokens.d.cts +2 -2
- package/dist/components/tokens.d.ts +2 -2
- package/dist/components/tokens.js +2 -2
- package/dist/components/tokens.js.map +1 -1
- package/dist/components/transitions.cjs +2 -2
- package/dist/components/transitions.cjs.map +1 -1
- package/dist/components/transitions.css +1 -1
- package/dist/components/transitions.d.cts +1 -1
- package/dist/components/transitions.d.ts +1 -1
- package/dist/components/transitions.js +2 -2
- package/dist/components/transitions.js.map +1 -1
- package/dist/components/ui.cjs +4 -4
- package/dist/components/ui.cjs.map +1 -1
- package/dist/components/ui.css +1 -1
- package/dist/components/ui.d.cts +1 -1
- package/dist/components/ui.d.ts +1 -1
- package/dist/components/ui.js +5 -5
- package/dist/components/ui.js.map +1 -1
- package/dist/components/vue.cjs +10 -9
- package/dist/components/vue.cjs.map +1 -1
- package/dist/components/vue.d.cts +23 -23
- package/dist/components/vue.d.ts +23 -23
- package/dist/components/vue.js +10 -9
- package/dist/components/vue.js.map +1 -1
- package/dist/components/webgl.cjs +2 -2
- package/dist/components/webgl.cjs.map +1 -1
- package/dist/components/webgl.css +1 -1
- package/dist/components/webgl.d.cts +1 -1
- package/dist/components/webgl.d.ts +1 -1
- package/dist/components/webgl.js +2 -2
- package/dist/components/webgl.js.map +1 -1
- package/dist/components/widgets.cjs +591 -0
- package/dist/components/widgets.cjs.map +1 -0
- package/dist/components/widgets.d.cts +110 -0
- package/dist/components/widgets.d.ts +110 -0
- package/dist/components/widgets.js +581 -0
- package/dist/components/widgets.js.map +1 -0
- package/dist/components.cjs +19 -18
- package/dist/components.cjs.map +1 -1
- package/dist/components.css +1 -1
- package/dist/components.d.cts +30 -30
- package/dist/components.d.ts +30 -30
- package/dist/components.js +13 -12
- package/dist/components.js.map +1 -1
- package/dist/components.umd.js +5 -5
- package/dist/components.umd.js.map +1 -1
- package/dist/element.cjs +4 -4
- package/dist/element.cjs.map +1 -1
- package/dist/element.d.cts +5 -5
- package/dist/element.d.ts +5 -5
- package/dist/element.js +4 -4
- package/dist/element.js.map +1 -1
- package/dist/element.umd.js.map +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/presets/extended.cjs +3 -3
- package/dist/presets/extended.cjs.map +1 -1
- package/dist/presets/extended.d.cts +3 -3
- package/dist/presets/extended.d.ts +3 -3
- package/dist/presets/extended.js +3 -3
- package/dist/presets/extended.js.map +1 -1
- package/dist/presets-extended.umd.js.map +1 -1
- package/dist/react.cjs +4 -4
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +5 -5
- package/dist/react.d.ts +5 -5
- package/dist/react.js +4 -4
- package/dist/react.js.map +1 -1
- package/dist/solid.cjs +5 -5
- package/dist/solid.cjs.map +1 -1
- package/dist/solid.d.cts +6 -6
- package/dist/solid.d.ts +6 -6
- package/dist/solid.js +5 -5
- package/dist/solid.js.map +1 -1
- package/dist/svelte.cjs +5 -5
- package/dist/svelte.cjs.map +1 -1
- package/dist/svelte.d.cts +6 -6
- package/dist/svelte.d.ts +6 -6
- package/dist/svelte.js +5 -5
- package/dist/svelte.js.map +1 -1
- package/dist/vue.cjs +4 -4
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.d.cts +5 -5
- package/dist/vue.d.ts +5 -5
- package/dist/vue.js +4 -4
- package/dist/vue.js.map +1 -1
- package/dist/widgets.umd.js +2 -0
- package/dist/widgets.umd.js.map +1 -0
- package/docs/API.md +13 -13
- package/docs/ROADMAP.md +11 -12
- package/docs/accessibility.md +2 -2
- package/docs/components.md +62 -33
- package/docs/frameworks-ssr.md +12 -12
- package/docs/hybrid-apps.md +10 -10
- package/docs/migration-from-aos.md +5 -5
- package/docs/migration-from-gsap-scrolltrigger.md +3 -3
- package/docs/motion-tokens.css +1 -1
- package/docs/motion-tokens.md +2 -2
- package/docs/performance.md +6 -6
- package/docs/presets.md +5 -5
- package/docs/windows-apps.md +8 -8
- package/package.json +56 -25
- package/dist/chunks/base-B5i8qQPR.cjs.map +0 -1
- package/dist/chunks/base-C3Sw9sAO.js.map +0 -1
- package/dist/chunks/core-BVQW34aX.js.map +0 -1
- package/dist/chunks/core-BYLtO0Po.cjs.map +0 -1
- package/dist/chunks/presets-BJ09NeTo.js.map +0 -1
- package/dist/chunks/presets-D2ksQNzJ.cjs.map +0 -1
- package/dist/chunks/stagger-CvhYlKrF.cjs.map +0 -1
- package/dist/chunks/stagger-Dh4V-OL0.js.map +0 -1
package/README_ja.md
CHANGED
|
@@ -1,224 +1,219 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# Motionary
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**モダン Web のためのスクロールアニメーションとアニメーション Web Components — 214 のスクロールプリセット、90 のエフェクト、依存ゼロ。**
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
[](https://github.com/HarrisonCN/use-scroll-animate)
|
|
9
|
-
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
_旧名 **use-scroll-animate** — API と `<usa-*>` タグはそのまま。旧 npm パッケージもエイリアスとして公開を継続します。_
|
|
10
8
|
|
|
11
|
-
[
|
|
12
|
-
|
|
13
|
-
</div>
|
|
9
|
+
[](https://www.npmjs.com/package/motionary) [](https://github.com/HarrisonCN/motionary/actions/workflows/ci.yml) [](./LICENSE)
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
[English](./README.md) | [简体中文](./README_zh.md) | [日本語](./README_ja.md)
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
**[🛍 アニメーションストア](https://harrisoncn.github.io/motionary/showcase/)** · **[🧩 コンポーネント](https://harrisoncn.github.io/motionary/showcase/components.html)** · **[🎛 Playground](https://harrisoncn.github.io/motionary/showcase/playground.html)** · **[📜 ストーリー](https://harrisoncn.github.io/motionary/showcase/story.html)**
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
- ⚡ **依存関係なし**:純粋な Vanilla JS/TypeScript。
|
|
21
|
-
- 🚀 **高パフォーマンス**:`IntersectionObserver` とネイティブの `Web Animations API` で駆動。デフォルトではスクロールイベントリスナーなし(オプトインのスクロール進捗モードは、対象要素が画面内にある間だけ passive・rAF スロットルのリスナーを1つ使用)、レイアウトスラッシングなし。
|
|
22
|
-
- 🪶 **超軽量**:Gzip後コア約4.8KB(`timeline`・`staggerChildren`・React/Vue ヘルパーを含む全体で約6.1KB)。
|
|
23
|
-
- 🧩 **フレームワークに依存しない**:Vanilla JS、React、Vue、Svelteなどとシームレスに動作。一流の React Hooks と Vue Composables を内蔵。
|
|
24
|
-
- ♿ **アクセシブル**:`prefers-reduced-motion` を標準でサポート。
|
|
15
|
+
<sub>ストアでは全 <b>227</b> 件のアニメーション(214 のスクロールプリセットとカード・クリック・物理・ページ効果)をデスクトップ/スマホ幅でプレビュー・調整・コピーできます。</sub>
|
|
25
16
|
|
|
26
|
-
|
|
17
|
+
</div>
|
|
27
18
|
|
|
28
|
-
|
|
19
|
+
Motionary はスクロールで表示される要素をアニメーションさせ(IntersectionObserver + Web Animations、またはブラウザ標準のスクロールタイムライン)、カード・ボタン・物理・ページトランジション・背景・WebGL など 94 個のアニメーション付きカスタム要素を提供します。どのフレームワークでも、素の HTML でも、デスクトップの Web ビューアプリ(Electron・Tauri・WebView2)でも動き、すべて `prefers-reduced-motion` を尊重します。
|
|
29
20
|
|
|
30
|
-
|
|
31
|
-
import ScrollAnimate from 'use-scroll-animate';
|
|
32
|
-
import 'use-scroll-animate/presets/extended'; // import するだけで登録
|
|
21
|
+
## インストール
|
|
33
22
|
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
```bash
|
|
24
|
+
npm i motionary
|
|
36
25
|
```
|
|
37
26
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
| ズーム・スケール | 23 | `zoom-in-up` · `zoom-in-down` · `zoom-in-left` · `zoom-in-right` · `zoom-out-up` · `zoom-out-down` · `zoom-out-left` · `zoom-out-right` · `zoom-in-big` · `zoom-out-big` · `zoom-bounce` · `zoom-in-rotate` · `scale-x-left` · `scale-x-right` · `scale-y-top` · `scale-y-bottom` · `stretch-x` · `stretch-y` |
|
|
44
|
-
| 3D フリップ | 22 | `flip-x-reverse` · `flip-y-reverse` · `flip-y-full` · `flip-diagonal` · `flip-diagonal-reverse` · `flip-left` · `flip-right` · `unfold-down` · `unfold-up` · `door-open-left` · `door-open-right` · `fold-in` · `flip-x-bounce` · `flip-y-bounce` · `swing-in-top` · `swing-in-bottom` · `swing-in-left` · `swing-in-right` |
|
|
45
|
-
| スライド | 20 | `slide-up-spring` · `slide-down-spring` · `slide-left-spring` · `slide-right-spring` · `slide-up-sm` · `slide-down-sm` · `back-in-up` · `back-in-down` · `back-in-left` · `back-in-right` · `light-speed-in-left` · `light-speed-in-right` · `rise-in` · `sink-in` · `float-in-up` · `float-in-down` |
|
|
46
|
-
| 回転・スキュー | 20 | `roll-in-left` · `roll-in-right` · `spiral-in` · `spiral-in-reverse` · `spin-in` · `rotate-in-up-left` · `rotate-in-up-right` · `rotate-in-down-left` · `rotate-in-down-right` · `skew-in-left` · `skew-in-y` · `shear-in` · `shear-in-reverse` · `twist-in` · `tilt-in-left` · `tilt-in-right` |
|
|
47
|
-
| ブラー・マスク | 14 | `blur-in-down` · `blur-in-left` · `blur-in-right` · `blur-in-strong` · `blur-in-zoom` · `blur-in-scale` · `blur-in-x` · `mask-up` · `mask-down` · `mask-left` · `mask-right` · `blur-mask-up` |
|
|
48
|
-
| クリップ | 22 | `clip-circle-top` · `clip-circle-bottom` · `clip-circle-left` · `clip-circle-right` · `clip-circle-corner` · `clip-ellipse` · `clip-diamond` · `clip-split-x` · `clip-split-y` · `clip-box` · `clip-pill` · `clip-blinds` · `clip-blinds-x` · `clip-diagonal` · `clip-diagonal-reverse` · `clip-slant-right` · `clip-slant-left` |
|
|
49
|
-
| バウンス・弾性 | 17 | `bounce-in` · `bounce-in-up` · `bounce-in-down` · `bounce-in-left` · `bounce-in-right` · `elastic-in` · `elastic-in-x` · `rubber-in` · `jello-in` · `wobble-in` · `tada-in` · `heartbeat-in` · `drop-in` · `pop-in` · `squash-in` · `shake-in` · `swing-in` |
|
|
50
|
-
| 色・光 | 14 | `brightness-in` · `darken-in` · `color-in` · `saturate-in` · `hue-in` · `sepia-in` · `invert-in` · `contrast-in` · `exposure-in` · `vintage-in` · `blur-bright-in` · `shadow-lift` · `neon-glow-in` · `glow-in` |
|
|
51
|
-
| 奥行き・遠近 | 10 | `perspective-in-up` · `perspective-in-down` · `perspective-in-left` · `perspective-in-right` · `depth-push` · `depth-pull` · `depth-in-up` · `swoop-in-left` · `swoop-in-right` · `card-tilt-in` |
|
|
52
|
-
| グリッチ・特殊 | 9 | `glitch-in` · `glitch-in-color` · `typewriter` · `typewriter-lines` · `hinge-in` · `flicker-in` · `scan-in` · `materialize` · `teleport-in` |
|
|
53
|
-
| スタッガー向け | 8 | `stagger-fade-up` · `stagger-pop` · `stagger-rise` · `stagger-slide` · `stagger-flip` · `stagger-blur` · `stagger-zoom` · `stagger-drop` |
|
|
54
|
-
| スクロール連動 | 12 | `scrub-parallax-up` · `scrub-parallax-down` · `scrub-rotate` · `scrub-spin` · `scrub-scale` · `scrub-shrink` · `scrub-pan-left` · `scrub-pan-right` · `scrub-tilt` · `scrub-fade-through` · `scrub-blur-through` · `scrub-reveal-x` |
|
|
55
|
-
|
|
56
|
-
## アニメーションコンポーネント(v2.2)🧩
|
|
57
|
-
|
|
58
|
-
依存ゼロの**アニメーション Web Components 30 種**(`<usa-*>`)を 6 カテゴリで提供。**Web ページと Windows デスクトップアプリ**(Electron、Tauri、WinUI/WPF/WinForms の WebView2、PWA)の両方で動作します。Custom Elements + CSS + Web Animations のみ、ツリーシェイク可能、SSR セーフ、`prefers-reduced-motion` 対応。**[ライブギャラリー](https://harrisoncn.github.io/use-scroll-animate/showcase/components.html)** · [コンポーネント文書](./docs/components.md)(英語)· [Windows アプリガイド](./docs/windows-apps.md)(英語)
|
|
59
|
-
|
|
60
|
-
```js
|
|
61
|
-
import { defineComponents } from 'use-scroll-animate/components';
|
|
62
|
-
defineComponents(); // カテゴリ単位: import { defineTextComponents } from 'use-scroll-animate/components/text'
|
|
27
|
+
```html
|
|
28
|
+
<!-- CDN (no build) -->
|
|
29
|
+
<script src="https://unpkg.com/motionary@6/dist/index.umd.js"></script> <!-- window.ScrollAnimate -->
|
|
30
|
+
<script src="https://unpkg.com/motionary@6/dist/presets-extended.umd.js"></script> <!-- +181 presets -->
|
|
31
|
+
<script src="https://unpkg.com/motionary@6/dist/components.umd.js"></script> <!-- every <usa-*>, window.UsaComponents -->
|
|
63
32
|
```
|
|
64
33
|
|
|
65
|
-
|
|
66
|
-
|---|---|
|
|
67
|
-
| **入場・スクロール**(`/components/reveal`) | `<usa-reveal>` · `<usa-stagger>` · `<usa-scroll-progress>` · `<usa-scrolly>` |
|
|
68
|
-
| **テキスト**(`/components/text`) | `<usa-typewriter>` · `<usa-split-text>` · `<usa-scramble>` · `<usa-counter>` · `<usa-shimmer-text>` · `<usa-text-rotate>` · `<usa-wave-text>` · `<usa-glitch>` · `<usa-gradient-text>` · `<usa-handwriting>` · `<usa-scroll-highlight>` |
|
|
69
|
-
| **インタラクション**(`/components/interaction`) | `<usa-ripple>` · `<usa-magnetic>` · `<usa-tilt>` · `<usa-spotlight>`(Fluent Reveal)· `<usa-press>` · `<usa-toggle>` |
|
|
70
|
-
| **ローディング・フィードバック**(`/components/feedback`) | `<usa-spinner>` · `<usa-skeleton>` · `<usa-progress>` · `<usa-toaster>` + `toast()` · `<usa-check>` |
|
|
71
|
-
| **背景・装飾**(`/components/background`) | `<usa-aurora>` · `<usa-particles>` · `<usa-grain>` · `<usa-marquee>` · `<usa-acrylic>`(Acrylic / Mica) · `<usa-grid-glow>` · `<usa-blobs>` · `<usa-water-ripple>` · `<usa-dot-network>` · `fluentPreset()` |
|
|
72
|
-
| **トランジション**(`/components/transitions`) | `<usa-dialog>` · `<usa-accordion>` · `<usa-view-switch>` · `viewTransition()` · `flip()` |
|
|
73
|
-
| **スプリング・物理**(`/components/physics`) | `<usa-spring>`(bounce-in · pop · drop · jelly · rubber-band)· `<usa-draggable>` · `<usa-overscroll>` · `spring()` · `createSpring()` |
|
|
74
|
-
| **カード効果**(`/components/cards`) | `<usa-card>`(flip · holo · glass · border-glow · conic-border · lift · spotlight · sheen · parallax-layers · expand)· `<usa-card-stack>` · `<usa-sticky-stack>` · `<usa-carousel-3d>` |
|
|
75
|
-
| **クリック・タップ**(`/components/click`) | `<usa-button>`(squash · wobble · gooey · dent · shape morph · submit)· `<usa-icon-morph>` · `<usa-click>` · `<usa-like>` · `<usa-hold>` · `<usa-double-tap>` · `<usa-checkbox>` |
|
|
76
|
-
| **UI コンポーネント・バリアント**(`/components/ui`) | `<usa-tabs>` · `<usa-drawer>` · `<usa-bottom-sheet>` · `<usa-pull-refresh>` · `<usa-fab>` · `<usa-navbar>` · `<usa-slider>` · `<usa-rating>` · `<usa-tooltip>` · `<usa-popover>` · `<usa-badge>` · `<usa-avatar-stack>` · 全コンポーネントで `variant` |
|
|
77
|
-
| **ページ・アプリ全体**(`/components/page`) | `pageTransition()` · `themeTransition()` · `<usa-cursor>` · `smoothScroll()` · `<usa-fullpage>` · `<usa-loading-bar>` · `<usa-back-to-top>` · `<usa-ambient>` · `<usa-splash>` · `<usa-auto-skeleton>` · `<usa-motion-switch>` |
|
|
78
|
-
| **タイムライン** (`/components/timeline`) | `timeline()`(連結 · 重ね · ラベル · シーク · 逆再生 · スクラブ)· `<usa-timeline>`(`data-tl` ステップ) |
|
|
79
|
-
| **ジェスチャー** (`/components/gesture`) | `gesture()`(パン · スワイプ · ピンチ · 長押し · タップ → スプリング)· `<usa-swipeable>` · `<usa-pinch-zoom>` |
|
|
80
|
-
| **SVG** (`/components/svg`) | `<usa-draw>`(線描画)· `<usa-morph>`(パスモーフ)· `<usa-mask-reveal>` · `<usa-anim-icon>` · `morphTo()` |
|
|
81
|
-
| **Canvas / WebGL** (`/components/webgl`) | `<usa-shader>`(gradient · plasma · waves · aurora · snow · fireflies · stars · bokeh · rain · カスタム GLSL)· `<usa-post-fx>` · `<usa-distort>` · `<usa-liquid>` · `glQuad()` |
|
|
82
|
-
| **3D / 奥行き** (`/components/depth`) | `<usa-cube>` · `<usa-depth>`(ポインター · ジャイロ · スクロール視差)· `deviceTilt()` |
|
|
83
|
-
| **レイアウト** (`/components/layout`) | `<usa-auto-animate>` / `autoAnimate()` · `<usa-masonry>` · `sharedTransition()`(共有要素) |
|
|
84
|
-
| **エフェクトパック** (`/components/packs`) | `<usa-pack>` (`name="ecommerce \| portfolio \| dashboard \| game \| landing"`) · `applyPack()` · `flyToCart()` |
|
|
85
|
-
| **エフェクト API** (`/components/fx`) | `<usa-fx>` · `registerEffect()` · `playEffect()` · `bindEffect()` · 内蔵: タイムライン入場、pulse · pop · jelly · wiggle · bounce · tada · shake、burst · confetti · ripple |
|
|
86
|
-
| **エフェクトパック** (`/components/effects`) | `registerAllEffects()` · カード & クリック 2.0 · 物理 · ページ全体 · `<usa-story>` スクロールストーリー · ジェネレーティブ背景 · サウンド連動(`<usa-audio>`)· カーソル & ジェスチャー(`<usa-gesture-fx>`)· テーマパック(`<usa-theme>`)· マイクロインタラクション 23 種 · `<usa-player>` JSON アニメーション |
|
|
34
|
+
jsDelivr も利用できます:`https://cdn.jsdelivr.net/npm/motionary@6/dist/…`。既存の `use-scroll-animate` と `unpkg.com/use-scroll-animate@6` の URL もそのまま動きます。
|
|
87
35
|
|
|
88
|
-
##
|
|
36
|
+
## 30 秒クイックスタート
|
|
89
37
|
|
|
90
|
-
-
|
|
91
|
-
- [API リファレンス](./docs/API.md)(英語)· [デモ](./demo/index.html)(全プリセットをクリックで再生、ビルド不要)
|
|
92
|
-
- 移行ガイド:[AOS から](./docs/migration-from-aos.md) · [GSAP ScrollTrigger から](./docs/migration-from-gsap-scrolltrigger.md)
|
|
93
|
-
- [2.0 へのアップグレード](./docs/deprecations.md):`createReactHooks` / `createVueComposables` は `use-scroll-animate/react` / `/vue` からのみ。`dist/index.mjs`・`dist/index.esm.js`・`dist/types/*`・`dist/*` ディープインポートは削除、デフォルトエンジンは `'auto'`。CDN の `dist/index.umd.js` は変更なし。詳細は [CHANGELOG](./CHANGELOG.md) の MIGRATION。
|
|
94
|
-
|
|
95
|
-
## インストール
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
npm install use-scroll-animate
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## クイックスタート (Vanilla JS / HTML)
|
|
102
|
-
|
|
103
|
-
最も簡単な方法は、HTML の `data-sa` 属性を使用することです。
|
|
38
|
+
要素に `data-sa` を付け、`data-sa-animation` でプリセットを選びます(すべてのオプションに `data-sa-*` 属性あり)。JS API も使えます:
|
|
104
39
|
|
|
105
40
|
```html
|
|
106
|
-
<!-- 1.
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
</div>
|
|
110
|
-
|
|
41
|
+
<!-- 1. HTML only: data attributes + one init() call -->
|
|
42
|
+
<h2 data-sa data-sa-animation="fade-in-up">Hello</h2>
|
|
43
|
+
<div data-sa data-sa-animation="bounce-in-up" data-sa-delay="150">Card</div>
|
|
111
44
|
<script type="module">
|
|
112
|
-
|
|
113
|
-
import
|
|
114
|
-
ScrollAnimate.init();
|
|
45
|
+
import ScrollAnimate from 'motionary';
|
|
46
|
+
import 'motionary/presets/extended'; // optional: +181 presets (bounce-in-up, clip-diamond, …)
|
|
47
|
+
ScrollAnimate.init(); // picks up every [data-sa]
|
|
115
48
|
</script>
|
|
116
49
|
```
|
|
117
50
|
|
|
118
|
-
## ネイティブのスクロール駆動エンジン `engine`(v1.6)
|
|
119
|
-
|
|
120
|
-
CSS スクロール駆動アニメーション(`CSS.supports('animation-timeline: view()')`)に対応したブラウザでは、プリセットをブラウザ標準の **view timeline** 上で実行できます。進行度はスクロール位置に連動し(メインスレッド外)、IntersectionObserver で開始して固定の `duration` で再生する方式ではありません。
|
|
121
|
-
|
|
122
51
|
```js
|
|
123
|
-
|
|
124
|
-
|
|
52
|
+
// 2. JS API
|
|
53
|
+
import ScrollAnimate, { staggerChildren, parallax, timeline } from 'motionary';
|
|
54
|
+
|
|
55
|
+
ScrollAnimate.observe('.card', { animation: 'zoom-in-up', duration: 800, easing: 'spring' });
|
|
56
|
+
staggerChildren(document.querySelector('.grid'), { animation: 'stagger-pop', stagger: 60 });
|
|
57
|
+
parallax('.hero-bg', { speed: 0.3 });
|
|
58
|
+
ScrollAnimate.observe('.logo', { animation: 'scrub-spin', engine: 'css', viewRange: ['cover 0%', 'cover 100%'] });
|
|
125
59
|
```
|
|
126
60
|
|
|
127
|
-
|
|
128
|
-
- ネイティブエンジンでは `duration`・`delay`・`threshold`・`offset`・`stagger` は無効で、範囲は `viewRange`(デフォルト `['entry 0%', 'entry 100%']`)。`easing` は有効。HTML:`data-sa-engine`、`data-sa-view-range`。
|
|
129
|
-
- `once`(デフォルト)は完了時に最終状態を固定、`repeat: true` ではスクロールに双方向で追従。クラス名モード・reduced motion・`animate()`・`timeline()`・`staggerChildren()` は常に JS エンジン。`supportsScrollTimeline()` もエクスポート。
|
|
61
|
+
フレームワーク — 各アダプターは独立したエントリで、アンマウント時に自動で後片付けします:
|
|
130
62
|
|
|
131
|
-
|
|
63
|
+
```jsx
|
|
64
|
+
// React
|
|
65
|
+
import React from 'react';
|
|
66
|
+
import { createReactHooks } from 'motionary/react';
|
|
67
|
+
const { useScrollAnimate } = createReactHooks(React);
|
|
132
68
|
|
|
133
|
-
|
|
69
|
+
export function Card() {
|
|
70
|
+
const ref = useScrollAnimate({ animation: 'fade-in-up' });
|
|
71
|
+
return <div ref={ref}>Hello</div>;
|
|
72
|
+
}
|
|
73
|
+
```
|
|
134
74
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
75
|
+
```vue
|
|
76
|
+
<!-- Vue 3 -->
|
|
77
|
+
<script setup>
|
|
78
|
+
import { ref, onMounted, onUnmounted } from 'vue';
|
|
79
|
+
import { createVueComposables } from 'motionary/vue';
|
|
80
|
+
const { useScrollAnimate } = createVueComposables({ ref, onMounted, onUnmounted });
|
|
81
|
+
const { animateRef } = useScrollAnimate({ animation: 'zoom-in' });
|
|
82
|
+
</script>
|
|
83
|
+
<template><div ref="animateRef">Hello</div></template>
|
|
84
|
+
```
|
|
141
85
|
|
|
142
|
-
|
|
86
|
+
```svelte
|
|
87
|
+
<!-- Svelte 3–5 -->
|
|
88
|
+
<script>
|
|
89
|
+
import { scrollAnimate } from 'motionary/svelte';
|
|
90
|
+
</script>
|
|
91
|
+
<div use:scrollAnimate={{ animation: 'flip-up' }}>Hello</div>
|
|
92
|
+
```
|
|
143
93
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
94
|
+
```jsx
|
|
95
|
+
// Solid
|
|
96
|
+
import { scrollAnimate } from 'motionary/solid';
|
|
97
|
+
scrollAnimate; // keep the directive import (TypeScript)
|
|
98
|
+
export const Card = () => <div use:scrollAnimate={{ animation: 'blur-in-up' }}>Hello</div>;
|
|
99
|
+
```
|
|
148
100
|
|
|
149
|
-
|
|
101
|
+
```ts
|
|
102
|
+
// Angular (standalone) — the animated Web Components
|
|
103
|
+
import { APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
|
|
104
|
+
import { usaInitializer } from 'motionary/components/angular';
|
|
105
|
+
import 'motionary/presets/extended'; // lets <usa-reveal effect> use every preset name
|
|
106
|
+
// app.config.ts: providers: [{ provide: APP_INITIALIZER, multi: true, useFactory: usaInitializer() }]
|
|
107
|
+
@Component({ standalone: true, schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
108
|
+
template: `<usa-reveal effect="bounce-in-up"><h2>Hello</h2></usa-reveal>` })
|
|
109
|
+
export class Hero {}
|
|
110
|
+
```
|
|
150
111
|
|
|
151
|
-
|
|
152
|
-
import { timeline } from 'use-scroll-animate';
|
|
153
|
-
const tl = timeline({ defaults: { duration: 700 } })
|
|
154
|
-
.to('.hero h1', 'fade-up')
|
|
155
|
-
.to('.hero p', 'blur', { at: '-=300' })
|
|
156
|
-
.to('.hero .btn', 'scale', { stagger: 80 });
|
|
157
|
-
await tl.play(); // 完了で resolve。tl.scrub(hero) でスクロール連動
|
|
158
|
-
```
|
|
112
|
+
アニメーションコンポーネントはフレームワーク不要:
|
|
159
113
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
114
|
+
```html
|
|
115
|
+
<script type="module">
|
|
116
|
+
import { defineComponents } from 'motionary/components';
|
|
117
|
+
defineComponents(); // or lazyDefine() from 'motionary/components/lazy'
|
|
118
|
+
</script>
|
|
119
|
+
<usa-card effect="holo">…</usa-card>
|
|
120
|
+
<usa-button deform="gooey">Buy</usa-button>
|
|
121
|
+
<usa-fx effect="confetti" trigger="click"><button>Celebrate</button></usa-fx>
|
|
122
|
+
```
|
|
163
123
|
|
|
164
|
-
##
|
|
124
|
+
## 機能一覧
|
|
165
125
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
-
|
|
169
|
-
-
|
|
126
|
+
| 分野 | 内容 |
|
|
127
|
+
|---|---|
|
|
128
|
+
| **スクロールプリセット** | **214** 種の入場プリセット(コア 33 + `motionary/presets/extended` の 181)、14 系統:フェード、ズーム、3D フリップ・ドア、オーバーシュートスライド、clip-path 図形、ブラー・マスク、バウンス・弾性、色・光、奥行き、グリッチ / タイプライター、スタッガー向け、スクロール連動 `scrub-*`。`timeline()` と 10 種のタイムラインプリセットも |
|
|
129
|
+
| **カード・クリック・ボタン変形** | `<usa-card>` の 10 エフェクト(flip・holo・glass・border glow など)、スタックと 3D カルーセル。クリック系 7 コンポーネント、4 種のボタン変形(squash · wobble · gooey · dent)とアイコンモーフ。登録済みカード / クリックエフェクト 12 種 |
|
|
130
|
+
| **物理・バウンス** | `<usa-spring>`、`<usa-draggable>`(スプリングバック・慣性・スナップ)、`<usa-overscroll>`。`spring()` / `solveSpring()` と 7 種のバネプリセット、物理エフェクト 7 種 |
|
|
131
|
+
| **ページトランジション** | `pageTransition()`・`viewTransition()`・`sharedTransition()`・`flip()`・MPA トランジション、ページエフェクト 7 種(curtain・iris・pixel-dissolve など)、`<usa-dialog>`・`<usa-view-switch>` |
|
|
132
|
+
| **ジェネラティブ背景** | キャンバス背景 6 種(flow-field・voronoi・mesh-gradient・starfield・metaballs・contours)+ 背景要素 9 種(オーロラ・パーティクル・グレイン・Acrylic / Mica など) |
|
|
133
|
+
| **サウンド連動** | `<usa-audio>` と Web Audio のビート検出(`createBeatDetector()`・`onBeat()`)、オーディオビジュアライザー 3 種、任意のエフェクトをビートで発火 |
|
|
134
|
+
| **カーソル・ジェスチャー** | カーソルエフェクト 5 種 + `<usa-cursor>`、fling · twist · long-press でエフェクト(`<usa-gesture-fx>`)、`<usa-swipeable>`・`<usa-pinch-zoom>` |
|
|
135
|
+
| **テーマ** | テーマ 5 種(neon · paper · glass · retro · brutalist)を `<usa-theme>` / `applyTheme()` で、各テーマに専用エフェクト。モーショントークン(`/components/tokens`) |
|
|
136
|
+
| **マイクロインタラクション** | 既製の UI 演出 23 種:copy-success・like-heart・add-to-cart・send-plane・upvote・trash-shake など |
|
|
137
|
+
| **`<usa-player>` とストーリー** | `<usa-player>` は Playground から書き出した JSON アニメーションを再生(キーフレーム・プリセット・エフェクト、load / view / scroll / click トリガー)。`<usa-story>` のストーリーテンプレート 6 種 |
|
|
138
|
+
| **WebGL** | `<usa-shader>`・`<usa-distort>`・`<usa-liquid>`・`<usa-post-fx>` — パーティクル 5 種、ポストエフェクト 9 種(CSS フォールバックと省電力制御付き) |
|
|
170
139
|
|
|
171
|
-
|
|
140
|
+
90 のエフェクトは 1 つのレジストリ(`registerEffect()` / `playEffect()` / `bindEffect()` / `<usa-fx>`、`motionary/components/fx`)を共有し、5.x のパックは `motionary/components/effects` にあります。
|
|
172
141
|
|
|
173
|
-
|
|
142
|
+
### 全 94 コンポーネント
|
|
174
143
|
|
|
175
|
-
|
|
176
|
-
<!-- Svelte:action(svelte の import 不要) -->
|
|
177
|
-
<script>import { scrollAnimate, scrollStagger } from 'use-scroll-animate/svelte';</script>
|
|
178
|
-
<div use:scrollAnimate={{ animation: 'fade-in-up' }}>…</div>
|
|
179
|
-
```
|
|
144
|
+
カテゴリ単位(`motionary/components/cards`)、全部(`motionary/components`)、CSS 遅延読み込みの `/components/lite`、またはページ上のタグだけを読む `lazyDefine()` から選べます。ラッパー:`/components/react`・`/vue`・`/svelte`・`/solid`・`/angular`。
|
|
180
145
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
146
|
+
| エントリ | 要素 |
|
|
147
|
+
|---|---|
|
|
148
|
+
| **スクロール表示** (`/components/reveal`) | `<usa-reveal>` · `<usa-stagger>` · `<usa-scroll-progress>` · `<usa-scrolly>` |
|
|
149
|
+
| **テキスト** (`/components/text`) | `<usa-typewriter>` · `<usa-split-text>` · `<usa-scramble>` · `<usa-counter>` · `<usa-shimmer-text>` · `<usa-text-rotate>` · `<usa-wave-text>` · `<usa-glitch>` · `<usa-gradient-text>` · `<usa-handwriting>` · `<usa-scroll-highlight>` |
|
|
150
|
+
| **インタラクション** (`/components/interaction`) | `<usa-ripple>` · `<usa-magnetic>` · `<usa-tilt>` · `<usa-spotlight>` · `<usa-press>` · `<usa-toggle>` |
|
|
151
|
+
| **フィードバック** (`/components/feedback`) | `<usa-spinner>` · `<usa-skeleton>` · `<usa-progress>` · `<usa-toaster>` · `<usa-check>` |
|
|
152
|
+
| **背景** (`/components/background`) | `<usa-aurora>` · `<usa-particles>` · `<usa-grain>` · `<usa-marquee>` · `<usa-acrylic>` · `<usa-grid-glow>` · `<usa-blobs>` · `<usa-water-ripple>` · `<usa-dot-network>` |
|
|
153
|
+
| **トランジション** (`/components/transitions`) | `<usa-dialog>` · `<usa-accordion>` · `<usa-view-switch>` |
|
|
154
|
+
| **バネ・物理** (`/components/physics`) | `<usa-spring>` · `<usa-draggable>` · `<usa-overscroll>` |
|
|
155
|
+
| **カード** (`/components/cards`) | `<usa-card>` · `<usa-card-stack>` · `<usa-sticky-stack>` · `<usa-carousel-3d>` |
|
|
156
|
+
| **クリック・ボタン** (`/components/click`) | `<usa-click>` · `<usa-button>` · `<usa-icon-morph>` · `<usa-like>` · `<usa-hold>` · `<usa-double-tap>` · `<usa-checkbox>` |
|
|
157
|
+
| **UI キット** (`/components/ui`) | `<usa-tabs>` · `<usa-drawer>` · `<usa-bottom-sheet>` · `<usa-pull-refresh>` · `<usa-fab>` · `<usa-navbar>` · `<usa-slider>` · `<usa-rating>` · `<usa-tooltip>` · `<usa-popover>` · `<usa-badge>` · `<usa-avatar-stack>` |
|
|
158
|
+
| **ページ全体** (`/components/page`) | `<usa-cursor>` · `<usa-fullpage>` · `<usa-loading-bar>` · `<usa-back-to-top>` · `<usa-ambient>` · `<usa-splash>` · `<usa-auto-skeleton>` · `<usa-motion-switch>` |
|
|
159
|
+
| **タイムライン** (`/components/timeline`) | `<usa-timeline>` |
|
|
160
|
+
| **ジェスチャー** (`/components/gesture`) | `<usa-swipeable>` · `<usa-pinch-zoom>` |
|
|
161
|
+
| **SVG** (`/components/svg`) | `<usa-draw>` · `<usa-morph>` · `<usa-mask-reveal>` · `<usa-anim-icon>` |
|
|
162
|
+
| **WebGL** (`/components/webgl`) | `<usa-shader>` · `<usa-distort>` · `<usa-liquid>` · `<usa-post-fx>` |
|
|
163
|
+
| **3D 奥行き** (`/components/depth`) | `<usa-cube>` · `<usa-depth>` |
|
|
164
|
+
| **レイアウト** (`/components/layout`) | `<usa-auto-animate>` · `<usa-masonry>` |
|
|
165
|
+
| **パック** (`/components/packs`) | `<usa-pack>` |
|
|
166
|
+
| **エフェクト登録** (`/components/fx`) | `<usa-fx>` |
|
|
167
|
+
| **エフェクトパック** (`/components/effects`) | `<usa-player>` · `<usa-story>` · `<usa-audio>` · `<usa-theme>` · `<usa-gesture-fx>` |
|
|
168
|
+
|
|
169
|
+
## アクセシビリティと reduced motion
|
|
170
|
+
|
|
171
|
+
- `prefers-reduced-motion: reduce` ではスクロール表示はすぐに表示され(入場・パララックス・スクラブなし)、コンポーネントは落ち着いた状態になります(`staticAlternative()` / `adaptKeyframes()`)。
|
|
172
|
+
- `motionary/components/a11y`:`setMotionSensitivity()` のレベルで点滅・ループ・パララックスを抑制、`announce()` ライブリージョン、`auditMotionA11y()`、`baselineReport()`。`<usa-motion-switch>` はユーザー向けのモーション切替です。
|
|
173
|
+
- 詳細:[docs/accessibility.md](./docs/accessibility.md)。
|
|
174
|
+
|
|
175
|
+
## パフォーマンスとサイズ
|
|
176
|
+
|
|
177
|
+
デフォルトで scroll リスナーなし(IntersectionObserver)、アニメーションはコンポジター上(`transform`・`opacity`・`filter`・`clip-path`)、メインスレッド外のネイティブスクロールタイムライン(`engine: 'css'`)も選べます。全エントリはツリーシェイク可能で、gzip 予算を CI で強制(`size-budget.json`)。6.1 の実測(minify + gzip):
|
|
178
|
+
|
|
179
|
+
| インポート | gzip |
|
|
180
|
+
|---|---:|
|
|
181
|
+
| `import ScrollAnimate from 'motionary'` (default instance) | 5.72 kB |
|
|
182
|
+
| Everything from the main entry | 8.69 kB |
|
|
183
|
+
| `dist/index.umd.js` (CDN) | 8.81 kB |
|
|
184
|
+
| `parallax()` alone | 1.22 kB |
|
|
185
|
+
| `motionary/presets/extended` (181 presets) | 4.69 kB |
|
|
186
|
+
| `motionary/components/reveal` | 4.10 kB |
|
|
187
|
+
| `motionary/components/effects` (8 effect packs) | 26.40 kB |
|
|
188
|
+
| `motionary/components/lite` (every component, CSS on demand) | 68.48 kB |
|
|
189
|
+
| `motionary/components` (every component + CSS) | 85.15 kB |
|
|
190
|
+
| `dist/components.umd.js` (CDN, everything) | 106.75 kB |
|
|
191
|
+
|
|
192
|
+
詳細:[docs/performance.md](./docs/performance.md)。
|
|
193
|
+
|
|
194
|
+
## 対応ブラウザ
|
|
195
|
+
|
|
196
|
+
2023 年以降のエバーグリーンブラウザ:Chrome / Edge ≥ 111、Safari ≥ 16.4、Firefox ≥ 115、WebView2、Electron ≥ 24(Custom Elements・Web Animations・IntersectionObserver・ResizeObserver・constructable stylesheets)。View Transitions とスクロール駆動アニメーションはプログレッシブ(対応時に使用、それ以外は JS)。サーバー(SSR)での import は何もしません。`baselineReport()` で確認できます。
|
|
186
197
|
|
|
187
|
-
|
|
188
|
-
<!-- Web Component:属性は data-sa-* から接頭辞を除いたもの。sa:enter / sa:leave / sa:start / sa:complete / sa:progress イベントを発火 -->
|
|
189
|
-
<script type="module">
|
|
190
|
-
import { defineScrollAnimate } from 'use-scroll-animate/element';
|
|
191
|
-
defineScrollAnimate();
|
|
192
|
-
</script>
|
|
193
|
-
<scroll-animate animation="fade-in-up" duration="800">…</scroll-animate>
|
|
194
|
-
```
|
|
198
|
+
## ドキュメント
|
|
195
199
|
|
|
196
|
-
|
|
200
|
+
- [API リファレンス](./docs/API.md)(英語)— 全エクスポート・オプション・`data-sa-*` 属性
|
|
201
|
+
- [プリセット一覧](./docs/presets.md)(全 214 種)
|
|
202
|
+
- [コンポーネント](./docs/components.md)(全 `<usa-*>` 要素・属性・イベント)
|
|
203
|
+
- [フレームワークと SSR](./docs/frameworks-ssr.md) · [Windows アプリ](./docs/windows-apps.md) · [ハイブリッドアプリ](./docs/hybrid-apps.md)
|
|
204
|
+
- [モーショントークン](./docs/motion-tokens.md) · [AOS からの移行](./docs/migration-from-aos.md) · [GSAP ScrollTrigger からの移行](./docs/migration-from-gsap-scrolltrigger.md)
|
|
205
|
+
- [デモ](./demo/index.html)(全プリセットをクリックで再生)
|
|
197
206
|
|
|
198
|
-
|
|
199
|
-
ScrollAnimate.observe('.card', { animation: 'fade-in-up', exit: true }); // ビューポート外へ出るとき入場を逆再生
|
|
200
|
-
ScrollAnimate.observe('.toast', { animation: 'zoom-in', exit: 'fade-in-down' }); // 別プリセットを逆再生して退場
|
|
201
|
-
import { parallax } from 'use-scroll-animate';
|
|
202
|
-
parallax('.hero-bg', { speed: 0.3 }); // 正:ページより遅い、負:速い。axis: 'x' も可
|
|
203
|
-
```
|
|
207
|
+
## アップグレード
|
|
204
208
|
|
|
205
|
-
- `
|
|
206
|
-
-
|
|
209
|
+
- `use-scroll-animate` から:`npm i motionary` を実行し、import と CDN URL の `use-scroll-animate` を `motionary` に置き換えるだけです(旧パッケージ名も同じリリースを継続)。
|
|
210
|
+
- [6.0 へのアップグレード](./docs/upgrading-6.md)(`npx usa-codemod-6`)· [5.0](./docs/upgrading-5.md)(`npx usa-codemod-5`)· [4.0](./docs/upgrading-4.md) · [3.0](./docs/upgrading-3.md) · [2.0](./docs/deprecations.md)
|
|
211
|
+
- [変更履歴](./CHANGELOG.md)
|
|
207
212
|
|
|
208
|
-
##
|
|
213
|
+
## ロードマップ
|
|
209
214
|
|
|
210
|
-
|
|
211
|
-
|--------|------|---------|-------------|
|
|
212
|
-
| `animation` | `string` \| `string[]` | `'fade-in-up'` | プリセット名またはプリセットの配列 |
|
|
213
|
-
| `duration` | `number` | `600` | アニメーションの長さ (ms) |
|
|
214
|
-
| `delay` | `number` | `0` | アニメーションの遅延 (ms) |
|
|
215
|
-
| `once` | `boolean` | `true` | 一度だけ実行するかどうか |
|
|
216
|
-
| `offset` | `number` | `0` | アニメーションを開始するビューポートのオフセット (px) |
|
|
217
|
-
| `parallax` | `object` | `{}` | パララックス効果の設定 |
|
|
218
|
-
| `stagger` | `number` | `0` | 同じバッチで表示される兄弟要素ごとの追加遅延 (ms) |
|
|
219
|
-
| `onProgress` | `(el, progress) => void` | – | スクロール進捗のコールバック (0–1) |
|
|
220
|
-
| `progressMode` | `'ratio'` \| `'scroll'` | `'ratio'` | 進捗の計算方法:表示比率または本当のスクロール進捗 |
|
|
215
|
+
7.0 まで 1 バージョン 1 PR — パーティクルと流体、テキスト効果、光と質感、3D シーン、モーフィング、トランジション、天気、インタラクティブ物理:[docs/ROADMAP.md](./docs/ROADMAP.md)。
|
|
221
216
|
|
|
222
|
-
##
|
|
217
|
+
## コントリビュートとライセンス
|
|
223
218
|
|
|
224
|
-
|
|
219
|
+
Issue と PR を歓迎します — [CONTRIBUTING.md](./CONTRIBUTING.md) を参照。MIT © HarrisonCN — [LICENSE](./LICENSE)。
|