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 8cbf7445_baec_5a9a_12d3_cd7b8950b782["carousel-plugin.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 8cbf7445_baec_5a9a_12d3_cd7b8950b782 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 a66f2388_87f1_5188_51e6_9a4b91cfd618["card"] 8cbf7445_baec_5a9a_12d3_cd7b8950b782 --> a66f2388_87f1_5188_51e6_9a4b91cfd618 55aa8f7a_d371_540f_df99_7f331dfc2500["carousel"] 8cbf7445_baec_5a9a_12d3_cd7b8950b782 --> 55aa8f7a_d371_540f_df99_7f331dfc2500 be51ebeb_aca3_1b75_3747_8d00a4cb95b0["embla-carousel-autoplay"] 8cbf7445_baec_5a9a_12d3_cd7b8950b782 --> be51ebeb_aca3_1b75_3747_8d00a4cb95b0 style 8cbf7445_baec_5a9a_12d3_cd7b8950b782 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import { Card, CardContent } from "@/examples/base/ui/card"
import {
Carousel,
CarouselContent,
CarouselItem,
CarouselNext,
CarouselPrevious,
} from "@/examples/base/ui/carousel"
import Autoplay from "embla-carousel-autoplay"
export default function CarouselPlugin() {
const plugin = React.useRef(
Autoplay({ delay: 2000, stopOnInteraction: true })
)
return (
<Carousel
plugins={[plugin.current]}
className="w-full max-w-[10rem] sm: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 DocumentationAtlas domain, ContentSourcing 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/examples/base/carousel-plugin.tsx (domain: DocumentationAtlas, subdomain: ContentSourcing, directory: apps/v4/examples/base).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free