carousel-plugin.tsx — ui Source File
Architecture documentation for carousel-plugin.tsx, a tsx file in the ui codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 104227ce_9f61_57a4_4548_bdb312b87486["carousel-plugin.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 104227ce_9f61_57a4_4548_bdb312b87486 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 be51ebeb_aca3_1b75_3747_8d00a4cb95b0["embla-carousel-autoplay"] 104227ce_9f61_57a4_4548_bdb312b87486 --> be51ebeb_aca3_1b75_3747_8d00a4cb95b0 c6d6139d_ea69_3d79_5004_68419bae2ac0["card"] 104227ce_9f61_57a4_4548_bdb312b87486 --> c6d6139d_ea69_3d79_5004_68419bae2ac0 0a2a99e8_d3cf_faf2_ffc2_338ee3d9c8f3["carousel"] 104227ce_9f61_57a4_4548_bdb312b87486 --> 0a2a99e8_d3cf_faf2_ffc2_338ee3d9c8f3 style 104227ce_9f61_57a4_4548_bdb312b87486 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import Autoplay from "embla-carousel-autoplay"
import { Card, CardContent } from "@/registry/new-york-v4/ui/card"
import {
Carousel,
CarouselContent,
CarouselItem,
CarouselNext,
CarouselPrevious,
} from "@/registry/new-york-v4/ui/carousel"
export default function CarouselPlugin() {
const plugin = React.useRef(
Autoplay({ delay: 2000, stopOnInteraction: true })
)
return (
<Carousel
plugins={[plugin.current]}
className="w-full max-w-xs"
onMouseEnter={plugin.current.stop}
onMouseLeave={plugin.current.reset}
>
<CarouselContent>
{Array.from({ length: 5 }).map((_, index) => (
<CarouselItem key={index}>
<div className="p-1">
<Card>
<CardContent className="flex aspect-square items-center justify-center p-6">
<span className="text-4xl font-semibold">{index + 1}</span>
</CardContent>
</Card>
</div>
</CarouselItem>
))}
</CarouselContent>
<CarouselPrevious />
<CarouselNext />
</Carousel>
)
}
Domain
Subdomains
Functions
Dependencies
- card
- carousel
- embla-carousel-autoplay
- react
Source
Frequently Asked Questions
What does carousel-plugin.tsx do?
carousel-plugin.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in carousel-plugin.tsx?
carousel-plugin.tsx defines 1 function(s): CarouselPlugin.
What does carousel-plugin.tsx depend on?
carousel-plugin.tsx imports 4 module(s): card, carousel, embla-carousel-autoplay, react.
Where is carousel-plugin.tsx in the architecture?
carousel-plugin.tsx is located at apps/v4/registry/new-york-v4/examples/carousel-plugin.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/new-york-v4/examples).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free