Token导航 LogoToken导航

Agent Skill · 前端设计

gsap-plugins(gsap 插件)

gsap-plugins 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

gsap-plugins 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 8,445。

总安装 287周安装 8GitHub Stars 3,087下载 65核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gsap-plugins(gsap 插件)
来源仓库:https://github.com/calesthio/openmontage
仓库路径:skills/gsap-plugins
安装命令:
npx skills add https://github.com/calesthio/openmontage --skill gsap-plugins
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/calesthio/openmontage --skill gsap-plugins

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

gsap-plugins 涵盖 ScrollTrigger、Draggable、Flip 等扩展插件的使用规范。它适用于滚动锚定、元素拖拽与状态翻转动画,需显式注册插件实例。使用时避免重复注册,推荐在入口文件统一初始化所有所需插件。与 core 和 timeline 技能配合,构建复杂交互与序列动画系统。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/gsap-plugins

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/calesthio/openmontage --skill gsap-plugins;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

gsap-plugins 怎么安装?

在终端执行 npx skills add https://github.com/calesthio/openmontage --skill gsap-plugins。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

gsap-plugins 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

gsap-plugins 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

gsap-plugins 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

gsap-plugins 用的人多吗?

公开数据是累计安装 287 次,近一周安装 8 次,下载 65 次,GitHub 3,087 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

gsap-plugins 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 来源仓库有 3,087 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
gsap-plugins

gsap 插件 · 本页

2873,087需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

GSAP Plugins

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.

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):

OptionDescription
x, yTarget scroll position (number), or "max" for maximum
elementSelector or element to scroll to (for scroll-into-view)
offsetX, offsetYOffset 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):

OptionDescription
absoluteUse position: absolute during the flip (default: false)
nestedWhen true, only the first level of children is measured (better for nested transforms)
scaleWhen true, scale elements to fit (avoids stretch); default true
simpleWhen true, only position/scale are animated (faster, less accurate)
duration, easeStandard 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);

Draggable.create(".box", { type: "x,y", bounds: "#container", inertia: true });
Draggable.create(".knob", { type: "rotation" });

Draggable — key config options:

OptionDescription
type"x", "y", "x,y", "rotation", "scroll"
boundsElement, selector, or {minX, maxX, minY, maxY} to constrain drag
inertiatrue to enable throw/momentum (requires InertiaPlugin)
edgeResistance0–1; resistance when dragging past bounds
cursorCSS cursor during drag
onDragStart, onDrag, onDragEndCallbacks; receive event and target
onThrowUpdate, onThrowCompleteCallbacks when inertia is active

Inertia (InertiaPlugin)

Works with Draggable for momentum after release, or track the inertia/velocity of any property of any object so that it can then seamlessly glide to a stop using a simple tween. Register with Draggable when using inertia: true:

gsap.registerPlugin(Draggable, InertiaPlugin);
Draggable.create(".box", { type: "x,y", inertia: true });

Or track velocity of a property:

InertiaPlugin.track(".box", "x");

Then use "auto" to continue the current velocity and glide to a stop:

gsap.to(obj, { inertia: { x: "auto" } });

Observer

Normalizes pointer and scroll input across devices. Use for swipe, scroll direction, or custom gesture logic without tying directly to scroll position like ScrollTrigger.

gsap.registerPlugin(Observer);

Observer.create({
  target: "#area",
  onUp: () => {},
  onDown: () => {},
  onLeft: () => {},
  onRight: () => {},
  tolerance: 10
});

Observer — key config options:

OptionDescription
targetElement or selector to observe
onUp, onDown, onLeft, onRightCallbacks when swipe/scroll passes tolerance in that direction
tolerancePixels before direction is detected; default 10
type"touch", "pointer", or "wheel" (default: "touch,pointer")

Text

SplitText

Splits an element’s text into characters, words, and/or lines (each in its own element) for staggered or per-unit animation. Use when animating text character-by-character, word-by-word, or line-by-line. Returns an instance with chars, words, lines (and masks when mask is set). Restore original markup with revert() or let gsap.context() revert. Integrates with gsap.context(), matchMedia(), and useGSAP(). API: SplitText.create(target, vars) (target = selector, element, or array).

gsap.registerPlugin(SplitText);

