> ## 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.

# Built-in Modules

## Magic Cursor

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

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

*Attribute: `data-sq-cursor`*

The Magic Cursor module replaces the default system pointer with a custom interactive dot and following circle. The cursor scales up when hovering over interactive elements such as links and buttons.

**Usage**

Simply add `data-sq-cursor` to the `<body>` element. In the Squeditor framework, you can enable this globally or per page by setting the variable `$enable_cursor = true` in the PHP template.

**Basic example**

```html theme={null}
<body data-sq-cursor>
  <!-- Page content -->
</body>
```

**Advanced example with options**

```html theme={null}
<body data-sq-cursor="size: 40; color: #6366f1; blend: difference; scale-on-hover: 2.5">
  <!-- Page content -->
</body>
```

**Options**

| Option           | Type   | Default    | Description                                                                        |
| ---------------- | ------ | ---------- | ---------------------------------------------------------------------------------- |
| `size`           | number | `32`       | Diameter of the cursor's outer circle in pixels.                                   |
| `color`          | string | `#000000`  | Hex, RGB, or standard CSS color value.                                             |
| `blend`          | string | `'normal'` | CSS `mix-blend-mode` (e.g., `'difference'`, `'multiply'`).                         |
| `scale-on-hover` | number | `2`        | Multiplier for how large the cursor grows when hovering over interactive elements. |

**Interactive Elements Check**

The cursor automatically grows when hovering over elements matching the following selectors:

* `a`
* `button`
* `[data-sq-cursor-hover]`
* `input`
* `label`

***

## Cursor Preview

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

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

*Attribute: `data-sq-preview`*

The **Cursor Tracking Image Preview** module reveals an image that tracks the mouse movement when hovering over list items. This is widely used for portfolio lists, team directories, and visual indices.

**Usage**

Apply `data-sq-preview` to the wrapper parent element (e.g., a `<ul>`), and then give each child element a `data-preview-src` pointing to the image URL.

**Basic Example**

```html theme={null}
<ul data-sq-preview>
  <li data-preview-src="/images/project-1.jpg" data-preview-alt="Project Alpha">
    <a href="/project-1">Project Alpha</a>
  </li>
  <li data-preview-src="/images/project-2.jpg" data-preview-alt="Project Beta">
    <a href="/project-2">Project Beta</a>
  </li>
  <li data-preview-src="/images/project-3.jpg" data-preview-alt="Project Gamma">
    <a href="/project-3">Project Gamma</a>
  </li>
</ul>
```

**PHP Component Example**

```php theme={null}
<ul class="sq-preview-list" data-sq-preview>
  <?php foreach ($projects as $project): ?>
    <li data-preview-src="<?= htmlspecialchars($project['image']) ?>"
        data-preview-alt="<?= htmlspecialchars($project['title']) ?>">
      <a href="<?= htmlspecialchars($project['url']) ?>">
        <?= htmlspecialchars($project['title']) ?>
      </a>
    </li>
  <?php endforeach; ?>
</ul>
```

**Options**

These attributes are added to the *child* elements of the `data-sq-preview` wrapper.

| Attribute          | Type   | Required | Description                                              |
| ------------------ | ------ | -------- | -------------------------------------------------------- |
| `data-preview-src` | string | **Yes**  | Absolute or relative URL to the image to preview.        |
| `data-preview-alt` | string | No       | The `alt` text attribute applied to the generated image. |

***

## Infinite Loop Panels

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

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

*Attribute: `data-sq-loop-panels`*

This module stacks full-height sections naturally. As you scroll, each new panel snaps into the viewport, layering atop the previous section.

**Usage**

Apply `data-sq-loop-panels` to a wrapper. Its direct children become the panels.

**Basic Example**

```html theme={null}
<div data-sq-loop-panels>
  <section class="sq-loop-panel" style="background: #111;">
    <h2>Panel 1</h2>
  </section>
  <section class="sq-loop-panel" style="background: #FFF;">
    <h2>Panel 2</h2>
  </section>
  <section class="sq-loop-panel" style="background: #333;">
    <h2>Panel 3</h2>
  </section>
</div>
```

***

## Directional Marquee

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

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

*Attribute: `data-sq-marquee`*

