Home / Function/ CarouselRtl() — ui Function Reference

CarouselRtl() — ui Function Reference

Architecture documentation for the CarouselRtl() function in carousel-rtl.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  05dd92fa_19f6_fb1b_efcd_6ca27a63cd85["CarouselRtl()"]
  ee5f77de_c428_7cc9_5d60_6e845e4412c1["carousel-rtl.tsx"]
  05dd92fa_19f6_fb1b_efcd_6ca27a63cd85 -->|defined in| ee5f77de_c428_7cc9_5d60_6e845e4412c1
  5b93a771_d091_7dd6_caad_cdaab1ff0dc1["toArabicNumerals()"]
  05dd92fa_19f6_fb1b_efcd_6ca27a63cd85 -->|calls| 5b93a771_d091_7dd6_caad_cdaab1ff0dc1
  style 05dd92fa_19f6_fb1b_efcd_6ca27a63cd85 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/base/carousel-rtl.tsx lines 42–79

export function CarouselRtl() {
  const { dir, language } = useTranslation(translations, "ar")

  const formatNumber = (num: number): string => {
    if (language === "ar") {
      return toArabicNumerals(num)
    }
    return num.toString()
  }

  return (
    <Carousel
      dir={dir}
      className="w-full max-w-[12rem] sm:max-w-xs"
      opts={{
        direction: dir,
      }}
    >
      <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">
                    {formatNumber(index + 1)}
                  </span>
                </CardContent>
              </Card>
            </div>
          </CarouselItem>
        ))}
      </CarouselContent>
      <CarouselPrevious />
      <CarouselNext />
    </Carousel>
  )
}

Subdomains

Frequently Asked Questions

What does CarouselRtl() do?
CarouselRtl() is a function in the ui codebase, defined in apps/v4/examples/base/carousel-rtl.tsx.
Where is CarouselRtl() defined?
CarouselRtl() is defined in apps/v4/examples/base/carousel-rtl.tsx at line 42.
What does CarouselRtl() call?
CarouselRtl() calls 1 function(s): toArabicNumerals.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free