const split = SplitText.create(".heading", { type: "words, chars" });
gsap.from(split.chars, { opacity: 0, y: 20, stagger: 0.03, duration: 0.4 });
// later: split.revert() or let gsap.context() cleanup revert

With onSplit() (v3.13.0+), animations run on each split and on re-split when autoSplit is used; returning a tween/timeline from onSplit() lets SplitText clean up and sync progress on re-split:

SplitText.create(".split", {
  type: "lines",
  autoSplit: true,
  onSplit(self) {
    return gsap.from(self.lines, { y: 100, opacity: 0, stagger: 0.05, duration: 0.5 });
  }
});

SplitText — key config (SplitText.create vars):

OptionDescription
typeComma-separated: "chars", "words", "lines". Default "chars,words,lines". Only split what is needed (e.g. "words, chars" if not using lines) for performance. Avoid chars-only without words/lines or use smartWrap: true to prevent odd line breaks.
charsClass, wordsClass, linesClassCSS class on each split element. Append "++" to add an incremented class (e.g. linesClass: "line++" → line1, line2, …).
aria"auto" (default), "hidden", or "none". Accessibility: "auto" adds aria-label on the split element and aria-hidden on line/word/char elements so screen readers read the label; "hidden" hides all from readers; "none" leaves aria unchanged. Use "none" plus a screen-reader-only duplicate if nested links/semantics must be exposed.
autoSplitWhen true, reverts and re-splits when fonts finish loading or when the element width changes (and lines are split), avoiding wrong line breaks. Animations must be created inside onSplit() so they target the newly split elements; return the animation from onSplit() for automatic cleanup and time-sync on re-split.
onSplit(self)Callback when split completes (and on each re-split if autoSplit is true). Receives the SplitText instance. Returning a GSAP tween or timeline enables automatic revert/sync of that animation when re-splitting.
mask"lines", "words", or "chars". Wraps each unit in an extra element with overflow: clip for mask/reveal effects. Only one type; access wrappers on the instance’s masks array (or use class -mask if a class is set).
tagWrapper element tag; default "div". Use "span" for inline (note: transforms like rotation/scale may not render on inline elements in some browsers).
deepSliceWhen true (default), nested elements (e.g. <strong>) that span multiple lines are subdivided so lines don’t stretch vertically. Only applies when splitting lines.
ignoreSelector or element(s) to leave unsplit (e.g. ignore: "sup").
smartWrapWhen splitting chars only, wraps words in a white-space: nowrap span to avoid mid-word line breaks. Ignored if words or lines are split. Default false.
wordDelimiterWord boundary: string (default " "), RegExp, or {delimiter: RegExp, replaceWith: string} for custom splitting (e.g. zero-width joiner for hashtags, or non-Latin).
prepareText(text, parent)Function that receives raw text and parent element; return modified text before splitting (e.g. to insert break markers for languages without spaces).
propIndexWhen true, adds a CSS variable with index on each split element (e.g. --word: 1, --char: 2).
reduceWhiteSpaceCollapse consecutive spaces; default true. From v3.13.0 also honors line breaks and can insert <br> for <pre>.
onRevertCallback when the instance is reverted.

Tips: Split only what is animated (e.g. skip chars if only animating words). For custom fonts, split after they load (e.g. document.fonts.ready.then(...)) or use autoSplit: true with onSplit(). To avoid kerning shift when splitting chars, use CSS font-kerning: none; text-rendering: optimizeSpeed;. Avoid text-wrap: balance; it can interfere with splitting. SplitText does not support SVG <text>.

Learn more: SplitText

ScrambleText

Animates text with a scramble/glitch effect. Use when revealing or transitioning text with a scramble.

gsap.registerPlugin(ScrambleTextPlugin);

gsap.to(".text", {
  duration: 1,
  scrambleText: { text: "New message", chars: "01", revealDelay: 0.5 }
});

SVG

DrawSVG (DrawSVGPlugin)

Reveals or hides the stroke of SVG elements by animating stroke-dashoffset / stroke-dasharray. Works on <path>, <line>, <polyline>, <polygon>, <rect>, <ellipse>. Use when “drawing” or “erasing” strokes.

drawSVG value: Describes the visible segment of the stroke along the path (start and end positions), not “animate from A to B over time.” Format: "start end" in percent or length. Examples: "0% 100%" = full stroke; "20% 80%" = stroke only between 20% and 80% (gaps at both ends). The tween animates from the element’s current segment to the target segment — e.g. gsap.to("#path", {drawSVG: "0% 100%"}) goes from whatever it is now to full stroke. Single value (e.g. 0, "100%") means start is 0: "100%" is equivalent to "0% 100%".