[View Demo](#)

The Directional Marquee creates an infinite horizontal scrolling banner. It clones the content inside the wrapper to seamlessly loop. It observes scroll velocity, speeding up momentarily if the user scrolls quickly, and switches direction depending on whether the user scrolls up or down.

**Usage**

Wrap the items in a container with the `data-sq-marquee` attribute.

**Basic Example**

```html theme={null}
<div data-sq-marquee>
  <span>Design</span>
  <span>Development</span>
  <span>Strategy</span>
</div>
```

**Advanced Example**

```html theme={null}
<div data-sq-marquee="speed: 60; gap: 48; direction: right">
  <span>Design</span>
  <span>•</span>
  <span>Development</span>
  <span>•</span>
  <span>Strategy</span>
</div>
```

**Options**

| Option      | Type                  | Default  | Description                               |
| ----------- | --------------------- | -------- | ----------------------------------------- |
| `speed`     | number                | `50`     | The scrolling speed in pixels per second. |
| `gap`       | number                | `40`     | Gap between elements in pixels.           |
| `direction` | `'left'` or `'right'` | `'left'` | Initial scroll direction.                 |

***

## Pinned Panels

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

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

*Attribute: `data-sq-panels`*

The Pinned Panels module pins a section to the top of the viewport and creates an overscroll effect where the next panel scales down the current one and slides over it. Designed for impactful storytelling sections, long-form content, and case study breakdowns.

**Usage**

Wrap your individual panel sections in a parent `div` that has the `data-sq-panels` attribute.

**Basic Example**

```html theme={null}
<div data-sq-panels>
  <div class="sq-panel sq-panel--dark">Panel One</div>
  <div class="sq-panel sq-panel--light">Panel Two</div>
  <div class="sq-panel sq-panel--accent">Panel Three</div>
</div>
```

**Advanced Example**

```html theme={null}
<div data-sq-panels="rounded: true">
  <div class="sq-panel">Panel One</div>
  <div class="sq-panel">Panel Two</div>
</div>
```

**Options**

| Option    | Type    | Default | Description                                                              |
| --------- | ------- | ------- | ------------------------------------------------------------------------ |
| `rounded` | boolean | `true`  | Adds rounded bottom corners (`24px`) to each panel during the pin phase. |

***

## Swipe Slider

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

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

*Attribute: `data-sq-swipe`*

The Swipe Slider creates an event-based slider that responds to mouse wheel, touch swipe, and keyboard (`ArrowUp`/`ArrowDown`). No actual DOM scrolling occurs.

<Warning>
  **Never** apply `data-sq-swipe` and UIKit3 Slider to the same wrapper.
</Warning>

**Usage**

Apply `data-sq-swipe` to the slider container with immediate children acting as the slides.

**Basic Example**

```html theme={null}
<div data-sq-swipe>
  <div class="sq-slide bg-dark">Slide One</div>
  <div class="sq-slide bg-light">Slide Two</div>
  <div class="sq-slide bg-gray">Slide Three</div>
</div>
```

**Advanced Example**

```html theme={null}
<div data-sq-swipe="duration: 1; ease: power4.inOut; show-nav: true; show-dots: true">
  <div class="sq-slide">Slide One</div>
  <div class="sq-slide">Slide Two</div>
</div>
```

**Options**

| Option      | Type    | Default          | Description                     |
| ----------- | ------- | ---------------- | ------------------------------- |
| `duration`  | number  | `1`              | Transition duration in seconds. |
| `ease`      | string  | `'power4.inOut'` | GSAP ease equation.             |
| `show-nav`  | boolean | `false`          | Display previous/next buttons.  |
| `show-dots` | boolean | `false`          | Display pagination dots.        |

***

## Text Masking Reveal

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

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

*Attribute: `data-sq-mask`*

This module uses `SplitText` to break text into lines or words, then adds an `overflow: hidden` wrap to mask the text as it animates vertically into view. An elegant way to format large headings and stylized paragraphs.

<Warning>
  **Never** apply `data-sq-mask` to elements with child HTML tags (such as `<span>` or `<strong>`).
</Warning>

**Usage**

Apply `data-sq-mask` directly to a text element containing plain text.

**Basic Example**

```html theme={null}
<h2 data-sq-mask>
  Welcome to our creative studio.
</h2>
```

**Advanced Example**

```html theme={null}
<p data-sq-mask="type: words; duration: 0.9; stagger: 0.12; ease: power4.out; scroll: true">
  A highly customized paragraph revealing word-by-word.
</p>
```

**Options**

| Option     | Type                   | Default        | Description                                  |
| ---------- | ---------------------- | -------------- | -------------------------------------------- |
| `type`     | `'lines'` or `'words'` | `'lines'`      | Method for text splitting.                   |
| `duration` | number                 | `0.85`         | Animation duration per split item (seconds). |
| `stagger`  | number                 | `0.1`          | Initial stagger delay (seconds).             |
| `ease`     | string                 | `'power4.out'` | Animation easing type.                       |
| `scroll`   | boolean                | `true`         | Enable ScrollTrigger reveal on scroll.       |
| `start`    | string                 | `'top 85%'`    | Custom scroll start trigger point.           |

***

## Cursor Driven Perspective Tilt

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

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

*Attribute: `data-sq-tilt`*

The Perspective Tilt module adds an interactive 3D rotation to an element when hovered, giving it a tactile, card-like feel. It's often used for team members, featured projects, or pricing cards.

<Warning>
  **Never** apply `data-sq-tilt` to UIKit3 Sticky elements.
</Warning>

**Usage**

Simply add the `data-sq-tilt` attribute to any element.

**Basic Example**

```html theme={null}
<div class="sq-card" data-sq-tilt>
  Card content
</div>
```

**Advanced Example**

```html theme={null}
<div class="sq-card" data-sq-tilt="max: 15; scale: 1.05; speed: 400">
  Card content
</div>
```

**Options**

| Option  | Type   | Default | Description                                    |
| ------- | ------ | ------- | ---------------------------------------------- |
| `max`   | number | `12`    | The maximum rotation angle in degrees.         |
| `scale` | number | `1.04`  | How much the element should scale up on hover. |
| `speed` | number | `400`   | The transition speed in milliseconds.          |
