CarouselPrevious() — ui Function Reference
Architecture documentation for the CarouselPrevious() function in carousel.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 355982f0_70bd_8cb1_b879_a47f8d4aa15c["CarouselPrevious()"] 60c085f4_a46a_b0b3_ed68_c0d706f24e67["carousel.tsx"] 355982f0_70bd_8cb1_b879_a47f8d4aa15c -->|defined in| 60c085f4_a46a_b0b3_ed68_c0d706f24e67 cd98b01d_e8fb_3b38_f534_d0589b55de3b["useCarousel()"] 355982f0_70bd_8cb1_b879_a47f8d4aa15c -->|calls| cd98b01d_e8fb_3b38_f534_d0589b55de3b style 355982f0_70bd_8cb1_b879_a47f8d4aa15c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/examples/radix/ui/carousel.tsx lines 173–201
function CarouselPrevious({
className,
variant = "outline",
size = "icon-sm",
...props
}: React.ComponentProps<typeof Button>) {
const { orientation, scrollPrev, canScrollPrev } = useCarousel()
return (
<Button
data-slot="carousel-previous"
variant={variant}
size={size}
className={cn(
"absolute touch-manipulation rounded-full",
orientation === "horizontal"
? "top-1/2 -left-12 -translate-y-1/2"
: "-top-12 left-1/2 -translate-x-1/2 rotate-90",
className
)}
disabled={!canScrollPrev}
onClick={scrollPrev}
{...props}
>
<ChevronLeftIcon className="cn-rtl-flip" />
<span className="sr-only">Previous slide</span>
</Button>
)
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does CarouselPrevious() do?
CarouselPrevious() is a function in the ui codebase, defined in apps/v4/examples/radix/ui/carousel.tsx.
Where is CarouselPrevious() defined?
CarouselPrevious() is defined in apps/v4/examples/radix/ui/carousel.tsx at line 173.
What does CarouselPrevious() call?
CarouselPrevious() calls 1 function(s): useCarousel.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free