Home / Function/ CarouselNext() — ui Function Reference

CarouselNext() — ui Function Reference

Architecture documentation for the CarouselNext() function in carousel.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  571bbe00_8d1b_4068_3322_e79684d183dc["CarouselNext()"]
  7e7652ce_fc95_8d6e_4506_c860f14d1d73["carousel.tsx"]
  571bbe00_8d1b_4068_3322_e79684d183dc -->|defined in| 7e7652ce_fc95_8d6e_4506_c860f14d1d73
  0f21d8da_a9b4_9bf1_b6da_e8ba979e307c["useCarousel()"]
  571bbe00_8d1b_4068_3322_e79684d183dc -->|calls| 0f21d8da_a9b4_9bf1_b6da_e8ba979e307c
  style 571bbe00_8d1b_4068_3322_e79684d183dc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/radix/ui-rtl/carousel.tsx lines 203–231

function CarouselNext({
  className,
  variant = "outline",
  size = "icon-sm",
  ...props
}: React.ComponentProps<typeof Button>) {
  const { orientation, scrollNext, canScrollNext } = useCarousel()

  return (
    <Button
      data-slot="carousel-next"
      variant={variant}
      size={size}
      className={cn(
        "absolute touch-manipulation rounded-full",
        orientation === "horizontal"
          ? "-end-12 top-1/2 -translate-y-1/2"
          : "start-1/2 -bottom-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2",
        className
      )}
      disabled={!canScrollNext}
      onClick={scrollNext}
      {...props}
    >
      <ChevronRightIcon className="rtl:rotate-180" />
      <span className="sr-only">Next slide</span>
    </Button>
  )
}

Subdomains

Frequently Asked Questions

What does CarouselNext() do?
CarouselNext() is a function in the ui codebase, defined in apps/v4/examples/radix/ui-rtl/carousel.tsx.
Where is CarouselNext() defined?
CarouselNext() is defined in apps/v4/examples/radix/ui-rtl/carousel.tsx at line 203.
What does CarouselNext() call?
CarouselNext() 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