> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squeditor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Plugins

ScrollSmoother

<Frame>
  <video autoPlay muted loop playsInline className="w-full aspect-video rounded-xl" src="https://mintcdn.com/squeditor/T-nxk1JBSD384buD/media/scroll-smoother.mp4?fit=max&auto=format&n=T-nxk1JBSD384buD&q=85&s=a3821f0ba187b5a1ed56bc406f92d2f6" data-path="media/scroll-smoother.mp4" />
</Frame>

<Card title="See it in action" icon="eye" href="https://demos.gsap.com/demo/smooth-scrolling/" arrow="true" horizontal />

ScrollSmoother provides physically continuous, buttery inertia-based scrolling and native page-level parallax support. In the Squeditor framework, you do**not** need to manually define the wrapper/content divs in your template, nor do you write JavaScript.

Simply attribute the `<body>` tag, and the engine automatically injects the fixed scroll viewports and protects external structural elements appropriately.

**Usage**

Enable ScrollSmoother by passing the configuration via the `data-gsap-smooth` attribute on the `<body>` element. In the standard PHP template, you can control this by defining a `$body_attr` variable before `base.php` is included.

**Basic Example**

```php theme={null}
// In any page template, before including base.php
$body_attr = 'data-gsap-smooth="smooth: 1.5; effects: true"';
```

**When rendered, the HTML behaves like this:**

```html theme={null}
<body data-gsap-smooth="smooth: 1.5; effects: true">
  <!-- The GSAP engine automatically wraps the main content and footer for you. -->
</body>
```

**Parallax Attributes**

With `effects: true` active, simply drop these attributes onto any element within the smoothed container:

```html theme={null}
<!-- Moves 1.2x as fast as normal scroll (foreground) -->
<div data-speed="1.2">Fast Layer</div>

<!-- Moves 0.6x as fast (deep background) -->
<div data-speed="0.6">Slow Layer</div>

<!-- Follows scrolling instantly, but takes 0.5s to snap fully into position -->
<div data-lag="0.5">Trailing Object</div>
```

**Options**

Pass standard ScrollSmoother parameters dynamically through the string configuration.

| Option        | Type                  | Default | Description                                                                                    |
| ------------- | --------------------- | ------- | ---------------------------------------------------------------------------------------------- |
| `smooth`      | `number`              | `1.5`   | The delay time (in seconds) it takes the container to catch up to the native scroll position.  |
| `effects`     | `boolean`             | `true`  | Scans the DOM for `data-speed` and `data-lag` attributes to enable instant automatic parallax. |
| `smoothTouch` | `number` \| `boolean` | `0.1`   | Allows smoothing on touch devices (keep this extremely low if enabled).                        |

## ScrollTrigger

<Frame>
  <video autoPlay muted loop playsInline className="w-full aspect-video rounded-xl" src="https://mintcdn.com/squeditor/HzAJYTeWsSDyCHm8/media/scrolltrigger.mp4?fit=max&auto=format&n=HzAJYTeWsSDyCHm8&q=85&s=7beb4f231f3a2ce6b22d1f306bfc468b" data-path="media/scrolltrigger.mp4" />
</Frame>

<Card title="See it in action" icon="eye" href="https://demos.gsap.com/demo/motionpath-waypoints/" arrow="true" horizontal />

ScrollTrigger natively bridges GSAP animations with viewport scroll position. Squeditor fully integrates ScrollTrigger directly into the primary `data-gsap` attributes, allowing you to trigger, pin, sequence, and scrub timelines purely via HTML.

**Basic Scroll Reveals**

To trigger a standard animation when an element enters the viewport, simply add `scroll: true` to the standard `data-gsap` payload.

```html theme={null}
<div data-gsap="from: {y: 40, opacity: 0}; scroll: true; duration: 1; ease: expo.out">
    Content fades up when it enters the viewport.
</div>
```

If you need a specific starting offset, provide `start`. The default is `top 85%`.

```html theme={null}
<div data-gsap="from: {opacity: 0}; scroll: true; start: top 70%">
    Triggers when the top of the element hits 70% down the screen.
</div>
```

**Advanced Scrubbing and Pinning**

For advanced functionality—like pinning massive structural sections or scrubbing timelines backwards and forwards synced frame-for-frame with the scrollbar—use the wrapper attribute `data-gsap-scroll`.

The `data-gsap-scroll` parent manages the scroll viewport timeline, and the GSAP engines scans the `data-gsap` children inside it to animate them concurrently.

