proNew165 lines · framer-motion
Hero Floating Cards
Proof points that drift toward your cursor. A centred hero surrounded by four small feature cards, each bobbing on its own loop and drifting with a pointer-driven parallax offset scaled by its own depth.
- Use it for
- Platform or feature-rich products that want to surface 3–4 proof points around the headline instead of in a separate features section.
- Themes
- Light + dark
- License
- Commercial use
Live
Platform
Everything orbits one workflow
A centred hero surrounded by floating proof points that drift gently toward your cursor.
tsx
"use client";
import * as React from "react";
import { motion, useMotionValue, useReducedMotion, useSpring, useTransform } from "framer-motion";
import { cn } from "@/lib/utils";
function useReducedMotionSafe() {
const prefersReduced = useReducedMotion();
const [mounted, setMounted] = React.useState(false);
React.useEffect(() => setMounted(true), []);
return mounted ? !!prefersReduced : false;
}
/**
* Centred hero with four small feature cards floating around the headline,
* each bobbing on its own loop and drifting with a pointer-driven parallax
* offset scaled by its own depth.
*/
export interface HeroFloatingCardsProps {
eyebrow?: string;
headline?: string;The rest is in Pro.
Full source, the rebuild prompt and registry install unlock with Pro or Lifetime.
Get ProHow it behaves
- →Each card has a fixed depth; a single pointer position (tracked as two spring-smoothed motion values) is multiplied per-card by its depth and tilt, so closer-feeling cards drift further than distant ones.
- →Independently of the pointer, every card also bobs up and down on its own slow loop, offset so they never move in sync; speed scales every bob duration together.
- →layout switches between a grid arrangement (cards anchored near the four corners) and a looser, slightly rotated scatter arrangement.
- →Cards hide below the sm breakpoint so the mobile layout stays a clean centred column.
- →prefers-reduced-motion removes the bob loop; pointer drift still applies but settles through the same critically-damped spring, so it never snaps.
Accessibility
- ✓The four floating cards are presentational chips (icon + short label) and don't duplicate interactive content; only the eyebrow, heading, copy and two real <a> CTAs carry the page's primary actions.
- ✓Headline is a single <h1>; CTAs keep the design system's visible focus ring.
- ✓Nothing relies on hover alone — pointer parallax is a decorative enhancement on top of a fully readable static layout.
- ✓Honours prefers-reduced-motion.