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.
Entity Profile
Dependency Diagram
graph LR b3942095_ebda_8e93_7c8c_e210fd535050["aspect-ratio-rtl.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] b3942095_ebda_8e93_7c8c_e210fd535050 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 3eb36dd7_f51a_1431_02e2_7abafe315718["image"] b3942095_ebda_8e93_7c8c_e210fd535050 --> 3eb36dd7_f51a_1431_02e2_7abafe315718 d826c103_f3ad_f3d6_d7c9_f6d12de070a1["aspect-ratio"] b3942095_ebda_8e93_7c8c_e210fd535050 --> d826c103_f3ad_f3d6_d7c9_f6d12de070a1 2c1404ab_bf28_6225_f9a0_b9e29400c66c["language-selector"] b3942095_ebda_8e93_7c8c_e210fd535050 --> 2c1404ab_bf28_6225_f9a0_b9e29400c66c style b3942095_ebda_8e93_7c8c_e210fd535050 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/base/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="rounded-lg object-cover grayscale dark:brightness-20"
/>
</AspectRatio>
<figcaption className="text-muted-foreground mt-2 text-center text-sm">
{t.caption}
</figcaption>
</figure>
)
}
Domain
Subdomains
Functions
Dependencies
- aspect-ratio
- image
- language-selector
- react
Source
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/base/aspect-ratio-rtl.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, 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