---
name: swishy
description: Pick, tweak, install or adapt Swishy's animated templates (buttons, loaders, cursors, backgrounds, text effects, galleries, grids, charts, counters, cards, overlays, titles and more) for a React or Next.js site with the shadcn CLI, drive them through typed props or ?p= share codes, or write a new frame-based scene from the closest template on the Swishy Motion runtime. Use when the user mentions Swishy, swishy.ai, an @swishy/ component, or asks for an animated UI element or motion graphic that a Swishy template covers.
---

# Swishy

Swishy (https://www.swishy.ai) is an AI motion designer: an editor where a prompt becomes an animated scene (a React component driven by a frame counter), a gallery of 2015 public templates built on the same scene format, and a shadcn-compatible registry that installs 1780 of them into any React project as plain components. Templates marked "editor only" use SwishyUI's scene library, which exists only inside the editor and its exports (MP4, GIF, MOV, WebM, PNG sequence).

Each template is a self-contained `function Scene()` with a `SCENE_PARAMS` literal at the top: every editable value (text, colour, number, select, boolean, font, image, video) is a key in it. The same keys are the props of an installed component, the fields of a share code and the slot table in this skill's references.

## Install a component

1. The project needs a `components.json`. If it has none, run `npx shadcn@latest init` first.
2. Install by URL (works everywhere):

   ```bash
   npx shadcn@latest add https://www.swishy.ai/r/<slug>.json
   ```

   Or add the namespace once to `components.json` and use `@swishy/<slug>`:

   ```json
   {
     "registries": {
       "@swishy": "https://www.swishy.ai/r/{name}.json"
     }
   }
   ```

3. The CLI writes three files to `components/swishy/` (`<slug>.tsx` typed entry, `<slug>.scene.js`, `<slug>.scene.d.ts`) and the runtime to `lib/swishy-motion/`. Do not edit the `.scene.js` file; configure the component through props.

If the user pasted a command or link from the Swishy editor (it ends in `?p=...`), run that exact command. The `p` parameter bakes the user's tweaked values in as the defaults.

## Use it

```tsx
import { AuroraGradient } from "@/components/swishy/aurora-gradient"

export function Hero() {
  return (
    <section className="relative h-[80vh] overflow-hidden">
      <AuroraGradient fit="fill" className="absolute inset-0" />
      <div className="relative z-10">...</div>
    </section>
  )
}
```

- The component is named after the template in PascalCase and is also the default export. It is a client component (`"use client"`).
- Every template parameter is an optional, typed prop (text, colours, numbers, selects, booleans, fonts, image URLs). The defaults reproduce the template's preview. Read the props interface at the top of `<slug>.tsx`; it lists each default.
- Player props on every component:
  - `fit`: `"contain"` (default) scales the fixed canvas and letterboxes it; `"fill"` lays the scene out at the container size. Use `"fill"` for backgrounds and full-bleed sections. Give the container a height.
  - `loop` (default true), `autoplay` (default true).
  - `frame`: drive the animation yourself (for example from scroll progress); this stops the clock.
  - `loadFonts` (default true): loads the scene's Google Fonts. Pass false when the site already loads them.
  - `className`, `style`.
- The player pauses off-screen and shows a still frame when the visitor prefers reduced motion.
- Server-render safe: nothing touches `window` during render.

To preview or tweak a template before installing, open its template page, `https://www.swishy.ai/templates/<slug>` (the editor). The full live list is `https://www.swishy.ai/r/registry.json`.

## Pick a template by intent

Every public template has a class (what it is), a designed aspect, tags and a one-line description in [references/index.md](references/index.md), one line per template. The rule: search `references/index.md` for the class and the tags the request names, then open that class's file under `references/templates/` for the slot table, the aspect fitness and the install command. Prefer a template whose aspect fitness lists the aspect the user needs; a landscape element does not become a portrait one by changing the canvas.

| Class | File | Public | Installable | Examples |
|---|---|---|---|---|
| Button | [button.md](references/templates/button.md) | 92 | 91 | `btn-arrow-reveal`, `mx-black-app-store-badge`, `uix-voice-note` |
| Loader | [loader.md](references/templates/loader.md) | 69 | 68 | `ld-image-mechanic`, `ldr-particle-surge`, `uix-wave-loader` |
| Cursor | [cursor.md](references/templates/cursor.md) | 52 | 35 | `cur-aura-smoke`, `cur-name-tag`, `uix-eye-tracker` |
| Background | [background.md](references/templates/background.md) | 391 | 335 | `ascii-plasma`, `bg-pixel-arc`, `particle-field` |
| Border | [border.md](references/templates/border.md) | 18 | 17 | `border-electric`, `ld-beam-ice`, `uix-edge-light` |
| Text effect | [text-effect.md](references/templates/text-effect.md) | 227 | 227 | `anim-abacus-drift`, `mx-blend-modes-overlay-poster`, `word-reveal-headline` |
| Kinetic type | [kinetic-type.md](references/templates/kinetic-type.md) | 5 | 0 | `motion-type-converge`, `motion-type-word-slot`, `sui-reveal` |
| Image effect | [image-effect.md](references/templates/image-effect.md) | 43 | 43 | `imx-ascii-reveal`, `imx-liquid-hover`, `imx-zoom-grid` |
| Gallery | [gallery.md](references/templates/gallery.md) | 95 | 95 | `cover-flow`, `igal-web-gl-carousel`, `uix-radial-pop-out` |
| Grid | [grid.md](references/templates/grid.md) | 122 | 34 | `grid-reveal`, `mx-gradients-bento`, `uix-magnetic-dots` |
| Input | [input.md](references/templates/input.md) | 20 | 19 | `ld-voice-mobile`, `uix-ai-autocomplete`, `uix-tag-input` |
| Toggle | [toggle.md](references/templates/toggle.md) | 10 | 9 | `mx-3-toggle-switch-buttons`, `mx-on-off-toggle`, `uix-liq-toggle` |
| Card | [card.md](references/templates/card.md) | 118 | 116 | `ix-shine-card`, `mx-landing-page-blocks`, `uix-world-clock` |
| List | [list.md](references/templates/list.md) | 31 | 31 | `ld-bots-roster`, `mx-blur-text-scroller`, `uix-swipe-row` |
| Chart | [chart.md](references/templates/chart.md) | 2 | 0 | `motion-stat-bars-winner`, `sui-number-ticker` |
| Counter | [counter.md](references/templates/counter.md) | 57 | 57 | `donut-chart`, `ml-falling-products-sales-counter`, `uix-segment-timer` |
| Progress | [progress.md](references/templates/progress.md) | 40 | 40 | `ml-animated-bar-chart-poll-reveal`, `ml-retro-8-bit-loading-progress`, `uix-upload-dropzone` |
| Menu | [menu.md](references/templates/menu.md) | 26 | 26 | `ld-gooey-morph`, `mx-the-crust-animated-menu`, `uix-toolbar` |
| Notification | [notification.md](references/templates/notification.md) | 24 | 24 | `ml-animated-star-review-notification`, `ml-subtle-pulsing-warning-icon`, `uix-toast-stack` |
| Chat | [chat.md](references/templates/chat.md) | 22 | 22 | `imessage-chat`, `ml-glassy-ai-conversation-reveal`, `uix-voice-chat` |
| Social post | [social-post.md](references/templates/social-post.md) | 66 | 66 | `ml-animated-social-comment-overlay`, `mx-project-reveal`, `mx-the-track-poster` |
| Tooltip | [tooltip.md](references/templates/tooltip.md) | 7 | 7 | `ml-sharp-decline-line-chart`, `uix-dock`, `uix-stacked-bars` |
| Modal | [modal.md](references/templates/modal.md) | 1 | 1 | `ml-retro-system-error-pop-up` |
| Player | [player.md](references/templates/player.md) | 16 | 16 | `ml-dynamic-3d-timeline-editor`, `ml-pulsating-ai-voice-interface`, `uix-tape` |
| Logo | [logo.md](references/templates/logo.md) | 1 | 0 | `motion-logo-liquid-metal` |
| Overlay | [overlay.md](references/templates/overlay.md) | 7 | 0 | `motion-overlay-chapter-title`, `motion-overlay-subscribe`, `sui-caption-box` |
| Title | [title.md](references/templates/title.md) | 28 | 27 | `ml-bouncy-belly-text-reveal`, `ml-lighthouse-binocular-view`, `mx-zero-gravity-bouncy-words` |
| Lower third | [lower-third.md](references/templates/lower-third.md) | 1 | 1 | `lower-third` |
| Transition | [transition.md](references/templates/transition.md) | 49 | 25 | `ml-dynamic-business-icon-burst`, `mx-cascading-text`, `uix-signature` |
| Particles | [particles.md](references/templates/particles.md) | 62 | 56 | `ix-aurora-drift`, `ix-structure-flow`, `uix-particles` |
| 3D object | [3d-object.md](references/templates/3d-object.md) | 75 | 75 | `halftone-orb`, `ix-one-glossy-liquid`, `uix-metaballs` |
| Product UI | [product-ui.md](references/templates/product-ui.md) | 3 | 0 | `motion-ui-checkout`, `motion-ui-search`, `motion-ui-upload` |
| Stat | [stat.md](references/templates/stat.md) | 2 | 0 | `motion-stat-bar-number`, `motion-stat-ring` |
| Launch | [launch.md](references/templates/launch.md) | 3 | 0 | `motion-launch-ledger`, `motion-launch-studio`, `motion-launch-tasks` |
| Scene | [scene.md](references/templates/scene.md) | 230 | 217 | `ascii-banner`, `ml-multi-city-map-flyover-1-1`, `uix-wake-slider` |

Tags come in five facets. A request usually names a kind and one or two of the others:

- `kind`: button, loader, cursor, background, border, text-effect, kinetic-type, image-effect, gallery, carousel, grid, input, toggle, slider, menu, tabs, card, list, chart, counter, progress, globe, 3d-object, particles, transition, overlay, notification, chat, social-post, tooltip, modal, avatar, player, calendar, map, logo, title, lower-third, badge, icon, form, checkbox, picker, timer, keyboard, widget, pattern, scene
- `technique`: shader, ray-marched, svg, dom, css-3d, canvas, physics, spring, particles, noise, dither, ascii, halftone, pixel, glass, metal, liquid, text-in-shader, glitch, gradient, glow, morph, parallax, isometric, wireframe, refraction, displacement, blur, mask, stagger, typewriter, photo
- `interaction`: hover, press, drag, swipe, scroll, pointer-follow, autoplay
- `look`: dark, light, neon, minimal, playful, organic, futuristic, retro, luxury, glossy, monochrome, colorful, cosmic, calm, energetic
- `use`: hero, landing, onboarding, dashboard, checkout, notification, loading-state, portfolio, social, promo, intro, branding, app-ui, explainer, ecommerce, presentation

Elements (`btn-`, `ldr-`, `cur-`, `bg-`, `border-`, `anim-`, `txt-`, `imx-`, `igal-`, `grid-`, `ml-`, `mx-`, `uix-`, `ix-`, `ld-`, `ascii-`) are UI micro-interactions that play a scripted demo of themselves and react to the real pointer live. Motion pieces (`motion-`) and the SwishyUI catalog (`sui-`) are film scenes with beats; they are editor only.

## Tweak it

Props, share codes and code edits all set the same `SCENE_PARAMS` keys (the slot table of the class file; `scenes[0].params` in the package).

- Props: an installed component takes each key as an optional typed prop (`<ArrowRevealButton label="Join" accent="#16a34a" />`).
- Share codes: `?p=<code>` on a template page, a registry URL (`/r/<slug>.json?p=`), the `.tsx` export, an embed or the install one-liner bakes values in as the defaults. The code is base64url JSON `{ "v": 1, "a"?: "portrait" | "square" | "landscape", "s"?: { "<sceneIndex>": { "<key>": value } } }`: only changed values, strings up to 2000 characters, no `data:` or `blob:` URLs, keys are identifiers. For example `{ a: "landscape", s: { 0: { label: "Get early access", accent: "#16a34a" } } }` encodes to `eyJ2IjoxLCJhIjoibGFuZHNjYXBlIiwicyI6eyIwIjp7ImxhYmVsIjoiR2V0IGVhcmx5IGFjY2VzcyIsImFjY2VudCI6IiMxNmEzNGEifX19`.
- In code: `applySceneParams(code, { key: value })` (the editor's one writer) replaces the first `value:` after `key: {` inside the SCENE_PARAMS literal. Unknown keys and values that are not a string, number or boolean are ignored; a param whose `options` list comes before its `value` is left unchanged; `{ key: { value } }` objects are accepted too. The result still parses with the same keys, so the editor's panel and the compiler keep working.
- `cycles` (elements): the demo plays `cycles` whole loops over the clip (`t = ((frame / durationInFrames) * cycles) % 1`), so the loop closes exactly at the clip end whatever the length. Keep it a whole number and change it together with the length: a 4 s clip at `cycles: 2` is two 2 s loops. Motion pieces loop on beats instead and are not retimed this way.
- `size` (elements): 1 = designed at a 1080 px short side; everything scales from `minDim / 1080 * size`.
- Keep the prelude: an element's code opens with a shared block (from `function Scene() {` to the first `return (`) that defines `u`, `t`, `demoHover()`, `hoverOf()`, `aim()`, `pressOf()` and the colour helpers. Change values and the JSX below it; a prelude edit breaks the loop, the live hover and the checks.

## Generate a new scene from the closest template

Only for web-compilable slugs (marked `web-compilable` in the index, `webCompilable: true` in the package). Editor-only templates render SwishyUI library components that exist nowhere else; adapt them inside the editor instead.

1. Retrieve: decide the class from the request, search `references/index.md` for that class and the tags, open the class file and read the slot table of the closest one or two templates.
2. Fetch the code: `GET https://www.swishy.ai/api/templates/by-slug/<slug>/package` (no login, CORS `*`, 120 requests a minute per IP). `scenes[0].code` is the scene, `scenes[0].params` lists the SCENE_PARAMS, `symbolsUsed` the globals it reads, `webCompilable` whether it compiles to a component, `unsupportedSymbols` why not.
3. Change SCENE_PARAMS values first: the copy, colours, numbers, selects and image URLs the user gave. Most requests end here.
4. Then edit the JSX outside the params block (below the `SCENE_PARAMS = { ... };` literal). Keep `function Scene()`, keep every hook call unconditional, read time with `useCurrentFrame()` and size with `useVideoConfig()`, time animations relative to `durationInFrames`, pass `{ extrapolateRight: "clamp" }` to `interpolate`, and use only these globals: `React`, `AbsoluteFill`, `Sequence`, `Series`, `Loop`, `Freeze`, `Img`, `Video`, `OffthreadVideo`, `Audio`, `IFrame`, `useCurrentFrame`, `useVideoConfig`, `useCurrentScale`, `usePointer`, `useScroll`, `usePress`, `kit`, `interpolate`, `interpolateColors`, `spring`, `measureSpring`, `Easing`, `random`, `staticFile`, `delayRender`, `continueRender`, `cancelRender`, `getInputProps`, `prefetch`, `SCENE_FONT`. Nothing else is in scope: no imports, no `Math.random`, no `Date.now`, no timers, no CSS keyframes.
5. No decorative micro-labels: no eyebrows or kickers, no small tracked-uppercase captions or tag pills, no caption cards describing the effect, no invented version, build or status text, no counters or card numbers, no fake window or terminal chrome, no fake text-line bars on placeholders. Only the user's content and real data labels.
6. Verify: every identifier the code reads that is not declared in it must be in the globals list above (that is the package's `symbolsUsed`); no SwishyUI library component name (the "editor only" list in references/runtime.md) and no runtime extra (`TransitionSeries`, `linearTiming`, `springTiming`, `fade`...) may appear, or the scene is no longer web-compilable. Paste the result into the editor (a new project's chat, or `https://www.swishy.ai/templates/<slug>`) to see it render, then export or install it.

The SCENE_PARAMS contract and the editor's full scene rules are in [references/scene-format.md](references/scene-format.md).

## Runtime vocabulary

[references/runtime.md](references/runtime.md) lists what scene code can use: the installable Swishy Motion runtime (hooks, maths, player, the `kit` helpers: type, gap, surface, fitText, useShader, cursor, sound, loopT), keyframes and `keyStyle`, and the editor-only vocabulary (`TransitionSeries` and its presentations, the GridShowcase presets, the look presets and SwishyUI's 144 scene library components with when to use and what to avoid). Motion and typography guidance: [references/motion-design.md](references/motion-design.md).

## Embed without React

For sites without a React build (Webflow, WordPress, plain HTML), use the script embed instead. Get the snippet from the editor's "Share > Embed". It looks like:

```html
<script src="https://www.swishy.ai/embed.js" async></script>
<swishy-embed template="aurora-gradient" aspect="16:9"></swishy-embed>
```

## Write a new animation from scratch

When no template is close, write a component on the same runtime:

- Wrap the scene in `<SwishyPlayer width height durationInFrames fps>`. Inside, read time only from `useCurrentFrame()` and size only from `useVideoConfig()` (`minDim = Math.min(width, height)`). Never use `Date.now()`, timers or CSS keyframes, so the frame fully decides the picture.
- Animate with `interpolate(frame, [a, b], [from, to], { extrapolateRight: "clamp" })`, `spring({ frame, fps, config })`, `interpolateColors` and `Easing`. Use `random(seed)`, never `Math.random()`.
- `usePointer()` returns `{ x, y, inside }` (0 to 1 in the canvas) for hover effects; `useScroll()` returns `{ progress, velocity, active }`; `usePress()` returns `{ count, x, y, down, since }`. Call them unconditionally and make the component look complete at rest.
- Loops should end where they start.

## Licence

Installed components carry the Swishy Template Licence v1: free for commercial use in your own products; do not resell or redistribute them as a template pack. The Swishy Motion runtime is MIT. The scene library listing in references/runtime.md describes SwishyUI's proprietary runtime; it is documented so you can write and edit scenes inside Swishy, not for use outside it. Scene code built on it runs in the Swishy editor and its exports only.
