Home / File/ aspect-ratio-rtl.tsx — ui Source File

aspect-ratio-rtl.tsx — ui Source File

Architecture documentation for aspect-ratio-rtl.tsx, a tsx file in the ui codebase. 4 imports, 0 dependents.

File tsx DocumentationAtlas SearchAPI 4 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  77832446_0ac5_3647_ecc0_6002b3c9eb89["aspect-ratio-rtl.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  77832446_0ac5_3647_ecc0_6002b3c9eb89 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  3eb36dd7_f51a_1431_02e2_7abafe315718["image"]
  77832446_0ac5_3647_ecc0_6002b3c9eb89 --> 3eb36dd7_f51a_1431_02e2_7abafe315718
  1adb01a4_a9b1_d356_f874_948aa487cd9f["aspect-ratio"]
  77832446_0ac5_3647_ecc0_6002b3c9eb89 --> 1adb01a4_a9b1_d356_f874_948aa487cd9f
  2c1404ab_bf28_6225_f9a0_b9e29400c66c["language-selector"]
  77832446_0ac5_3647_ecc0_6002b3c9eb89 --> 2c1404ab_bf28_6225_f9a0_b9e29400c66c
  style 77832446_0ac5_3647_ecc0_6002b3c9eb89 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import Image from "next/image"
import { AspectRatio } from "@/examples/radix/ui-rtl/aspect-ratio"

import {
  useTranslation,
  type Translations,
} from "@/components/language-selector"

const translations: Translations = {
  en: {
    dir: "ltr",
    values: {
      caption: "Beautiful landscape",
    },
  },
  ar: {
    dir: "rtl",
    values: {
      caption: "منظر طبيعي جميل",
    },
  },
  he: {
    dir: "rtl",
    values: {
      caption: "נוף יפה",
    },
  },
}

export function AspectRatioRtl() {
  const { dir, t } = useTranslation(translations, "ar")

  return (
    <figure className="w-full max-w-sm" dir={dir}>
      <AspectRatio ratio={16 / 9} className="bg-muted rounded-lg">
        <Image
          src="https://avatar.vercel.sh/shadcn1"
          alt="Photo"
          fill
          className="w-full rounded-lg object-cover grayscale dark:brightness-20"
        />
      </AspectRatio>
      <figcaption className="text-muted-foreground mt-2 text-center text-sm">
        {t.caption}
      </figcaption>
    </figure>
  )
}

Subdomains

Functions

Dependencies

  • aspect-ratio
  • image
  • language-selector
  • react

Frequently Asked Questions

What does aspect-ratio-rtl.tsx do?
aspect-ratio-rtl.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, SearchAPI subdomain.
What functions are defined in aspect-ratio-rtl.tsx?
aspect-ratio-rtl.tsx defines 1 function(s): AspectRatioRtl.
What does aspect-ratio-rtl.tsx depend on?
aspect-ratio-rtl.tsx imports 4 module(s): aspect-ratio, image, language-selector, react.
Where is aspect-ratio-rtl.tsx in the architecture?
aspect-ratio-rtl.tsx is located at apps/v4/examples/radix/aspect-ratio-rtl.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/examples/radix).

Analyze Your Own Codebase

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

Try Supermodel Free