Float Demo
fancy/float-demoFreeBlock
A block component.
Install it
npx shadcn@latest add https://www.fancycomponents.dev/r/float-demo.jsonSource
1"use client"23import { exampleImages } from "@/utils/demo-images"4import { motion } from "motion/react"56import Float from "@/components/fancy/blocks/float"78export default function FloatDemo() {9 return (10 <div className="w-dvw h-dvh flex flex-col items-center justify-center bg-white text-foreground dark:text-muted">11 <div className="flex flex-col items-center justify-center w-full h-full">12 <motion.div13 initial={{ opacity: 0, y: 20 }}14 animate={{ opacity: 1, y: 0 }}15 transition={{ duration: 0.25, delay: 0.5, ease: "easeOut" }}16 >17 <Float>18 <div className="sm:w-40 sm:h-40 h-32 w-32 md:w-48 md:h-48 shadow-2xl relative overflow-hidden hover:scale-105 duration-200 cursor-pointer transition-transform">19 <img20 src={exampleImages[4].url}21 className="w-full h-full object-cover absolute top-0 left-0"22 />23 </div>24 </Float>25 </motion.div>26 <motion.h227 className="pt-8 sm:pt-12 md:pt-16 text-xl sm:text-3xl md:text-4xl uppercase z-10"28 initial={{ opacity: 0, y: 20 }}29 animate={{ opacity: 1, y: 0 }}30 transition={{ duration: 0.25, delay: 0.7, ease: "easeOut" }}31 >32 Album of the week33 </motion.h2>34 </div>35 </div>36 )37}
What it pulls in
npm packages
Other registry items
Files it writes
More from fancy
All 158 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Animated Gradient Demoanimated-gradient-demo | fancy | Blocks | Free | no deps | |
| Basic Number Ticker Demobasic-number-ticker-demo | fancy | Blocks | Free | no deps | |
| Box Carousel Autoplay Demobox-carousel-autoplay-demo | fancy | Blocks | Free | 1 dep | |
| Box Carousel Demobox-carousel-demo | fancy | Blocks | Free | 1 dep | |
| Box Carousel Video Demobox-carousel-video-demo | fancy | Blocks | Free | 1 dep | |
| Breathing Text Demobreathing-text-demo | fancy | Blocks | Free | no deps | |
| Circling Elements Democircling-elements-demo | fancy | Blocks | Free | no deps | |
| Circling Elements Easing Democircling-elements-easing-demo | fancy | Blocks | Free | no deps |
