{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "interactive-timeline-shadcnui", "type": "registry:component", "title": "Interactive Timeline", "description": "Vertical timeline where elements animate and connect with lines on scroll", "registryDependencies": [ "button" ], "dependencies": [ "framer-motion", "react" ], "files": [ { "path": "@uitripled/react-shadcn/src/components/motion-core/interactive-timeline.tsx", "content": "\"use client\";\n\nimport { motion, useInView } from \"framer-motion\";\nimport { useRef } from \"react\";\n\ntype TimelineItem = {\n id: string;\n title: string;\n description: string;\n date?: string;\n};\n\ntype InteractiveTimelineProps = {\n items?: TimelineItem[];\n};\n\nfunction TimelineItemComponent({\n item,\n index,\n}: {\n item: TimelineItem;\n index: number;\n}) {\n const itemRef = useRef(null);\n const itemInView = useInView(itemRef, {\n once: true,\n margin: \"-100px\",\n });\n\n return (\n
\n {/* Timeline dot */}\n \n\n {/* Content */}\n \n {item.date && (\n {item.date}\n )}\n

{item.title}

\n

{item.description}

\n \n
\n );\n}\n\nexport function InteractiveTimeline({\n items = [\n { id: \"1\", title: \"Started\", description: \"Project began\", date: \"2024\" },\n {\n id: \"2\",\n title: \"Development\",\n description: \"Active development phase\",\n date: \"2024\",\n },\n { id: \"3\", title: \"Launch\", description: \"Project launched\", date: \"2024\" },\n ],\n}: InteractiveTimelineProps) {\n const ref = useRef(null);\n const isInView = useInView(ref, { once: true, margin: \"-50px\" });\n\n return (\n
\n {/* Timeline line */}\n \n\n
\n {items.map((item, index) => (\n \n ))}\n
\n
\n );\n}\n", "type": "registry:component", "target": "components/uitripled/interactive-timeline-shadcnui.tsx" } ] }