PocketPapiHelp Center

Developer library · 63 free recipes

Effects, ready to ship.

Free motion recipes for real websites. Browse practical CSS and JavaScript patterns, copy a focused implementation, or let an LLM fetch the exact effect through the PocketPapi API or MCP.

const effect = "fade-up-reveal";
await ship(effect);

The foundation

Native recipes

Small, composable patterns you can paste into a plain HTML site, a CMS, or a generated staging build.

Interactive preview
Text motionCC0-style snippets

Count-up number

A short numeric transition that gives a metric a sense of arrival without hiding the final value.

<span data-sc-effect="count-up" data-value="240">240</span>

const count = document.querySelector('[data-sc-effect="count-up"]');
const end = Number(count.dataset.value || 240);
const start = performance.now();
function tick(now) {
  const progress = Math.min((now - start) / 900, 1);
  count.textContent = Math.round(end * (1 - Math.pow(1 - progress, 3))).toLocaleString();
  if (progress < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
Interactive preview
Text motionCC0-style snippets

Typewriter text

A short, decorative typewriter cue for a headline or status line, with the full copy preserved for assistive technology.

<span data-sc-effect="typewriter" data-text="Build with clarity">Build with clarity</span>

const node = document.querySelector('[data-sc-effect="typewriter"]');
const text = node.dataset.text || node.textContent;
node.setAttribute('aria-label', text);
node.textContent = '';
let index = 0;
const type = () => { node.textContent = text.slice(0, ++index); if (index < text.length) setTimeout(type, 55); };
type();
Interactive preview
Text motionCC0-style snippets

Pauseable marquee

A low-priority looping strip with a pause control, suitable for decorative keywords or partner labels.

[data-sc-effect="marquee"] { overflow: hidden; }
[data-sc-effect="marquee"] .sc-marquee-track { display: flex; width: max-content; animation: sc-marquee 18s linear infinite; }
[data-sc-effect="marquee"]:has(button:focus-visible) .sc-marquee-track,
[data-sc-effect="marquee"].is-paused .sc-marquee-track { animation-play-state: paused; }
@keyframes sc-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { [data-sc-effect="marquee"] .sc-marquee-track { animation: none; } }

<div data-sc-effect="marquee"><div class="sc-marquee-track"><span>Clarity · Motion · Speed · </span><span aria-hidden="true">Clarity · Motion · Speed · </span></div><button type="button" data-sc-marquee-toggle>Pause</button></div>
<script>
  const marquee = document.querySelector('[data-sc-effect="marquee"]');
  marquee.querySelector('[data-sc-marquee-toggle]').addEventListener('click', (event) => {
    marquee.classList.toggle('is-paused');
    event.currentTarget.textContent = marquee.classList.contains('is-paused') ? 'Play' : 'Pause';
  });
</script>
Interactive preview
Text motionCC0-style snippets

Underline sweep

A bright underline that draws attention to a link while leaving the text and focus state intact.

[data-sc-effect="underline-sweep"] { background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 220ms ease; }
[data-sc-effect="underline-sweep"]:hover,
[data-sc-effect="underline-sweep"]:focus-visible { background-size: 100% 2px; }
@media (prefers-reduced-motion: reduce) { [data-sc-effect="underline-sweep"] { transition: none; } }
Interactive preview
Text motionCC0-style snippets

Text mask wipe

Reveal a short heading with a clean mask wipe that preserves the text in the document tree.

[data-sc-effect="text-mask-wipe"] {
  clip-path: inset(0 100% 0 0); transform: translateX(-.2em);
  animation: sc-mask-wipe 800ms cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes sc-mask-wipe { to { clip-path: inset(0); transform: none; } }
@media (prefers-reduced-motion: reduce) {
  [data-sc-effect="text-mask-wipe"] { clip-path: inset(0); transform: none; animation: none; }
}
Interactive preview
Text motionCC0-style snippets

Gradient text flow

Move a restrained brand gradient across a short text treatment while keeping a solid-color fallback.

[data-sc-effect="gradient-text-flow"] {
  color: #155eef; background: linear-gradient(100deg, #155eef, #8b5cf6, #0ea5a1, #155eef);
  background-size: 220% auto; background-clip: text; -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; animation: sc-gradient-text 7s linear infinite;
}
@keyframes sc-gradient-text { to { background-position: 220% center; } }
@media (prefers-reduced-motion: reduce) {
  [data-sc-effect="gradient-text-flow"] { animation: none; background-position: 0 center; }
}
Interactive preview
Text motionCC0-style snippets

Text scramble

Resolve a short label through a burst of characters before landing on the real message.

[data-sc-effect="text-scramble"] { font-variant-numeric: tabular-nums; }

const scramble = document.querySelector('[data-sc-effect="text-scramble"]');
const finalText = scramble.textContent;
const chars = 'アカサタナ0123456789';
let frame = 0;
const scrambleTimer = setInterval(() => {
  scramble.textContent = finalText.split('').map((letter, index) => index < frame / 3 ? letter : chars[Math.floor(Math.random() * chars.length)]).join('');
  frame += 1;
  if (frame > finalText.length * 3) { clearInterval(scrambleTimer); scramble.textContent = finalText; }
}, 42);
Interactive preview
Text motionCC0-style snippets

Number ticker

Animate a metric to a final value with a readable numeric fallback and no dependency.

[data-sc-effect="number-ticker"] { font-variant-numeric: tabular-nums; }

const ticker = document.querySelector('[data-sc-effect="number-ticker"]');
const targetValue = Number(ticker.dataset.value || 240);
const reduceTicker = matchMedia('(prefers-reduced-motion: reduce)').matches;
if (reduceTicker) ticker.textContent = targetValue.toLocaleString();
else {
  const start = performance.now();
  const tick = (now) => {
    const progress = Math.min(1, (now - start) / 900);
    ticker.textContent = Math.round(targetValue * (1 - Math.pow(1 - progress, 3))).toLocaleString();
    if (progress < 1) requestAnimationFrame(tick);
  };
  requestAnimationFrame(tick);
}

Bring a library when it earns its weight

Free library starters

Version-pinned starting points for open-source libraries. Review the license and performance tradeoff before adding another dependency.

For GPTs and other agents

Tell the LLM how to use the library.

Give the model a clear selection loop. It should discover, fetch, compose, then explain where it placed the effect instead of inventing a new dependency.

Recommended instruction

Use this in a system or developer prompt when the model can access the REST API or MCP.

When a user asks for website motion or an interaction effect:
1. Search PocketPapi’s effects catalog before writing a new animation.
2. Prefer a native recipe when it meets the request; use a free MIT library only when it materially reduces complexity.
3. Fetch the chosen effect by effect_id and inspect its reduced-motion and accessibility notes.
4. Compose the effect for the user’s real selector. Keep the selector scoped and do not rewrite unrelated styles.
5. Return the exact files or insertion points, explain the dependency (if any), and mention keyboard, touch, and prefers-reduced-motion behavior.
6. Never add a library from an untrusted CDN or use a versionless URL when a pinned URL is available.

Use the PocketPapi tools `sitecommander_effects_search`, `sitecommander_effects_fetch`, and `sitecommander_effects_compose` for this workflow.
No command center required.The catalog is public and read-only. Use the REST endpoints from any site or connect the bearer-authenticated MCP endpoint to an agent.