**Scrubbing Timelines**

Links the animation exact duration to the physical scrollbar.

```html theme={null}
<div data-gsap-scroll="start: top 80%; end: bottom 20%; scrub: 1">
    <!-- This child's animation will smoothly reverse if you scroll back up -->
    <div data-gsap="to: {x: 500, rotate: 360}; ease: none">
        Scrubbing box
    </div>
</div>
```

**Pinning Sections**

Great for locking a section in place while interior items transition.

```html theme={null}
<section data-gsap-scroll="pin: true; start: top top; end: +=1500; scrub: true">
    <h2 data-gsap="to: { scale: 50, opacity: 0 }">Zooming hero title</h2>
</section>
```

**Options Reference**

*Child `data-gsap="scroll: true"` options*

| Option          | Type    | Default                 | Description                                                    |
| --------------- | ------- | ----------------------- | -------------------------------------------------------------- |
| `scroll`        | boolean | `false`                 | Instructs the element to wait until it is in viewport to fire. |
| `start`         | string  | `'top 85%'`             | ScrollTrigger start position.                                  |
| `toggleActions` | string  | `'play none none none'` | Playback logic (`onEnter`, `onLeave`, etc.)                    |

*Parent `data-gsap-scroll` options*

| Option       | Type              | Default           | Description                                                                                |
| ------------ | ----------------- | ----------------- | ------------------------------------------------------------------------------------------ |
| `scrub`      | boolean \| number | `false`           | Ties the animation timeline natively to the scrollbar. Numbers add inertia-lag (e.g. `1`). |
| `pin`        | boolean           | `false`           | Locks the element block in space vertically.                                               |
| `start`      | string            | `'top center'`    | Custom trigger start position.                                                             |
| `end`        | string            | `'bottom center'` | Custom trigger ending position. Crucial for determining how long a pin lasts.              |
| `pinSpacing` | boolean           | `true`            | Usually pads the DOM to respect the pinned distance.                                       |

## ScrollTo

<Frame>
  <video autoPlay muted loop playsInline className="w-full aspect-video rounded-xl" src="https://mintcdn.com/squeditor/T-nxk1JBSD384buD/media/scroll-to.mp4?fit=max&auto=format&n=T-nxk1JBSD384buD&q=85&s=2045cf2a1eb8bfb00663d9c232446ec8" data-path="media/scroll-to.mp4" />
</Frame>

<Card title="See it in action" icon="eye" href="https://demos.gsap.com/demo/animate-scroll-position/" arrow="true" horizontal />

Squeditor introduces automated DOM hooks routing straight through the `ScrollTo` plugin purely via the\*\*`data-sq-scrollto`\*\* global interaction.

**Usage**

Assign semantic IDs across HTML elements cleanly over your DOM tree. Immediately target those links without any custom JavaScript event listeners.

**Explicit Section Anchors**

```html theme={null}
<!-- Native targeting strictly off standard valid DOM logic correctly natively -->
<a href="#about" data-sq-scrollto="duration: 1.5; ease: expo.out">
    Skip to About
</a>

<section id="about">
    ...
</section>
```

<Note>
  If `data-sq-scrollto` is missing, you may need to explicitly import `./gsap-modules/scroll-to.js` through `gsap-advanced.js`.
</Note>

**Data Config Properties**

| Payload Variable | Type    | Default          | Reason                                                                       |
| ---------------- | ------- | ---------------- | ---------------------------------------------------------------------------- |
| `duration`       | numeric | `1.5`            | How quickly the window scrolls to the target.                                |
| `ease`           | string  | `'power4.inOut'` | The easing curve applied to the scroll transition.                           |
| `offsetY`        | integer | `0`              | Automatically offset the final scroll position to account for fixed headers. |

## SplitText

<Frame>
  <video autoPlay muted loop playsInline className="w-full aspect-video rounded-xl" src="https://mintcdn.com/squeditor/T-nxk1JBSD384buD/media/split-text.mp4?fit=max&auto=format&n=T-nxk1JBSD384buD&q=85&s=fff4f941d87d5f68c26a30c50867352d" data-path="media/split-text.mp4" />
</Frame>

<Card title="See it in action" icon="eye" href="https://demos.gsap.com/demo/rolling-text/" arrow="true" horizontal />

Instead of utilizing native JavaScript iterations natively, Squeditor wraps GSAP's entire `SplitText` framework in a single\*\*`data-gsap-split`\*\* property designed exclusively for semantic text hierarchies.

