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
Scroll-drivenCC0-style snippets

Sticky section progress

Keep a compact step marker pinned while the related section moves through view.

[data-sc-effect="sticky-section-progress"] { position: relative; }
[data-sc-effect="sticky-section-progress"] .sc-sticky-marker {
  position: sticky; top: 1rem; z-index: 2; width: max-content;
  padding: .55rem .75rem; border: 1px solid #dce3ee; border-radius: 999px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
}
[data-sc-effect="sticky-section-progress"] .sc-sticky-marker [aria-current="true"] { color: #155eef; font-weight: 800; }
@media (prefers-reduced-motion: reduce) {
  [data-sc-effect="sticky-section-progress"] .sc-sticky-marker { scroll-behavior: auto; }
}
Interactive preview
Scroll-drivenCC0-style snippets

Scroll-highlight navigation

Highlight the navigation item for the section currently in view using native IntersectionObserver.

[data-sc-effect="scroll-highlight"] a { color: #66758a; transition: color 180ms ease; }
[data-sc-effect="scroll-highlight"] a[aria-current="location"] { color: #155eef; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { [data-sc-effect="scroll-highlight"] a { transition: none; } }

const highlightNav = document.querySelector('[data-sc-effect="scroll-highlight"]');
const highlightLinks = [...highlightNav.querySelectorAll('a[href^="#"]')];
const highlightObserver = new IntersectionObserver((entries) => {
  entries.forEach(({ isIntersecting, target }) => {
    if (!isIntersecting) return;
    highlightLinks.forEach((link) => link.removeAttribute('aria-current'));
    highlightNav.querySelector(`a[href="#${target.id}"]`)?.setAttribute('aria-current', 'location');
  });
}, { rootMargin: '-35% 0px -55% 0px' });
highlightLinks.forEach((link) => document.querySelector(link.hash) && highlightObserver.observe(document.querySelector(link.hash)));
Interactive preview
Scroll-drivenCC0-style snippets

SVG path draw

Draw a small inline SVG path into view without an animation library or an external asset.

[data-sc-effect="svg-path-draw"] path {
  fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  pathLength: 1; animation: sc-path-draw 1.1s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes sc-path-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  [data-sc-effect="svg-path-draw"] path { animation: none; stroke-dashoffset: 0; }
}
Interactive preview
Scroll-drivenCC0-style snippets

Reading time progress

Pair a reading-time estimate with a small progress indicator for long-form content.

[data-sc-effect="reading-time-progress"] { --sc-reading-progress: 0%; }
[data-sc-effect="reading-time-progress"]::before { content: ""; display: block; width: var(--sc-reading-progress); height: 3px; background: #155eef; transition: width 120ms linear; }
@media (prefers-reduced-motion: reduce) { [data-sc-effect="reading-time-progress"]::before { transition: none; } }

const reading = document.querySelector('[data-sc-effect="reading-time-progress"]'); let readingFrame = 0; const updateReading = () => { readingFrame = 0; const max = document.documentElement.scrollHeight - innerHeight; reading.style.setProperty('--sc-reading-progress', `${max > 0 ? (scrollY / max) * 100 : 0}%`); }; addEventListener('scroll', () => { if (!readingFrame) readingFrame = requestAnimationFrame(updateReading); }, { passive: true }); updateReading();

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.