gsap-plugins
できること
このツールは、GSAPライブラリの「プラグイン」(追加機能)を使う手助けをします。プラグインを登録することで、ページを特定の位置までスクロールさせるScrollToPlugin、レイアウトの変化をアニメーションさせるFlip、要素をドラッグ可能にするDraggableなどの機能を使えるようになります。
使う場面
- ✓コードにGSAPのプラグインを登録したいとき。
- ✓特定のページ位置へスクロールするスクロールアニメーションを作るとき。
- ✓画面上の要素をドラッグできるようにしたいとき。
スキルのリンク
https://github.com/nexu-io/open-design/blob/main/skills/gsap-plugins/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“GSAPにScrollToPluginを登録するにはどうすればいいですか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
`gsap.registerPlugin()`関数を使って、使用する追加のプラグインをGSAPに伝えます。その後、各プラグイン固有の関数を呼び出せるようになります。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
GSAP Plugins
Curated from GreenSock's official GSAP skills: https://github.com/greensock/gsap-skills
When to Use This Skill
Apply when using or reviewing code that uses GSAP plugins: registering plugins, scroll-to, flip/FLIP animations, draggable elements, SVG (DrawSVG, MorphSVG, MotionPath), text (SplitText, ScrambleText), physics, easing plugins (CustomEase, EasePack, CustomWiggle, CustomBounce), or GSDevTools. ScrollTrigger has its own skill (gsap-scrolltrigger).
Related skills: For core tweens use gsap-core; for ScrollTrigger use gsap-scrolltrigger; for React use gsap-react.
Licensing & Install (important)
Every GSAP plugin is free, including for commercial use. Since Webflow's acquisition of GSAP, Club GSAP is no longer a paid tier and no plugin requires a membership, license key, or auth token — this includes formerly Club-only plugins (SplitText, MorphSVG, etc.).
- ✅ Install everything from the public
gsapnpm package:npm install gsap. All plugins are included — import them asgsap/SplitText,gsap/MorphSVGPlugin, etc. - ❌ Do not generate an
.npmrcwith a GreenSock auth token, suggest the privatenpm.greensock.comregistry, or tell users to sign up for Club GSAP to access a plugin. Those instructions are outdated.
Registering Plugins
Register each plugin once so GSAP (and bundlers) know to include it. Use gsap.registerPlugin() with every plugin used in the project:
import gsap from "gsap";
import { ScrollToPlugin } from "gsap/ScrollToPlugin";
import { Flip } from "gsap/Flip";
import { Draggable } from "gsap/Draggable";
gsap.registerPlugin(ScrollToPlugin, Flip, Draggable);
- ✅ Register before using the plugin in any tween or API call.
- ✅ In React, register at top level or once in the app (e.g. before first useGSAP); do not register inside a component that re-renders. useGSAP is a plugin that needs to be registered before use.
Scroll
ScrollToPlugin
Animates scroll position (window or a scrollable element). Use for “scroll to element” or “scroll to position” without ScrollTrigger.
gsap.registerPlugin(ScrollToPlugin);
gsap.to(window, { duration: 1, scrollTo: { y: 500 } });
gsap.to(window, { duration: 1, scrollTo: { y: "#section", offsetY: 50 } });
gsap.to(scrollContainer, { duration: 1, scrollTo: { x: "max" } });
ScrollToPlugin — key config (scrollTo object):
| Option | Description |
|---|---|
x, y |
Target scroll position (number), or "max" for maximum |
element |
Selector or element to scroll to (for scroll-into-view) |
offsetX, offsetY |
Offset in pixels from the target position |
ScrollSmoother
Smooth scroll wrapper (smooths native scroll). Requires ScrollTrigger and a specific DOM structure (content wrapper + smooth wrapper). Use when smooth, momentum-style scroll is needed. See GSAP docs for setup; register after ScrollTrigger. DOM structure would look like:
<body>
<div id="smooth-wrapper">
<div id="smooth-content">
<!--- ALL YOUR CONTENT HERE --->
</div>
</div>
<!-- position: fixed elements can go outside --->
</body>
DOM / UI
Flip
Capture state with Flip.getState(), then apply changes (e.g. layout or class changes), then use Flip.from() to animate from the previous state to the new state (FLIP: First, Last, Invert, Play). Use when animating between two layout states (lists, grids, expanded/collapsed).
gsap.registerPlugin(Flip);
const state = Flip.getState(".item");
// change DOM (reorder, add/remove, change classes)
Flip.from(state, { duration: 0.5, ease: "power2.inOut" });
Flip — key config (Flip.from vars):
| Option | Description |
|---|---|
absolute |
Use position: absolute during the flip (default: false) |
nested |
When true, only the first level of children is measured (better for nested transforms) |
scale |
When true, scale elements to fit (avoids stretch); default true |
simple |
When true, only position/scale are animated (faster, less accurate) |
duration, ease |
Standard tween options |
More information
https://gsap.com/docs/v3/Plugins/Flip
Draggable
Makes elements draggable, spinnable, or throwable with mouse/touch. Use for sliders, cards, reorderable lists, or any drag interaction.
gsap.registerPlugin(Draggable, InertiaPlugin);
…
よくある質問
GSAPのプラグインはすべて有料ですか?
いいえ、GSAPのプラグインはすべて無料で、商用利用も含めて使えます。どのプラグインを使うにもライセンスやサブスクリプションはもう必要ありません。
プラグインは別々にインストールする必要がありますか?
いいえ、すべてのプラグインはGSAP本体のパッケージに含まれています。コード内でインポートして登録するだけで使えます。
ScrollToPluginとScrollTriggerの違いは何ですか?
ScrollToPluginは、ページのスクロール位置を特定の地点まで動かすアニメーションに使います。ScrollTriggerはより複雑で、スクロール位置をきっかけにアニメーションを開始させることができます。
詳細
作者による元の説明
Official GSAP skill for GSAP plugins — registration, ScrollToPlugin, ScrollSmoother, Flip, Draggable, Inertia, Observer, SplitText, ScrambleText, SVG and physics plugins, CustomEase, EasePack, CustomWiggle, CustomBounce, GSDevTools. Use when the user asks about a GSAP plugin, scroll-to, flip animations, draggable, SVG drawing, or plugin registration.
repo: nexu-io/open-design
人気
- GitHubのスター
- 101k
- ランキング
- #1182
- ライセンス
- Apache-2.0
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
sample-plugin
101kエージェントがテスト用のメタデータファイルを作成できるようにします。さまざまな状況でコードが正しく動作することを確認する助けになります。
aster-atelier
101kエージェントが、クラシックな雰囲気のアート系ウェブサイトを作成できるようにします。映画のような雰囲気を出すために、洗練された画像、青い空、セリフ体のフォントを使用します。
audio-jingle
101kエージェントがジングルや効果音などのオーディオを生成できるようにします。音楽や音声を作成し、その結果をオーディオファイルとして保存できます。
blog-post
101kエージェントが長文の記事やブログ記事を書けるようにします。画像、引用、著者情報を入れるスペースも含まれています。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。