agentleFS
reescalderreescalder/claude-skills/floating-quotes/SKILL.md

floating-quotes

Skill0 starsChanged 4 months agoMITView on GitHub

Draggable floating quote/testimonial cards with inertial physics, glassmorphic styling, and optional Pac-Man wrap-around. Use when adding testimonials, social proof, or pull quotes to landing pages and proposals.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When card exits one edge (with 20px buffer), teleports to opposite edge via jump()

    line 61
  2. Very specific:

    Don't use on mobile (cards are hidden lg:block by default).

    line 90
  3. Distinctive:

    Don't put more than 2 floating cards per viewport.

    line 91
  4. Distinctive:

    Don't use on light backgrounds without adapting the glassmorphism colors.

    line 92
  5. Very specific:

    Don't disable select-none on the card.

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Floating Quotes

Draggable glassmorphic quote cards with physics-based momentum. Users can grab and fling them around the page. Optional Pac-Man mode wraps cards to the opposite edge when dragged off-screen.

When to Use

  • Testimonials or social proof on landing pages
  • Pull quotes alongside long-form content
  • Client quotes in proposals or case studies
  • Any context where you want interactive, playful quote display

Dependencies

  • framer-motion (v10+)
  • lucide-react (for chevron icons)
  • Tailwind CSS

Reference Component

See references/floating-quotes.tsx for the full implementation.

Props

PropTypeDefaultDescription
quotes{ text: string; context: string }[]requiredArray of quotes to display
side'left' | 'right''right'Which side of the viewport to anchor
wrapAroundbooleantruePac-Man mode: card reappears on opposite edge
accentColorstring'#5CE5D5'Accent color for context text and hover states
widthnumber260Card width in pixels

Usage

<FloatingQuotes
  quotes={[
    { text: "This changed everything for us.", context: "Sarah, CEO at Acme" },
    { text: "10x improvement in conversion.", context: "Internal analytics" },
  ]}
  side="right"
  wrapAround={true}
  accentColor="#5CE5D5"
/>

Physics Behavior

Standard Mode (wrapAround={false})

Uses Framer Motion's built-in dragMomentum with dragElastic={0.1}. Card springs back with a rubber-band feel. Good for contained layouts.

Pac-Man Mode (wrapAround={true})

Custom physics engine:

  • Tracks velocity during drag via useMotionValue change events
  • On release, applies momentum with friction={0.95} decay per frame
  • Monitors card bounding rect against viewport edges
  • When card exits one edge (with 20px buffer), teleports to opposite edge via jump()
  • Momentum continues seamlessly after wrap

This creates the satisfying effect of flinging a card off the right side and watching it slide in from the left, still carrying its momentum.

Visual Design

The glassmorphic card style works best on dark backgrounds:

  • background: rgba(14, 14, 14, 0.65) with backdrop-filter: blur(24px) saturate(1.5)
  • Subtle border-white/[0.08] border for depth
  • shadow-2xl for floating effect
  • Scale to 1.05 while dragging for tactile feedback

Adapting to Light Themes

Swap the background to rgba(255, 255, 255, 0.65), change text colors to dark variants, and adjust border to border-black/[0.08].

Multi-card Layout

For multiple floating quote cards on one page, stagger their positions:

<FloatingQuotes quotes={ceoQuotes} side="right" />
<FloatingQuotes quotes={dataQuotes} side="left" />

The side prop offsets vertical position (right = top third, left = bottom third) to prevent overlap.

Anti-patterns

  • Don't use on mobile (cards are hidden lg:block by default). Touch drag conflicts with scroll.
  • Don't put more than 2 floating cards per viewport. They become distracting.
  • Don't use on light backgrounds without adapting the glassmorphism colors.
  • Don't disable select-none on the card. Text selection during drag feels broken.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.