Required: The element must have a visible stroke — set stroke and stroke-width in CSS or as SVG attributes; otherwise nothing is drawn.

gsap.registerPlugin(DrawSVGPlugin);

// draw from nothing to full stroke
gsap.from("#path", { duration: 1, drawSVG: 0 });
// or explicit segment: from 0–0 to 0–100%
gsap.fromTo("#path", { drawSVG: "0% 0%" }, { drawSVG: "0% 100%", duration: 1 });
// stroke only in the middle (gaps at ends)
gsap.to("#path", { duration: 1, drawSVG: "20% 80%" });

Caveats: Only affects stroke (not fill). Prefer single-segment <path> elements; multi-segment paths can render oddly in some browsers. Contents of <use> cannot be visually changed. DrawSVGPlugin.getLength(element) and DrawSVGPlugin.getPosition(element) return stroke length and current position.

Learn more: DrawSVG

MorphSVG (MorphSVGPlugin)

Morphs one SVG shape into another by animating the d attribute (path data). Start and end shapes do not need the same number of points — MorphSVG converts to cubic beziers and adds points as needed. Use for icon-to-icon morphs, shape transitions, or path-based animations. Works on <path>, <polyline>, and <polygon>; <circle>, <rect>, <ellipse>, and <line> are converted internally or via MorphSVGPlugin.convertToPath(selector | element) (replaces the element in the DOM with a <path>).

morphSVG value: Can be a selector (e.g. "#lightning"), an element, raw path data (e.g. "M47.1,0.8 73.3,0.8..."), or for polygon/polyline a points string (e.g. "240,220 240,70 70,70 70,220"). For full config use the object form with shape as the only required property.

gsap.registerPlugin(MorphSVGPlugin);

// convert primitives to path first if needed:
MorphSVGPlugin.convertToPath("circle, rect, ellipse, line");

gsap.to("#diamond", { duration: 1, morphSVG: "#lightning", ease: "power2.inOut" });
// object form:
gsap.to("#diamond", {
  duration: 1,
  morphSVG: { shape: "#lightning", type: "rotational", shapeIndex: 2 }
});

MorphSVG — key config (morphSVG object):

OptionDescription
shape*(Required.)* Target shape: selector, element, or raw path string.
type"linear" (default) or "rotational". Rotational uses angle/length interpolation and can avoid kinks mid-morph; try it when linear looks wrong.
mapHow segments are matched: "size" (default), "position", or "complexity". Use when start/end segments don’t line up; if none work, split into multiple paths and morph each.
shapeIndexOffsets which point in the start path maps to the first point in the end path (avoids shape “crossing over” or inverting). Number for single-segment paths; array for multi-segment (e.g. [5, 1, -8]). Negative reverses that segment. Use shapeIndex: "log" once to log the auto-calculated value, then paste the number/array into the tween. findShapeIndex(start, end) (separate utility) provides an interactive UI to find a good value. Only applies to closed paths.
smooth(v3.14+). Adds smoothing points. Number (e.g. 80), "auto", or object: `{points: 40 \"auto", redraw: true \false, persist: true \false}. redraw: false keeps original anchors (perfect fidelity, less even spacing). persist: false` removes added points when the tween ends. Use when the default morph looks jagged or unnatural.
curveModeBoolean (v3.14+). Interpolates control-handle angle/length instead of raw x/y to avoid kinks on curves. Try if a morph has a mid-morph kink.
originRotation origin for type: "rotational". String: "50% 50%" (default) or "20% 60%, 35% 90%" for different start/end origins.
precisionDecimal places for output path data; default 2.
precompileArray of precomputed path strings (or use precompile: "log" once, copy from console). Skips expensive startup calculations; use for very complex morphs. Only for <path> (convert polygon/polyline first).
renderFunction(rawPath, target) called each update — e.g. draw to canvas. RawPath is an array of segments (each segment = array of alternating x,y cubic bezier coords).
updateTargetWhen using render (e.g. canvas-only), set updateTarget: false so the original <path> is not updated. MorphSVGPlugin.defaultUpdateTarget sets default.

