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.
In this repository37 other files it gives its agents.
- .agents/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- vercel-composition-patterns/AGENTS.mdAGENTS.md
- senior-frontendSkill
- vercel-composition-patternsSkill
- bento-designSkill
- fanned-cardsSkill
- flip-cardSkill
- githubSkill
- glassmorphism-uiSkill
- gmail-proxySkill
- googleSkill
- hippocampusSkill
- html-pdf-exportSkill
- iframe-previewSkill
- infinite-canvasSkill
- matrix-textSkill
- nextjs-apiSkill
- nextjs-expertSkill
- pinterestSkill
- railway-deploySkill
- remotion-videoSkill
- scramble-textSkill
- scroll-video-heroSkill
- senior-frontendSkill
- SEOSkill
- ship-websiteSkill
- sound-engineSkill
- stripe-best-practicesSkill
- tilt-cardSkill
- tube-summarySkill
- upload-postSkill
- vercel-composition-patternsSkill
- vercel-deploySkill
- vercel-react-best-practicesSkill
- vertical-fanned-cardsSkill
- video-contentSkill
- war-roomSkill
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
- Very specific: line 61
When card exits one edge (with 20px buffer), teleports to opposite edge via jump()
- Very specific: line 90
Don't use on mobile (cards are hidden lg:block by default).
- Distinctive: line 91
Don't put more than 2 floating cards per viewport.
- Distinctive: line 92
Don't use on light backgrounds without adapting the glassmorphism colors.
- Very specific: line 93
Don't disable select-none on the card.
≈ “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.
Files
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
| Prop | Type | Default | Description |
quotes | { text: string; context: string }[] | required | Array of quotes to display |
side | 'left' | 'right' | 'right' | Which side of the viewport to anchor |
wrapAround | boolean | true | Pac-Man mode: card reappears on opposite edge |
accentColor | string | '#5CE5D5' | Accent color for context text and hover states |
width | number | 260 | Card 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
useMotionValuechange 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)withbackdrop-filter: blur(24px) saturate(1.5)- Subtle
border-white/[0.08]border for depth shadow-2xlfor 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:blockby 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-noneon the card. Text selection during drag feels broken.
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
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.