<Warning>
  **Never** apply `data-gsap-split` to elements with child HTML tags (like `<strong>` or `<a>`). Plain text headings or semantic `<p>` tags only.
</Warning>

**Usage**

Simply pass the type of split you desire, the transition animation coordinates, and define standard `stagger` offsets to create intricate, complex typographical sequences globally on scroll simply by declaring `<div data-gsap-split="type: chars...">`

**Split by Character**

```html theme={null}
<!-- Animate each character bounding across the timeline on scroll automatically -->
<h1 class="hero-title"
    data-gsap-split="type: chars; from: {x: 100, opacity: 0, rotationY: 180}; stagger: 0.075; duration: 1.25; ease: expo.out; scroll: true">
    Motion Scroll
</h1>
```

**Split by Word or Line**

Using `type: lines` inherently converts structural semantic paragraphs cleanly, adjusting line heights intrinsically to wrap on breakpoints sequentially across the parent container natively.

```html theme={null}
<p class="text-xl"
   data-gsap-split="type: lines; from: {y: 40, opacity: 0}; stagger: 0.1; duration: 1.2; ease: power2.out; scroll: true">
    A declarative powerhouse capable of converting complex nested string logic into unified DOM components without JavaScript manipulation hooks.
</p>
```

**Internal Options Overrides**

| Option        | Type          | Default         | Description                                                                 |
| ------------- | ------------- | --------------- | --------------------------------------------------------------------------- |
| `type`        | string        | `'words,lines'` | Which elements SplitText targets syntactically (`chars`, `words`, `lines`). |
| `from` / `to` | nested string | `undefined`     | Maps transition targets directly dynamically.                               |
| `stagger`     | number        | `0.05`          | Dictates sequential delay logic natively.                                   |

## Typewriter

<Frame>
  <video autoPlay muted loop playsInline className="w-full aspect-video rounded-xl" src="https://mintcdn.com/squeditor/T-nxk1JBSD384buD/media/typewriting.mp4?fit=max&auto=format&n=T-nxk1JBSD384buD&q=85&s=51ab3572b9c5227890e05d2bb718a344" data-path="media/typewriting.mp4" />
</Frame>

<Card title="See it in action" icon="eye" href="https://demos.gsap.com/demo/morph-between-svg-shapes/" arrow="true" horizontal />

Squeditor securely binds the GSAP `TextPlugin` specifically through the\*\*`data-gsap-text`\*\* payload natively. Use this dynamically for typing sequences explicitly over nested structural loops without writing custom callbacks mechanically natively.

**Usage**

Simply attach `data-gsap-text="to: {text: {value: '...'}}"` natively to any empty or prepopulated span layout natively in your DOM.

```html theme={null}
<div class="relative p-12 rounded-3xl min-h-[460px]">
    <!-- Squeditor dynamically injects the nested value string progressively over duration implicitly -->
    <span data-gsap-text="to: {text: {value: 'Initializing terminal injection gracefully natively...', delimiter: ''}}; duration: 1.5; scroll: true"></span>
    
    <!-- Optional: Sync a blinking GSAP cursor natively directly alongside the data payload -->
    <span class="absolute w-1 h-8 bg-indigo-400" data-gsap="to: {opacity: 0, repeat: -1, yoyo: true}; duration: 0.5"></span>
</div>
```

**Parameter Parsing Reference**

Squeditor’s deep JS payload string parses nested objects organically cleanly internally explicitly. Ensure your `'value'` is perfectly single-quoted cleanly inherently safely across HTML nodes natively.

| Target Option | Type    | Example           | Description                                                                                |
| ------------- | ------- | ----------------- | ------------------------------------------------------------------------------------------ |
| `value`       | string  | `'System Online'` | The full target string meant to append internally cleanly gracefully natively.             |
| `delimiter`   | string  | `''`              | Controls substring segmentation spacing natively cleanly natively natively.                |
| `padSpace`    | boolean | `true`            | Prevents rapid layout shifts mechanically over block-rendering layout structures natively. |

## DrawSVG

<Frame>
  <video autoPlay muted loop playsInline className="w-full aspect-video rounded-xl" src="https://mintcdn.com/squeditor/T-nxk1JBSD384buD/media/draw-svg.mov?fit=max&auto=format&n=T-nxk1JBSD384buD&q=85&s=3f5ae0807ea29bb800f8ebab41145a47" data-path="media/draw-svg.mov" />
</Frame>