Utilities: MorphSVGPlugin.convertToPath(selector | element) converts circle/rect/ellipse/line/polygon/polyline to <path> in the DOM. MorphSVGPlugin.rawPathToString(rawPath) and stringToRawPath(d) convert between path strings and raw arrays. The plugin stores the original d on the target (e.g. for tweening back: morphSVG: "#originalId" or the same element).

Tips: For twisted or inverted morphs, set shapeIndex (use "log" or findShapeIndex()). For multi-segment paths, shapeIndex is an array (one value per segment). Precompile only when the first frame is slow; it does not fix jank during the tween (simplify the SVG or reduce size if needed).

Learn more: MorphSVG

MotionPath (MotionPathPlugin)

Animates an element along an SVG path. Use when moving an object along a path (e.g. a curve or custom route).

gsap.registerPlugin(MotionPathPlugin);

gsap.to(".dot", {
  duration: 2,
  motionPath: { path: "#path", align: "#path", alignOrigin: [0.5, 0.5] }
});

MotionPath — key config (motionPath object):

OptionDescription
pathSVG path element, selector, or path data string
alignPath element or selector to align the target to
alignOrigin[x, y] origin (0–1); default [0.5, 0.5]
autoRotateRotate element to follow path tangent
curviness0–2; path smoothing

MotionPathHelper

Visual editor for MotionPath (alignment, offset). Use during development to tune path alignment.

gsap.registerPlugin(MotionPathPlugin, MotionPathHelperPlugin);

const helper = MotionPathHelper.create(".dot", "#path", { end: 0.5 });
// adjust in UI, then use helper.path or helper.getProgress() in your animation

Easing

CustomEase

Custom easing curves (cubic-bezier or SVG path). Use when a built-in ease is not enough. Basic usage is covered in gsap-core; register when using:

gsap.registerPlugin(CustomEase);
const ease = CustomEase.create("name", ".17,.67,.83,.67");
gsap.to(".el", { x: 100, ease: ease, duration: 1 });

EasePack

Adds more named eases (e.g. SlowMo, RoughEase, ExpoScaleEase). Register and use the ease names in tweens.

CustomWiggle

Wiggle/shake easing. Use when a value should “wiggle” (multiple oscillations).

CustomBounce

Bounce-style easing with configurable strength.

Physics

Physics2D (Physics2DPlugin)

2D physics (velocity, angle, gravity). Use when animating with simple physics (e.g. projectiles, bouncing).

gsap.registerPlugin(Physics2DPlugin);

gsap.to(".ball", {
  duration: 2,
  physics2D: {
    velocity: 250,
    angle: 80,
    gravity: 500
  }
});

PhysicsProps (PhysicsPropsPlugin)

Applies physics to property values. Use for physics-driven property animation.

gsap.registerPlugin(PhysicsPropsPlugin);

gsap.to(".obj", {
  duration: 2,
  physicsProps: {
    x: { velocity: 100, end: 300 },
    y: { velocity: -50, acceleration: 200 }
  }
});

Development

GSDevTools

UI for scrubbing timelines, toggling animations, and debugging. Use during development only; do not ship. Register and create an instance with a timeline reference.

gsap.registerPlugin(GSDevTools);
GSDevTools.create({ animation: tl });

Other

Pixi (PixiPlugin)

Integrates GSAP with PixiJS for animating Pixi display objects. Register when animating Pixi objects with GSAP.

gsap.registerPlugin(PixiPlugin);

const sprite = new PIXI.Sprite(texture);
gsap.to(sprite, { pixi: { x: 200, y: 100, scale: 1.5 }, duration: 1 });

Best practices

  • ✅ Register every plugin used with gsap.registerPlugin() before first use.
  • ✅ Use Flip.getState() → DOM change → Flip.from() for layout transitions; use Draggable + InertiaPlugin for drag with momentum.
  • ✅ Revert plugin instances (e.g. SplitTextInstance.revert()) when components unmount or elements are removed.

Do Not

  • ❌ Use a plugin in a tween or API without registering it first (gsap.registerPlugin()).
  • ❌ Ship GSDevTools or development-only plugins to production.

Learn More

https://gsap.com/docs/v3/Plugins/

平台分布

Codex

34.86%
按下载量换算23

Claude

32.24%
按下载量换算21

Cursor

17.36%
按下载量换算11

Gemini CLI

9.46%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills