Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

feat: add feature cards

Dillion Verma8337c035ff7c
diff --git a/config/docs.ts b/config/docs.ts
index 7e2d929c..65ac2adc 100644
--- a/config/docs.ts
+++ b/config/docs.ts
@@ -146,6 +146,12 @@ export const docsConfig: DocsConfig = {
{
title: "Components",
items: [
+ {
+ title: "Feature Cards",
+ href: `/docs/components/feature-cards`,
+ items: [],
+ label: "8 New",
+ },
{
title: "Bento Grid",
href: `/docs/components/bento-grid`,
diff --git a/content/docs/components/feature-cards.mdx b/content/docs/components/feature-cards.mdx
new file mode 100644
index 00000000..a4b7a5d3
--- /dev/null
+++ b/content/docs/components/feature-cards.mdx
@@ -0,0 +1,28 @@
+---
+title: Feature Cards
+date: 2023-04-01
+description: A list that animates each item in sequence with a delay. Used to showcase notifications or events on your landing page.
+author: dillionverma
+published: true
+video: https://cdn.magicui.design/animated-feature-cards.mp4
+---
+
+<ComponentPreview name="animated-feature-card-1" />
+
+<ComponentPreview name="animated-feature-card-2" />
+
+<ComponentPreview name="animated-feature-card-3" />
+
+<ComponentPreview name="animated-feature-card-4" />
+
+<ComponentPreview name="animated-feature-card-5" />
+
+<ComponentPreview name="animated-feature-card-6" />
+
+{/* <ComponentPreview name="animated-feature-card-7" /> */}
+
+<ComponentPreview name="animated-feature-card-8" />
+
+<ComponentPreview name="animated-feature-card-9" />
+
+<ComponentPreview name="animated-feature-card-10" />
\ No newline at end of file
diff --git a/registry/components/example/animated-feature-card-1.tsx b/registry/components/example/animated-feature-card-1.tsx
new file mode 100644
index 00000000..65ef3311
--- /dev/null
+++ b/registry/components/example/animated-feature-card-1.tsx
@@ -0,0 +1,155 @@
+"use client";
+
+import { motion } from "framer-motion";
+
+export default function FeatureCard1() {
+ const variant1 = {
+ initial: {
+ scale: 0.87,
+ transition: {
+ delay: 0.05,
+ duration: 0.2,
+ ease: "linear",
+ },
+ },
+ whileHover: {
+ scale: 0.8,
+ boxShadow:
+ "rgba(245,40,145,0.35) 0px 20px 70px -10px, rgba(36,42,66,0.04) 0px 10px 24px -8px, rgba(36,42,66,0.06) 0px 1px 4px -1px",
+ transition: {
+ delay: 0.05,
+ duration: 0.2,
+ ease: "linear",
+ },
+ },
+ };
+ const variant2 = {
+ initial: {
+ y: -27,
+ scale: 0.95,
+ transition: {
+ delay: 0,
+ duration: 0.2,
+ ease: "linear",
+ },
+ },
+ whileHover: {
+ y: -55,
+ scale: 0.87,
+ boxShadow:
+ "rgba(39,127,245,0.15) 0px 20px 70px -10px, rgba(36,42,66,0.04) 0px 10px 24px -8px, rgba(36,42,66,0.06) 0px 1px 4px -1px",
+ transition: {
+ delay: 0,
+ duration: 0.2,
+ ease: "linear",
+ },
+ },
+ };
+ const variant3 = {
+ initial: {
+ y: -25,
+ opacity: 0,
+ scale: 1,
+ transition: {
+ delay: 0.05,
+ duration: 0.2,
+ ease: "linear",
+ },
+ },
+ whileHover: {
+ y: -45,
+ opacity: 1,
+ scale: 1,
+ boxShadow:
+ "rgba(39,245,76,0.15) 10px 20px 70px -20px, rgba(36,42,66,0.04) 0px 10px 24px -8px, rgba(36,42,66,0.06) 0px 1px 4px -1px",
+ transition: {
+ delay: 0.05,
+ duration: 0.2,
+ ease: "easeInOut",
+ },
+ },
+ };
+
+ const containerVariants = {
+ initial: {},
+ whileHover: {
+ transition: {
+ staggerChildren: 0.1,
+ },
+ },
+ };
+
+ return (
+ <div className="relative h-full w-full transform-gpu rounded-lg border bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset] md:max-h-[500px] md:max-w-[500px]">
+ <motion.div
+ variants={containerVariants}
+ initial="initial"
+ whileHover="whileHover"
+ className="flex h-full w-full cursor-pointer flex-col justify-between gap-y-5"
+ >
+ <div className="flex h-full w-full items-center justify-center rounded-t-xl border-b border-neutral-200 dark:border-neutral-800">
+ <div className="relative flex flex-col items-center justify-center gap-y-2 p-10">
+ <motion.div
+ variants={variant1}
+ className="z-[1] flex h-full w-full items-center justify-between gap-x-2 rounded-md border bg-white p-5 px-2.5 dark:border-neutral-800 dark:bg-neutral-900"
+ >
+ <div className="h-8 w-8 rounded-full bg-pink-300">
+ <img
+ className="h-full w-full rounded-full object-cover"
+ src="https://avatar.vercel.sh/jack"
+ alt="jack"
+ />
+ </div>
+ <div className="flex flex-col gap-y-2">
+ <div className="h-2 w-32 rounded-full bg-neutral-800/50 dark:bg-neutral-200/80"></div>
+
+ <div className="h-2 w-48 rounded-full bg-slate-400/50"></div>
+ </div>
+ </motion.div>
+ <motion.div
+ variants={variant2}
+ className="z-[2] flex h-full w-full items-center justify-between gap-x-2 rounded-md border bg-white p-5 px-2.5 dark:border-neutral-800 dark:bg-neutral-900"
+ >
+ <div className="h-8 w-8 rounded-full bg-pink-300">
+ <img
+ className="h-full w-full rounded-full object-cover"
+ src="https://avatar.vercel.sh/jane"
+ alt="jane"
+ />
+ </div>
+ <div className="flex flex-col gap-y-2">
+ <div className="h-2 w-32 rounded-full bg-neutral-800/50 dark:bg-neutral-200/80"></div>
+ <div className="h-2 w-48 rounded-full bg-slate-400/50"></div>
+ <div className="h-2 w-20 rounded-full bg-slate-400/50"></div>
+ </div>
+ </motion.div>
+ <motion.div
+ variants={variant3}
+ className="absolute bottom-0 z-[3] m-auto flex h-fit w-fit items-center justify-between gap-x-2 rounded-md border bg-white p-5 px-2.5 dark:border-neutral-800 dark:bg-neutral-900"
+ >
+ <div className="h-8 w-8 rounded-full bg-pink-300">
+ <img
+ className="h-full w-full rounded-full object-cover"
+ src="https://avatar.vercel.sh/jill"
+ alt="jill"
+ />
+ </div>
+ <div className="flex flex-col gap-y-2">
+ <div className="h-2 w-32 rounded-full bg-neutral-800/50 dark:bg-neutral-200/80"></div>
+ <div className="h-2 w-48 rounded-full bg-slate-400/50"></div>
+ <div className="h-2 w-20 rounded-full bg-slate-400/50"></div>
+ <div className="h-2 w-48 rounded-full bg-slate-400/50"></div>
+ </div>
+ </motion.div>
+ </div>
+ </div>
+ <div className="flex flex-col items-start gap-y-1 px-5 pb-4">
+ <h2 className="text-xl font-semibold">Notifications</h2>
+ <p className="text-base font-normal text-neutral-500 dark:text-neutral-400">
+ Instantly get notified about events
+ </p>
+ </div>
+ </motion.div>
+ </div>
+ );
+}
diff --git a/registry/components/example/animated-feature-card-10.tsx b/registry/components/example/animated-feature-card-10.tsx
new file mode 100644
index 00000000..8da7ad95
--- /dev/null
+++ b/registry/components/example/animated-feature-card-10.tsx
@@ -0,0 +1,145 @@
+"use client";
+
+import {
+ AnimatePresence,
+ cubicBezier,
+ motion,
+ useAnimation,
+ useInView,
+} from "framer-motion";
+import { useEffect, useRef } from "react";
+
+const cardImage = [
+ {
+ id: 1,
+ title: "jillian",
+ link: "#",
+ image: "https://avatar.vercel.sh/jillian",
+ },
+ {
+ id: 2,
+ title: "mojombo",
+ link: "#",
+ image: "https://avatar.vercel.sh/mojombo",
+ },
+ {
+ id: 3,
+ title: "defunkt",
+ link: "#",
+ image: "https://avatar.vercel.sh/defunkt",
+ },
+ {
+ id: 4,
+ title: "pjhyett",
+ link: "#",
+ image: "https://avatar.vercel.sh/pjhyett",
+ },
+ {
+ id: 5,
+ title: "wycats",
+ link: "#",
+ image: "https://avatar.vercel.sh/wycats",
+ },
+ {
+ id: 6,
+ title: "ezmobius",
+ link: "#",
+ image: "https://avatar.vercel.sh/ezmobius",
+ },
+ {
+ id: 7,
+ title: "ivey",
+ link: "#",
+ image: "https://avatar.vercel.sh/ivey",
+ },
+ {
+ id: 8,
+ title: "evanphx",
+ link: "#",
+ image: "https://avatar.vercel.sh/evanphx",
+ },
+ {
+ id: 9,
+ title: "vanpelt",
+ link: "#",
+ image: "https://avatar.vercel.sh/vanpelt",
+ },
+];
+
+export default function FeatureCard10() {
+ const containerRef = useRef(null);
+ const inView = useInView(containerRef, { amount: 0.25 });
+ const controls = useAnimation();
+
+ useEffect(() => {
+ if (inView) {
+ controls.start("visible");
+ } else {
+ controls.start("hidden");
+ }
+ }, [inView, controls]);
+
+ return (
+ <div className="flex h-full transform-gpu flex-col items-center justify-between gap-5 rounded-lg border border-neutral-200 bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] dark:bg-transparent dark:backdrop-blur-md dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset] xl:flex-row">
+ <div className="flex w-full flex-col items-start justify-between gap-y-10 p-10 xl:h-full xl:w-1/2">
+ <h2 className="text-3xl font-semibold">
+ Magic UI let's you build amazing websites with all your friends.
+ </h2>
+ <a
+ href="#"
+ className="text-base font-normal text-gray-500 underline-offset-4 transition-all hover:underline"
+ >
+ Check out our showcase
+ </a>
+ </div>
+ <div className="relative w-full overflow-hidden xl:w-1/2">
+ <div className="pointer-events-none absolute inset-x-0 top-0 z-10 h-1/3 bg-gradient-to-b from-white dark:from-black"></div>
+ <div
+ ref={containerRef}
+ className="relative -right-[50px] -top-[100px] grid max-h-[450px] grid-cols-3 gap-5 [transform:rotate(-15deg)translateZ(10px);]"
+ >
+ <AnimatePresence>
+ {cardImage.map((card, index) => (
+ <motion.div
+ variants={{
+ hidden: { opacity: 0, scale: 0.96, y: 25 },
+ visible: { opacity: 1, scale: 1, y: 0 },
+ }}
+ initial="hidden"
+ animate={controls}
+ exit={{
+ opacity: 0,
+ scale: 0,
+ transition: {
+ duration: 0.1,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ }}
+ transition={{
+ duration: 0.2,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ delay: index * 0.04,
+ }}
+ key={card.id}
+ className="flex flex-col items-center gap-y-2 rounded-md border bg-white/5 p-5"
+ >
+ <img
+ src={card.image}
+ alt={card.title}
+ className="h-20 w-20 rounded-full object-cover"
+ />
+ <p className="text-sm dark:text-neutral-200/50">{card.title}</p>
+ <a
+ href={card.link}
+ className="rounded-md border border-neutral-700/50 bg-neutral-600 p-2 py-0.5 text-white shadow-xl drop-shadow-lg hover:bg-neutral-500 dark:border-neutral-400/20 dark:bg-gray-500"
+ >
+ See Website
+ </a>
+ </motion.div>
+ ))}
+ </AnimatePresence>
+ </div>
+ </div>
+ </div>
+ );
+}
diff --git a/registry/components/example/animated-feature-card-2.tsx b/registry/components/example/animated-feature-card-2.tsx
new file mode 100644
index 00000000..c4fc8cdc
--- /dev/null
+++ b/registry/components/example/animated-feature-card-2.tsx
@@ -0,0 +1,105 @@
+"use client";
+
+import { cubicBezier, motion } from "framer-motion";
+import { Clock, Download, MessageCircle, Star } from "lucide-react";
+
+const texts = [
+ {
+ id: 1,
+ header: "New Feature Release.",
+ subheader: "Experience our app's latest features now.",
+ icon: <Star />,
+ },
+ {
+ id: 2,
+ header: "App Update Available.",
+ subheader:
+ "A new update is available for download. Get the latest version!",
+ icon: <Download />,
+ },
+ {
+ id: 3,
+ header: "Scheduled Maintenance.",
+ subheader:
+ "Our app will be temporarily unavailable due to scheduled maintenance.",
+ icon: <Clock />,
+ },
+ {
+ id: 4,
+ header: "Feedback Appreciated.",
+ subheader:
+ "We'd love to hear your thoughts on our app. Share your feedback!",
+ icon: <MessageCircle />,
+ },
+];
+
+export default function FeatureCard2() {
+ const itemVariants = {
+ initial: (index: number) => ({
+ y: 0,
+ scale: index === 3 ? 0.85 : 1,
+ transition: {
+ delay: 0.05,
+ duration: 0.3,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ }),
+ whileHover: (index: number) => ({
+ y: -100,
+ opacity: 1,
+ scale: index === 0 ? 0.85 : index === 3 ? 1 : 1,
+ transition: {
+ delay: 0.05,
+ duration: 0.3,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ }),
+ };
+
+ const containerVariants = {
+ initial: {},
+ whileHover: {
+ transition: {
+ staggerChildren: 0.1,
+ },
+ },
+ };
+
+ return (
+ <div className="relative h-full w-full transform-gpu rounded-lg border bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset] md:max-h-[500px] md:max-w-[500px]">
+ <motion.div
+ variants={containerVariants}
+ initial="initial"
+ whileHover="whileHover"
+ className="flex h-full w-full cursor-pointer flex-col justify-between gap-y-5"
+ >
+ <div className="flex h-full w-full items-center justify-center rounded-t-xl border-b border-neutral-200 dark:border-neutral-800">
+ <motion.div className="flex h-[310px] w-full cursor-pointer flex-col gap-y-3.5 overflow-hidden rounded-t-md p-5">
+ {texts.map((text, index) => (
+ <motion.div
+ key={text.id}
+ className="w-full origin-right rounded-md border border-slate-300/50 p-4 shadow-[0px_0px_40px_-25px_rgba(0,0,0,0.25)] dark:border-neutral-800 dark:bg-neutral-900"
+ custom={index}
+ variants={itemVariants}
+ >
+ <div className="flex flex-row gap-2">
+ {text.icon}
+ <p className="text-black dark:text-white">{text.header}</p>
+ </div>
+ <p className="text-gray-400 dark:text-gray-400">
+ {text.subheader}
+ </p>
+ </motion.div>
+ ))}
+ </motion.div>
+ </div>
+ <div className="flex flex-col items-start gap-y-1 px-5 pb-4">
+ <h2 className="text-xl font-semibold">Notifications</h2>
+ <p className="text-base font-normal text-neutral-500 dark:text-neutral-400">
+ Instantly get notified about events
+ </p>
+ </div>
+ </motion.div>
+ </div>
+ );
+}
diff --git a/registry/components/example/animated-feature-card-3.tsx b/registry/components/example/animated-feature-card-3.tsx
new file mode 100644
index 00000000..93a24362
--- /dev/null
+++ b/registry/components/example/animated-feature-card-3.tsx
@@ -0,0 +1,105 @@
+"use client";
+
+import { cubicBezier, motion } from "framer-motion";
+
+export default function FeatureCard3() {
+ const variant1 = {
+ initial: {
+ y: 4,
+ scale: 0.5,
+ opacity: 0,
+ transition: {
+ delay: 0.05,
+ duration: 0.3,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ whileHover: {
+ y: -2,
+ opacity: 1,
+ scale: 1,
+ transition: {
+ delay: 0.05,
+ duration: 0.3,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ };
+ const variant2 = {
+ initial: {
+ y: -2,
+ opacity: 1,
+ scale: 1,
+ transition: {
+ delay: 0.05,
+ duration: 0.3,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ whileHover: {
+ y: 8,
+ opacity: 1,
+ scale: 1.05,
+ boxShadow:
+ "rgba(39,245,76,0.15) 10px 20px 70px -20px, rgba(36,42,66,0.04) 0px 10px 24px -8px, rgba(36,42,66,0.06) 0px 1px 4px -1px",
+ transition: {
+ delay: 0.05,
+ duration: 0.3,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ };
+
+ const containerVariants = {
+ initial: {},
+ whileHover: {
+ transition: {
+ staggerChildren: 0.1,
+ },
+ },
+ };
+
+ return (
+ <div className="relative h-full w-full transform-gpu rounded-lg border bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset] md:max-h-[500px] md:max-w-[500px]">
+ <motion.div
+ variants={containerVariants}
+ initial="initial"
+ whileHover="whileHover"
+ className="flex h-full w-full cursor-pointer flex-col justify-between gap-y-5"
+ >
+ <motion.div className="flex h-full w-full cursor-pointer flex-col items-center justify-center gap-y-2 overflow-hidden rounded-t-xl border-b border-neutral-200 p-8 dark:border-neutral-800">
+ <motion.p
+ variants={variant1}
+ className="w-fit rounded-full border px-2 text-[15px]"
+ >
+ Make it Pop ✨
+ </motion.p>
+ <motion.div
+ variants={variant2}
+ className="flex max-w-[300px] items-start gap-x-2 rounded-lg border border-neutral-300 border-neutral-400/20 bg-white p-4 shadow-[0px_0px_40px_-25px_rgba(0,0,0,0.25)] dark:border-neutral-800 dark:bg-neutral-900"
+ >
+ <div className="flex h-6 w-6 shrink-0 rounded-full bg-blue-500">
+ <img
+ className="h-full w-full rounded-full object-cover"
+ src="https://avatar.vercel.sh/jane"
+ alt="jane"
+ />
+ </div>
+ <div>
+ <h3 className="text-base font-semibold">Josh</h3>
+ <p className="text-sm text-neutral-500 dark:text-neutral-400">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+ </p>
+ </div>
+ </motion.div>
+ </motion.div>
+ <div className="flex flex-col items-start gap-y-1 px-5 pb-4">
+ <h2 className="text-xl font-semibold">AI Co-Pilot</h2>
+ <p className="text-base font-normal text-neutral-500 dark:text-neutral-400">
+ Use AI to make your writing stand out
+ </p>
+ </div>
+ </motion.div>
+ </div>
+ );
+}
diff --git a/registry/components/example/animated-feature-card-4.tsx b/registry/components/example/animated-feature-card-4.tsx
new file mode 100644
index 00000000..0aecaeba
--- /dev/null
+++ b/registry/components/example/animated-feature-card-4.tsx
@@ -0,0 +1,167 @@
+"use client";
+
+import { cubicBezier, motion } from "framer-motion";
+
+export default function FeatureCard4() {
+ const variant1 = {
+ initial: {
+ x: 35,
+ y: 5,
+ scale: 0.8,
+ rotate: -3,
+ zIndex: 1,
+ transition: {
+ delay: 0.05,
+ duration: 0.1,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ whileHover: {
+ x: 0,
+ y: 0,
+ scale: 1,
+ rotate: 0,
+ boxShadow:
+ "rgba(39,245,76,0.15) 10px 20px 70px -20px, rgba(36,42,66,0.04) 0px 10px 24px -8px, rgba(36,42,66,0.06) 0px 1px 4px -1px",
+ transition: {
+ delay: 0.05,
+ duration: 0.1,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ };
+ const variant2 = {
+ initial: {
+ scale: 1.1,
+ zIndex: 2,
+ transition: {
+ delay: 0.05,
+ duration: 0.1,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ whileHover: {
+ scale: 1,
+ boxShadow:
+ "rgba(39,127,245,0.15) 0px 20px 70px -10px, rgba(36,42,66,0.04) 0px 10px 24px -8px, rgba(36,42,66,0.06) 0px 1px 4px -1px",
+ transition: {
+ delay: 0.05,
+ duration: 0.1,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ };
+ const variant3 = {
+ initial: {
+ x: -35,
+ y: 5,
+ scale: 0.8,
+ rotate: 3,
+ zIndex: 1,
+ transition: {
+ delay: 0.05,
+ duration: 0.1,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ whileHover: {
+ x: 0,
+ y: 0,
+ scale: 1,
+ rotate: 0,
+ boxShadow:
+ "rgba(245,40,145,0.15) 0px 20px 70px -10px, rgba(36,42,66,0.04) 0px 10px 24px -8px, rgba(36,42,66,0.06) 0px 1px 4px -1px",
+ transition: {
+ delay: 0.05,
+ duration: 0.1,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ };
+
+ const containerVariants = {
+ initial: {},
+ whileHover: {
+ transition: {
+ staggerChildren: 0.1,
+ },
+ },
+ };
+
+ return (
+ <div className="relative h-full w-full transform-gpu rounded-lg border bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset] md:max-h-[500px] md:max-w-[500px]">
+ <motion.div
+ variants={containerVariants}
+ initial="initial"
+ whileHover="whileHover"
+ className="flex h-full w-full cursor-pointer flex-col items-start justify-between gap-y-5"
+ >
+ <div className="flex h-full w-full items-center justify-center rounded-t-xl border-b border-neutral-200 bg-transparent p-10 dark:border-neutral-800 ">
+ <motion.div className="flex w-full items-center justify-between gap-x-4 ">
+ <motion.div
+ variants={variant1}
+ className="z-[3] flex h-fit w-full flex-col items-center justify-between gap-x-2 gap-y-2 rounded-md border border-neutral-400/20 bg-white p-5 px-2.5 transition-all duration-100 ease-linear dark:border-neutral-800 dark:bg-neutral-900"
+ >
+ <div className="h-8 w-8 rounded-full bg-pink-300">
+ <img
+ className="h-full w-full rounded-full object-cover"
+ src="https://avatar.vercel.sh/jack"
+ alt="jack"
+ />
+ </div>
+ <div className="grid grid-cols-2 gap-2">
+ <div className="h-2 w-10 rounded-full bg-neutral-700/50"></div>
+ <div className="h-2 w-10 rounded-full bg-neutral-400/80"></div>
+ <div className="h-2 w-10 rounded-full bg-neutral-300/80"></div>
+ <div className="h-2 w-10 rounded-full bg-neutral-600/80"></div>
+ </div>
+ </motion.div>
+ <motion.div
+ variants={variant2}
+ className="z-[3] flex h-fit w-full flex-col items-center justify-between gap-x-2 gap-y-2 rounded-md border border-neutral-400/20 bg-white p-5 px-2.5 transition-all duration-100 ease-linear dark:border-neutral-800 dark:bg-neutral-900"
+ >
+ <div className="h-8 w-8 rounded-full bg-pink-300">
+ <img
+ className="h-full w-full rounded-full object-cover"
+ src="https://avatar.vercel.sh/christina"
+ alt="christina"
+ />
+ </div>
+ <div className="grid grid-cols-2 gap-2">
+ <div className="h-2 w-10 rounded-full bg-neutral-700/50"></div>
+ <div className="h-2 w-10 rounded-full bg-neutral-400/80"></div>
+ <div className="h-2 w-10 rounded-full bg-neutral-300/80"></div>
+ <div className="h-2 w-10 rounded-full bg-neutral-600/80"></div>
+ </div>
+ </motion.div>
+ <motion.div
+ variants={variant3}
+ className="z-[3] flex h-fit w-full flex-col items-center justify-between gap-x-2 gap-y-2 rounded-md border border-neutral-400/20 bg-white p-5 px-2.5 transition-all duration-100 ease-linear dark:border-neutral-800 dark:bg-neutral-900"
+ >
+ <div className="h-8 w-8 rounded-full bg-pink-300">
+ <img
+ className="h-full w-full rounded-full object-cover"
+ src="https://avatar.vercel.sh/joshua"
+ alt="joshua"
+ />
+ </div>
+ <div className="grid grid-cols-2 gap-2">
+ <div className="h-2 w-10 rounded-full bg-neutral-700/50"></div>
+ <div className="h-2 w-10 rounded-full bg-neutral-400/80"></div>
+ <div className="h-2 w-10 rounded-full bg-neutral-300/80"></div>
+ <div className="h-2 w-10 rounded-full bg-neutral-600/80"></div>
+ </div>
+ </motion.div>
+ </motion.div>
+ </div>
+
+ <div className="flex flex-col items-start gap-y-1 px-5 pb-4">
+ <h2 className="text-xl font-semibold">Social</h2>
+ <p className="text-base font-normal text-neutral-500 dark:text-neutral-400">
+ Write once, share infinitely
+ </p>
+ </div>
+ </motion.div>
+ </div>
+ );
+}
diff --git a/registry/components/example/animated-feature-card-5.tsx b/registry/components/example/animated-feature-card-5.tsx
new file mode 100644
index 00000000..40e9da90
--- /dev/null
+++ b/registry/components/example/animated-feature-card-5.tsx
@@ -0,0 +1,113 @@
+"use client";
+
+import { cubicBezier, motion } from "framer-motion";
+
+export default function FeatureCard5() {
+ const variant1 = {
+ initial: {
+ viewBox: "0 -950 366 1408",
+ filter: "saturate(0.3)",
+ opacity: 0.5,
+ transition: {
+ delay: 0.05,
+ duration: 0.3,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ whileHover: {
+ viewBox: "0 -60 366 310",
+ filter: "saturate(1)",
+ opacity: 1,
+ boxShadow:
+ "rgba(245,40,145,0.35) 0px 20px 70px -10px, rgba(36,42,66,0.04) 0px 10px 24px -8px, rgba(36,42,66,0.06) 0px 1px 4px -1px",
+ transition: {
+ delay: 0.05,
+ duration: 0.3,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ };
+ const variant2 = {
+ initial: {
+ y: 0,
+ transition: {
+ delay: 0.05,
+ duration: 0.3,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ whileHover: {
+ y: 0,
+ transition: {
+ delay: 0.05,
+ duration: 0.3,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ };
+
+ const containerVariants = {
+ initial: {},
+ whileHover: {
+ transition: {
+ staggerChildren: 0.1,
+ },
+ },
+ };
+
+ return (
+ <div className="relative h-full w-full transform-gpu rounded-lg border bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset] md:max-h-[500px] md:max-w-[500px]">
+ <motion.div
+ variants={containerVariants}
+ initial="initial"
+ whileHover="whileHover"
+ className="flex h-full w-full cursor-pointer flex-col items-start justify-between gap-y-5"
+ >
+ <div className="flex h-full w-full items-center justify-center bg-transparent ">
+ <div className="relative h-full w-full cursor-pointer overflow-hidden rounded-t-xl border-b border-neutral-200 p-10 dark:border-neutral-800">
+ <div className="relative h-[150px] w-full cursor-pointer overflow-hidden rounded-xl border border-slate-200/50 bg-white dark:border-neutral-700/50 dark:bg-neutral-800">
+ <motion.p
+ variants={variant2}
+ className=" absolute left-5 top-5 z-[9] w-fit text-[15px]"
+ >
+ +245%
+ </motion.p>
+ <motion.svg
+ variants={variant1}
+ xmlns="http://www.w3.org/2000/svg"
+ fill="none"
+ preserveAspectRatio="none"
+ className="absolute inset-0 h-full w-full"
+ viewBox="0 -950 366 1408"
+ >
+ <path
+ fill="url(#a)"
+ d="M0 193c109.5 0 260.5-52.5 366-192.5v907H0V193Z"
+ />
+ <defs>
+ <linearGradient
+ id="a"
+ x1={183}
+ x2={183}
+ y1={0.5}
+ y2={262}
+ gradientUnits="userSpaceOnUse"
+ >
+ <stop stopColor="#22c55e" />
+ <stop offset={1} stopColor="#15803d" />
+ </linearGradient>
+ </defs>
+ </motion.svg>
+ </div>
+ </div>
+ </div>
+ <div className="flex flex-col items-start gap-y-1 px-5 pb-4">
+ <h2 className="text-xl font-semibold">Growth</h2>
+ <p className="text-base font-normal text-neutral-500 dark:text-neutral-400">
+ Invest and watch your money grow
+ </p>
+ </div>
+ </motion.div>
+ </div>
+ );
+}
diff --git a/registry/components/example/animated-feature-card-6.tsx b/registry/components/example/animated-feature-card-6.tsx
new file mode 100644
index 00000000..d83e1363
--- /dev/null
+++ b/registry/components/example/animated-feature-card-6.tsx
@@ -0,0 +1,121 @@
+"use client";
+
+import { cubicBezier, motion } from "framer-motion";
+
+export default function FeatureCard6() {
+ const variant1 = {
+ initial: {
+ y: 0,
+ scale: 0.95,
+ transition: {
+ delay: 0,
+ duration: 0.2,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ whileHover: {
+ y: 25,
+ x: 10,
+ scale: 1,
+ rotate: -2,
+ boxShadow:
+ "rgba(39,127,245,0.35) 0px 20px 70px -10px, rgba(36,42,66,0.04) 0px 10px 24px -8px, rgba(36,42,66,0.06) 0px 1px 4px -1px",
+ transition: {
+ delay: 0,
+ duration: 0.2,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ };
+ const variant2 = {
+ initial: {
+ y: 0,
+ scale: 0.95,
+ transition: {
+ delay: 0,
+ duration: 0.2,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ whileHover: {
+ y: -25,
+ x: -10,
+ scale: 1,
+ rotate: 3,
+ boxShadow:
+ "rgba(39,245,76,0.35) 0px 20px 70px -10px, rgba(36,42,66,0.04) 0px 10px 24px -8px, rgba(36,42,66,0.06) 0px 1px 4px -1px",
+ transition: {
+ delay: 0,
+ duration: 0.2,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ };
+
+ const containerVariants = {
+ initial: {},
+ whileHover: {
+ transition: {
+ staggerChildren: 0.1,
+ },
+ },
+ };
+
+ return (
+ <div className="relative h-full w-full transform-gpu rounded-lg border bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset] md:max-h-[500px] md:max-w-[500px]">
+ <motion.div
+ variants={containerVariants}
+ initial="initial"
+ whileHover="whileHover"
+ className="flex h-full w-full cursor-pointer flex-col items-start justify-between gap-y-5"
+ >
+ <div className="flex h-[300px] w-full items-center justify-center rounded-t-xl border-b border-neutral-200 bg-transparent dark:border-neutral-800">
+ <div className="relative flex cursor-pointer flex-col items-center justify-center gap-y-2 p-14">
+ <motion.div
+ variants={variant1}
+ className="dark:bg-neutral-980 z-[3] flex h-full w-full items-center justify-between gap-x-2 rounded-md border border-neutral-400/20 bg-white p-5 px-2.5 transition-all duration-100 ease-linear dark:border-neutral-800 dark:bg-neutral-900"
+ >
+ <div className="h-8 w-8 rounded-full bg-pink-300">
+ <img
+ className="h-full w-full rounded-full object-cover"
+ src="https://avatar.vercel.sh/jack"
+ alt="jack"
+ />
+ </div>
+ <div className="flex flex-col gap-y-2">
+ <div className="h-2 w-32 rounded-full bg-neutral-800/50 dark:bg-neutral-200/80"></div>
+ <div className="h-2 w-48 rounded-full bg-slate-400/50"></div>
+ <div className="h-2 w-20 rounded-full bg-slate-400/50"></div>
+ <div className="h-2 w-48 rounded-full bg-slate-400/50"></div>
+ </div>
+ </motion.div>
+ <motion.div
+ variants={variant2}
+ className="absolute bottom-14 z-[2] m-auto flex h-fit w-fit items-center justify-between gap-x-2 rounded-md border border-neutral-400/20 bg-white p-5 px-2.5 transition-all duration-100 ease-linear dark:border-neutral-800 dark:bg-neutral-900"
+ >
+ <div className="h-8 w-8 rounded-full bg-pink-300">
+ <img
+ className="h-full w-full rounded-full object-cover"
+ src="https://avatar.vercel.sh/jack"
+ alt="jack"
+ />
+ </div>
+ <div className="flex flex-col gap-y-2">
+ <div className="h-2 w-32 rounded-full bg-neutral-800/50 dark:bg-neutral-200/80"></div>
+ <div className="h-2 w-48 rounded-full bg-slate-400/50"></div>
+ <div className="h-2 w-20 rounded-full bg-slate-400/50"></div>
+ <div className="h-2 w-48 rounded-full bg-slate-400/50"></div>
+ </div>
+ </motion.div>
+ </div>
+ </div>
+ <div className="flex flex-col items-start gap-y-1 px-5 pb-4">
+ <h2 className="text-xl font-semibold">Share</h2>
+ <p className="text-base font-normal text-neutral-500 dark:text-neutral-400">
+ Share results with your friends
+ </p>
+ </div>
+ </motion.div>
+ </div>
+ );
+}
diff --git a/registry/components/example/animated-feature-card-7.tsx b/registry/components/example/animated-feature-card-7.tsx
new file mode 100644
index 00000000..693d7420
--- /dev/null
+++ b/registry/components/example/animated-feature-card-7.tsx
@@ -0,0 +1,144 @@
+"use client";
+
+import { cn } from "@/lib/utils";
+import Marquee from "@/registry/components/magicui/marquee";
+import { cubicBezier, motion } from "framer-motion";
+
+export default function FeatureCard7() {
+ const variant1 = {
+ initial: {
+ y: 0,
+ scale: 0.95,
+ transition: {
+ delay: 0,
+ duration: 0.2,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ whileHover: {
+ y: -10,
+ scale: 1,
+ boxShadow:
+ "rgba(39,127,245,0.15) 0px 20px 70px -10px, rgba(36,42,66,0.04) 0px 10px 24px -8px, rgba(36,42,66,0.06) 0px 1px 4px -1px",
+ transition: {
+ delay: 0,
+ duration: 0.2,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ };
+ const variant2 = {
+ initial: {
+ y: 15,
+ x: 2,
+ opacity: 0,
+ scale: 0.95,
+ transition: {
+ delay: 0,
+ duration: 0.2,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ whileHover: {
+ y: 10,
+ x: -3,
+ display: "flex",
+ opacity: 1,
+ scale: 1,
+ transition: {
+ delay: 0.1,
+ duration: 0.25,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ };
+
+ const containerVariants = {
+ initial: {},
+ whileHover: {
+ transition: {
+ staggerChildren: 0.1,
+ },
+ },
+ };
+
+ const logos = [
+ {
+ name: "Microsoft",
+ img: "https://cdn.simpleicons.org/microsoft/000/fff",
+ },
+ {
+ name: "Apple",
+ img: "https://cdn.simpleicons.org/apple/000/fff",
+ },
+ {
+ name: "Google",
+ img: "https://cdn.simpleicons.org/google/000/fff",
+ },
+ {
+ name: "Facebook",
+ img: "https://cdn.simpleicons.org/facebook/000/fff",
+ },
+ {
+ name: "LinkedIn",
+ img: "https://cdn.simpleicons.org/linkedin/000/fff",
+ },
+ {
+ name: "Twitter",
+ img: "https://cdn.simpleicons.org/twitter/000/fff",
+ },
+ ];
+
+ const Logo = ({ name, img }: { name: string; img: string }) => {
+ return (
+ <div className={cn("h-12 w-12 cursor-pointer")}>
+ <img src={img} alt={name} />
+ </div>
+ );
+ };
+
+ return (
+ <div className="relative h-full w-full transform-gpu rounded-lg border bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset] md:max-h-[500px] md:max-w-[500px]">
+ <motion.div
+ variants={containerVariants}
+ initial="initial"
+ whileHover="whileHover"
+ className="flex h-full w-full cursor-pointer flex-col items-start justify-between gap-y-5"
+ >
+ <div className="group relative flex h-[300px] w-full cursor-pointer flex-col items-center justify-center gap-y-1 overflow-hidden rounded-t-xl border-b border-neutral-200 p-4 dark:border-neutral-800 ">
+ <div className="relative flex flex-col items-center justify-center gap-y-2 px-10">
+ <Marquee className="[--gap:3rem]">
+ {logos.map((logo, idx) => (
+ <div className={cn("h-12 w-12 cursor-pointer")} key={idx}>
+ <img src={logo.img} />
+ </div>
+ ))}
+ </Marquee>
+ <Marquee className="[--gap:3rem]">
+ {logos.map((logo, idx) => (
+ <div className={cn("h-12 w-12 cursor-pointer")} key={idx}>
+ <img src={logo.img} />
+ </div>
+ ))}
+ </Marquee>
+ <Marquee className="[--gap:3rem]">
+ {logos.map((logo, idx) => (
+ <div className={cn("h-12 w-12 cursor-pointer")} key={idx}>
+ <img src={logo.img} />
+ </div>
+ ))}
+ </Marquee>
+ <div className="pointer-events-none absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-white dark:from-background"></div>
+ <div className="pointer-events-none absolute inset-y-0 right-0 w-1/3 bg-gradient-to-l from-white dark:from-background"></div>
+ </div>
+ </div>
+ <div className="flex flex-col items-start gap-y-1 px-5 pb-4">
+ <h2 className="text-xl font-semibold">Reply</h2>
+ <p className="text-base font-normal text-neutral-500 dark:text-neutral-400">
+ Easily reply to the other people
+ </p>
+ </div>
+ </motion.div>
+ </div>
+ );
+}
diff --git a/registry/components/example/animated-feature-card-8.tsx b/registry/components/example/animated-feature-card-8.tsx
new file mode 100644
index 00000000..b59936eb
--- /dev/null
+++ b/registry/components/example/animated-feature-card-8.tsx
@@ -0,0 +1,151 @@
+"use client";
+
+import { cubicBezier, motion } from "framer-motion";
+
+export default function FeatureCard8() {
+ const variant1 = {
+ initial: {
+ y: 0,
+ scale: 0.97,
+ transition: {
+ delay: 0,
+ duration: 0.2,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ whileHover: {
+ y: -45,
+ scale: 1,
+ boxShadow:
+ "rgba(39,127,245,0.15) 0px 20px 70px -10px, rgba(36,42,66,0.04) 0px 10px 24px -8px, rgba(36,42,66,0.06) 0px 1px 4px -1px",
+ transition: {
+ delay: 0,
+ duration: 0.2,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ };
+ const variant2 = {
+ initial: {
+ y: 30,
+ opacity: 0,
+ scale: 0.97,
+ transition: {
+ delay: 0,
+ duration: 0.2,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ whileHover: {
+ y: 10,
+ opacity: 1,
+ scale: 1,
+ boxShadow:
+ "rgba(245,40,145,0.05) 0px 20px 70px -10px, rgba(36,42,66,0.04) 0px 10px 24px -8px, rgba(36,42,66,0.06) 0px 1px 4px -1px",
+ transition: {
+ delay: 0,
+ duration: 0.2,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ };
+ const variant3 = {
+ initial: {
+ x: 30,
+ y: 20,
+ opacity: 0,
+ transition: {
+ delay: 0,
+ duration: 0.2,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ whileHover: {
+ x: 5,
+ y: 5,
+ opacity: 1,
+ boxShadow:
+ "rgba(39,245,76,0.15) 0px 20px 70px -10px, rgba(36,42,66,0.04) 0px 10px 24px -8px, rgba(36,42,66,0.06) 0px 1px 4px -1px",
+ transition: {
+ delay: 0.05,
+ duration: 0.2,
+ ease: cubicBezier(0.22, 1, 0.36, 1),
+ },
+ },
+ };
+
+ const containerVariants = {
+ initial: {},
+ whileHover: {
+ transition: {
+ staggerChildren: 0.1,
+ },
+ },
+ };
+
+ return (
+ <div className="relative h-full w-full transform-gpu rounded-lg border bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset] md:max-h-[500px] md:max-w-[500px]">
+ <motion.div
+ variants={containerVariants}
+ initial="initial"
+ whileHover="whileHover"
+ className="flex h-full w-full cursor-pointer flex-col items-start justify-between gap-y-5"
+ >
+ <div className="flex h-full w-full cursor-pointer flex-col items-center justify-center gap-y-1 overflow-hidden rounded-t-xl border-b border-neutral-200 bg-transparent dark:border-neutral-800">
+ <div className="relative flex flex-col items-center justify-center gap-y-2 px-10 py-20">
+ <motion.div
+ variants={variant1}
+ className=" relative flex items-start gap-x-2 rounded-lg border border-neutral-400/20 bg-white p-4 shadow-[0px_0px_40px_-25px_rgba(0,0,0,0.25)] dark:border-neutral-800 dark:bg-neutral-900"
+ >
+ <div className="h-6 w-6 rounded-full bg-blue-500">
+ <img
+ className="h-full w-full rounded-full object-cover"
+ src="https://avatar.vercel.sh/joshua"
+ alt="joshua"
+ />
+ </div>
+ <div className="w-[calc(100%-3rem)]">
+ <h3 className="text-base font-semibold">Mary</h3>
+ <p className="text-sm text-neutral-500 dark:text-neutral-400">
+ I think the design can be improved
+ </p>
+ </div>
+ </motion.div>
+ <motion.div
+ variants={variant2}
+ className=" absolute inset-10 -bottom-14 z-[3] m-auto flex h-fit items-start gap-x-2 rounded-lg border border-neutral-400/20 bg-white p-4 shadow-[0px_0px_40px_-25px_rgba(0,0,0,0.25)] dark:border-neutral-800 dark:bg-neutral-900"
+ >
+ <div className="w-8 ">
+ <div className="h-6 w-6 rounded-full bg-blue-500">
+ <img
+ className="h-full w-full rounded-full object-cover"
+ src="https://avatar.vercel.sh/christina"
+ alt="christina"
+ />
+ </div>
+ </div>
+ <div className="w-[calc(100%-3rem)]">
+ <h3 className="text-base font-semibold">Joshua</h3>
+ <p className="text-sm text-neutral-500 dark:text-neutral-400">
+ On it ✅
+ </p>
+ </div>
+ <motion.p
+ variants={variant3}
+ className="highlighted absolute -bottom-2 right-2 w-fit rounded-full border bg-cyan-500 px-2 py-0.5 text-xs text-white"
+ >
+ sent
+ </motion.p>
+ </motion.div>
+ </div>
+ </div>
+ <div className="flex flex-col items-start gap-y-1 px-5 pb-4">
+ <h2 className="text-xl font-semibold">Reply</h2>
+ <p className="text-base font-normal text-neutral-500 dark:text-neutral-400">
+ Reply to other creators in app
+ </p>
+ </div>
+ </motion.div>
+ </div>
+ );
+}
diff --git a/registry/components/example/animated-feature-card-9.tsx b/registry/components/example/animated-feature-card-9.tsx
new file mode 100644
index 00000000..7ba5bde8
--- /dev/null
+++ b/registry/components/example/animated-feature-card-9.tsx
@@ -0,0 +1,161 @@
+"use client";
+
+import { cn } from "@/lib/utils";
+import { AnimatePresence, motion } from "framer-motion";
+import React, { ReactElement, useEffect, useMemo, useState } from "react";
+
+export const AnimatedList = React.memo(
+ ({
+ className,
+ children,
+ delay = 1000,
+ }: {
+ className?: string;
+ children: React.ReactNode;
+ delay?: number;
+ }) => {
+ const [index, setIndex] = useState(0);
+ const childrenArray = React.Children.toArray(children);
+
+ useEffect(() => {
+ const interval = setInterval(() => {
+ setIndex((prevIndex) => (prevIndex + 1) % childrenArray.length);
+ }, delay);
+
+ return () => clearInterval(interval);
+ }, [childrenArray.length, delay]);
+
+ const itemsToShow = useMemo(
+ () => childrenArray.slice(0, index + 1).reverse(),
+ [index, childrenArray],
+ );
+
+ return (
+ <div className={`flex flex-col items-center gap-4 ${className}`}>
+ <AnimatePresence>
+ {itemsToShow.map((item) => (
+ <AnimatedListItem key={(item as ReactElement).key}>
+ {item}
+ </AnimatedListItem>
+ ))}
+ </AnimatePresence>
+ </div>
+ );
+ },
+);
+
+AnimatedList.displayName = "AnimatedList";
+
+export function AnimatedListItem({ children }: { children: React.ReactNode }) {
+ const animations = {
+ initial: { scale: 0, opacity: 0 },
+ animate: { scale: 1, opacity: 1, originY: 0 },
+ exit: { scale: 0, opacity: 0 },
+ transition: { type: "spring", stiffness: 350, damping: 40 },
+ };
+
+ return (
+ <motion.div {...animations} layout className="mx-auto w-full">
+ {children}
+ </motion.div>
+ );
+}
+
+interface Item {
+ name: string;
+ description: string;
+ icon: string;
+ color: string;
+ time: string;
+}
+
+let notifications = [
+ {
+ name: "Payment received",
+ description: "Magic UI",
+ time: "15m ago",
+
+ icon: "💸",
+ color: "#00C9A7",
+ },
+ {
+ name: "User signed up",
+ description: "Magic UI",
+ time: "10m ago",
+ icon: "👤",
+ color: "#FFB800",
+ },
+ {
+ name: "New message",
+ description: "Magic UI",
+ time: "5m ago",
+ icon: "💬",
+ color: "#FF3D71",
+ },
+ {
+ name: "New event",
+ description: "Magic UI",
+ time: "2m ago",
+ icon: "🗞️",
+ color: "#1E86FF",
+ },
+];
+
+notifications = Array.from({ length: 10 }, () => notifications).flat();
+
+const Notification = ({ name, description, icon, color, time }: Item) => {
+ return (
+ <figure
+ className={cn(
+ "relative mx-auto min-h-fit w-full max-w-[400px] transform cursor-pointer overflow-hidden rounded-lg p-4",
+ // animation styles
+ "transition-all duration-200 ease-in-out hover:scale-[103%]",
+ // light styles
+ "bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)]",
+ // dark styles
+ "transform-gpu dark:bg-transparent dark:backdrop-blur-md dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]",
+ )}
+ >
+ <div className="flex flex-row items-center gap-3">
+ <div
+ className="flex h-10 w-10 items-center justify-center rounded-2xl"
+ style={{
+ backgroundColor: color,
+ }}
+ >
+ <span className="text-lg">{icon}</span>
+ </div>
+ <div className="flex flex-col overflow-hidden">
+ <figcaption className="flex flex-row items-center whitespace-pre text-lg font-medium dark:text-white ">
+ <span className="text-sm sm:text-lg">{name}</span>
+ <span className="mx-1">·</span>
+ <span className="text-xs text-gray-500">{time}</span>
+ </figcaption>
+ <p className="text-sm font-normal dark:text-white/60">
+ {description}
+ </p>
+ </div>
+ </div>
+ </figure>
+ );
+};
+
+export default function FeatureCard9() {
+ return (
+ <div className="relative flex h-full max-h-[500px] min-h-[500px] w-full transform-gpu flex-col justify-between overflow-hidden rounded-lg border bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset] md:max-w-[500px]">
+ <div className="flex items-center justify-center overflow-hidden">
+ <AnimatedList>
+ {notifications.map((item, idx) => (
+ <Notification {...item} key={idx} />
+ ))}
+ </AnimatedList>
+ </div>
+ <div className="flex flex-col items-start gap-y-1 border-t border-neutral-200 p-4">
+ <h2 className="text-xl font-semibold">Notifications</h2>
+ <p className="text-base font-normal text-neutral-500 dark:text-neutral-400">
+ Get realtime notifications for events you subscribe too
+ </p>
+ </div>
+ </div>
+ );
+}
diff --git a/registry/components/example/animated-list-demo.tsx b/registry/components/example/animated-list-demo.tsx
index a5e3a6a6..06f57f70 100644
--- a/registry/components/example/animated-list-demo.tsx
+++ b/registry/components/example/animated-list-demo.tsx
@@ -84,7 +84,7 @@ const Notification = ({ name, description, icon, color, time }: Item) => {
export default function AnimatedListDemo() {
return (
- <div className="relative flex max-h-[500px] min-h-[500px] w-full flex-col overflow-hidden rounded-lg border bg-background p-6 shadow-lg">
+ <div className="relative flex max-h-[400px] min-h-[400px] w-full flex-col overflow-hidden rounded-lg border bg-background p-6 shadow-lg md:max-w-lg">
<AnimatedList>
{notifications.map((item, idx) => (
<Notification {...item} key={idx} />
diff --git a/registry/index.tsx b/registry/index.tsx
index 90237834..48bb26f1 100644
--- a/registry/index.tsx
+++ b/registry/index.tsx
@@ -420,6 +420,86 @@ const example: Registry = {
import("@/registry/components/example/animated-beam-multiple-outputs"),
),
},
+ "animated-feature-card-1": {
+ name: "animated-feature-card-1",
+ type: "components:example",
+ files: ["registry/components/example/animated-feature-card-1.tsx"],
+ component: React.lazy(
+ () => import("@/registry/components/example/animated-feature-card-1"),
+ ),
+ },
+ "animated-feature-card-2": {
+ name: "animated-feature-card-2",
+ type: "components:example",
+ files: ["registry/components/example/animated-feature-card-2.tsx"],
+ component: React.lazy(
+ () => import("@/registry/components/example/animated-feature-card-2"),
+ ),
+ },
+ "animated-feature-card-3": {
+ name: "animated-feature-card-3",
+ type: "components:example",
+ files: ["registry/components/example/animated-feature-card-3.tsx"],
+ component: React.lazy(
+ () => import("@/registry/components/example/animated-feature-card-3"),
+ ),
+ },
+ "animated-feature-card-4": {
+ name: "animated-feature-card-4",
+ type: "components:example",
+ files: ["registry/components/example/animated-feature-card-4.tsx"],
+ component: React.lazy(
+ () => import("@/registry/components/example/animated-feature-card-4"),
+ ),
+ },
+ "animated-feature-card-5": {
+ name: "animated-feature-card-5",
+ type: "components:example",
+ files: ["registry/components/example/animated-feature-card-5.tsx"],
+ component: React.lazy(
+ () => import("@/registry/components/example/animated-feature-card-5"),
+ ),
+ },
+ "animated-feature-card-6": {
+ name: "animated-feature-card-6",
+ type: "components:example",
+ files: ["registry/components/example/animated-feature-card-6.tsx"],
+ component: React.lazy(
+ () => import("@/registry/components/example/animated-feature-card-6"),
+ ),
+ },
+ "animated-feature-card-7": {
+ name: "animated-feature-card-7",
+ type: "components:example",
+ files: ["registry/components/example/animated-feature-card-7.tsx"],
+ component: React.lazy(
+ () => import("@/registry/components/example/animated-feature-card-7"),
+ ),
+ },
+ "animated-feature-card-8": {
+ name: "animated-feature-card-8",
+ type: "components:example",
+ files: ["registry/components/example/animated-feature-card-8.tsx"],
+ component: React.lazy(
+ () => import("@/registry/components/example/animated-feature-card-8"),
+ ),
+ },
+ "animated-feature-card-9": {
+ name: "animated-feature-card-9",
+ type: "components:example",
+ files: ["registry/components/example/animated-feature-card-9.tsx"],
+ component: React.lazy(
+ () => import("@/registry/components/example/animated-feature-card-9"),
+ ),
+ },
+ "animated-feature-card-10": {
+ name: "animated-feature-card-10",
+ type: "components:example",
+ files: ["registry/components/example/animated-feature-card-10.tsx"],
+ component: React.lazy(
+ () => import("@/registry/components/example/animated-feature-card-10"),
+ ),
+ },
};
const blocks: Registry = {