<Card title="See it in action" icon="eye" href="https://demos.gsap.com/demo/draw-a-path/" arrow="true" horizontal />

Squeditor natively bundles GSAP's robust `DrawSVGPlugin` to animate vector outline strokes smoothly. Use the targeted\*\*`data-gsap-draw`\*\* attribute on any generic `<path>`, `<circle>`, `<line>`, `<polyline>`, or `<polygon>` layer natively.

**Usage**

Attach the exact mapping coordinates you want DrawSVG to natively follow directly into the strings. Squeditor parses this via `data-gsap-draw` flawlessly.

**Basic Draw**

```html theme={null}
<svg viewBox="0 0 1200 1200"
    data-gsap-draw="from: {drawSVG: '0% 0%'}; to: {drawSVG: '0% 100%'}; duration: 3; ease: power3.inOut" 
    stroke="currentColor">
    <circle cx="600" cy="600" r="300" stroke-width="1" />
</svg>
```

\*\*Native Scroll Scrubbing \*\*

Combining this with the parent `data-gsap-scroll="scrub: 1"` logic dynamically generates precise UI tracing that seamlessly integrates physically with scrollbar movement explicitly natively.

```html theme={null}
<div class="flex-1 w-full" data-gsap-scroll="start: top 80%; end: bottom 20%; scrub: 1">
    <svg viewBox="0 0 400 400" class="stroke-amber-400 fill-none" stroke-width="2">
        <!-- Scrub timeline strictly over this path directly via HTML properties -->
        <path d="M50 350 C 50 200, 350 200, 350 50" 
            data-gsap-draw="from: {drawSVG: '0% 0%'}; to: {drawSVG: '0% 100%'}; ease: none" />
    </svg>
</div>
```

**Options Configuration**

| Option    | Type           | Default  | Description                                                    |
| --------- | -------------- | -------- | -------------------------------------------------------------- |
| `drawSVG` | numeric string | `'100%'` | Define precise path logic ranges (`'0% 50%'`, `'20 80'`).      |
| `scroll`  | boolean        | `false`  | Instructs the path to wait out viewport proximity organically. |

## MorphSVG

<Frame>
  <video autoPlay muted loop playsInline className="w-full aspect-video rounded-xl" src="https://mintcdn.com/squeditor/T-nxk1JBSD384buD/media/morph-svg.mov?fit=max&auto=format&n=T-nxk1JBSD384buD&q=85&s=efa9693b3e2182f0310898f2e6a09de7" data-path="media/morph-svg.mov" />
</Frame>

<Card title="See it in action" icon="eye" href="https://demos.gsap.com/demo/morph-between-svg-shapes/" arrow="true" horizontal />

Squeditor natively bundles the `MorphSVG` framework. Utilizing the custom string parser, any standard `<path>` edge can cleanly convert into another existing structure simply by targeting its CSS ID.

**Usage**

Pass a valid SVG `$id` or standard CSS string selector into the `morphSVG` property on the custom\*\*`data-gsap-morph`\*\* attribute.

**Basic Trigger**

```html theme={null}
<svg viewBox="0 0 400 400" class="stroke-fuchsia-300">
    <!-- The target shape to morph into (hidden) -->
    <path id="morph-target" d="M200 50 L350 350 L50 350 Z" class="hidden" />
    
    <!-- The starting shape that animates -->
    <path d="M50 50 L350 50 L350 350 L50 350 Z" 
        data-gsap-morph="to: {morphSVG: '#morph-target'}; duration: 2; ease: power2.inOut; scroll: true" />
</svg>
```

<Note>
  MorphSVG natively only functions on raw `<path>` components. To morph basic geometry logic (`<rect>`, `<circle>`, etc.), utilize the `convertToPath` utility or explicitly code the vectors manually as `<path>` curves beforehand.
</Note>

**Options**

Standard GSAP vars are seamlessly inherited. Only target raw paths on raw paths.

| Option       | Type             | Default     | Description                                                                                                          |
| ------------ | ---------------- | ----------- | -------------------------------------------------------------------------------------------------------------------- |
| `morphSVG`   | string           | `undefined` | Must target an existing DOM node that contains the intended destination `<path>`.                                    |
| `shapeIndex` | string \| number | `'auto'`    | Shifts starting point mappings natively to prevent chaotic vector twisting. Set mathematically, or utilize `'auto'`. |
| `type`       | string           | `'linear'`  | If vectors must twist cleanly naturally instead of direct morphing, set this string explicitly to `'rotational'`.    |
