{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"masonry-image-hover-grid","type":"registry:component","title":"Masonry Image Hover Grid","description":"A CSS-columns masonry gallery with a scale + caption reveal on hover.","dependencies":["framer-motion"],"registryDependencies":[],"files":[{"path":"components/viberdy/masonry-image-hover-grid.tsx","content":"\"use client\";\n\nimport { motion } from \"framer-motion\";\n\ntype Tile = { src: string; label: string };\n\nexport function MasonryImageHoverGrid({ tiles, columns = 3 }: { tiles: Tile[]; columns?: number }) {\n  return (\n    <div className={`columns-${columns} gap-2.5`} style={{ columnCount: columns }}>\n      {tiles.map((tile) => (\n        <motion.div\n          key={tile.src}\n          tabIndex={0}\n          whileHover=\"hover\"\n          whileFocus=\"hover\"\n          className=\"group relative mb-2.5 overflow-hidden rounded-xl break-inside-avoid outline-none focus-visible:ring-2 focus-visible:ring-red-500\"\n        >\n          <motion.img\n            src={tile.src}\n            alt={tile.label}\n            variants={{ hover: { scale: 1.08 } }}\n            transition={{ duration: 0.3, ease: [0.16, 1, 0.3, 1] }}\n            className=\"w-full\"\n          />\n          <motion.div\n            variants={{ hover: { opacity: 1, y: 0 } }}\n            initial={{ opacity: 0, y: 8 }}\n            transition={{ duration: 0.2 }}\n            className=\"absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/60 to-transparent px-3 py-2\"\n          >\n            <span className=\"text-sm font-semibold text-white\">{tile.label}</span>\n          </motion.div>\n        </motion.div>\n      ))}\n    </div>\n  );\n}\n","type":"registry:component","target":"components/viberdy/masonry-image-hover-grid.tsx"}],"meta":{"tier":"free","tags":["masonry","gallery","grid","hover"],"href":"https://viberdy.dev/library/masonry-image-hover-grid","aiPrompt":"Create a React + Tailwind + Framer Motion \"masonry image hover grid\" component named MasonryImageHoverGrid.\n\nBehavior:\n- Renders images of varying natural heights in a true masonry flow using CSS multi-column layout (`columns-N`, or `column-count` inline for a dynamic column count), NOT CSS grid — grid needs manual row-spanning math to avoid gaps with variable-height items, while columns lets browser-native masonry-like flow happen automatically. Each tile needs `break-inside-avoid` so it never gets split across two columns.\n- On hover (Framer Motion's `whileHover=\"hover\"` on the tile, with child elements declaring matching `variants`), the image scales up slightly and a caption bar fades/slides up from the bottom over a dark gradient scrim, so it stays legible over any image.\n- Props: tiles (array of {src, label}), columns (number of masonry columns).\n\nStyle: tight gap between tiles, rounded corners, smooth hover scale, caption only visible on hover.\n\nOutput a single self-contained \"use client\" component.","license":"https://viberdy.dev/license"}}