@datainkio/textparty
v0.1.0
Published
TextParty: GSAP-powered text effects (ESM-only).
Readme
TextParty
GSAP-powered text effects (ESM-only).
Install
npm i textparty
npm i gsapgsapis a peer dependency.- Some effects require GSAP plugins like
SplitText,CustomEase,CustomWiggle,MorphSVGPlugin. Those are not bundled. Provide them from your app.
Usage
import { configure, roll } from "textparty";
// Optional: provide plugins used by specific effects
// (Only configure the plugins you actually use.)
configure({
SplitText,
CustomEase,
CustomWiggle,
MorphSVGPlugin,
});
const tl = roll(document.querySelector("#headline"), {
id: "headline-roll",
duration: 0.6,
stagger: 0.05,
});Effect imports
Top-level API:
import { gel, radar, roll, fill, seventies, morph } from "textparty";Direct effect imports:
import { TextRoll, TextRadar } from "textparty/effects";Browser-only
TextParty effects currently assume a browser DOM (document, window).
Publishing (maintainers)
- Bump version:
npm version patch|minor|major - Publish:
npm publish
