Home / File/ radio-group-rtl.tsx — ui Source File

radio-group-rtl.tsx — ui Source File

Architecture documentation for radio-group-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
  454b3336_29f3_4eb5_0c85_fa4357663b9f["radio-group-rtl.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  454b3336_29f3_4eb5_0c85_fa4357663b9f --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  68874b2d_841d_f625_bf4f_104dc94b730e["field"]
  454b3336_29f3_4eb5_0c85_fa4357663b9f --> 68874b2d_841d_f625_bf4f_104dc94b730e
  94579a75_ff23_ddf7_4590_f571fa3622cd["radio-group"]
  454b3336_29f3_4eb5_0c85_fa4357663b9f --> 94579a75_ff23_ddf7_4590_f571fa3622cd
  2c1404ab_bf28_6225_f9a0_b9e29400c66c["language-selector"]
  454b3336_29f3_4eb5_0c85_fa4357663b9f --> 2c1404ab_bf28_6225_f9a0_b9e29400c66c
  style 454b3336_29f3_4eb5_0c85_fa4357663b9f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import {
  Field,
  FieldContent,
  FieldDescription,
  FieldLabel,
} from "@/examples/radix/ui-rtl/field"
import { RadioGroup, RadioGroupItem } from "@/examples/radix/ui-rtl/radio-group"

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

const translations: Translations = {
  en: {
    dir: "ltr",
    values: {
      default: "Default",
      defaultDescription: "Standard spacing for most use cases.",
      comfortable: "Comfortable",
      comfortableDescription: "More space between elements.",
      compact: "Compact",
      compactDescription: "Minimal spacing for dense layouts.",
    },
  },
  ar: {
    dir: "rtl",
    values: {
      default: "افتراضي",
      defaultDescription: "تباعد قياسي لمعظم حالات الاستخدام.",
      comfortable: "مريح",
      comfortableDescription: "مساحة أكبر بين العناصر.",
      compact: "مضغوط",
      compactDescription: "تباعد أدنى للتخطيطات الكثيفة.",
    },
  },
  he: {
    dir: "rtl",
    values: {
      default: "ברירת מחדל",
      defaultDescription: "ריווח סטנדרטי לרוב מקרי השימוש.",
      comfortable: "נוח",
      comfortableDescription: "יותר מקום בין האלמנטים.",
      compact: "קומפקטי",
      compactDescription: "ריווח מינימלי לפריסות צפופות.",
    },
  },
}

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

  return (
    <RadioGroup defaultValue="comfortable" className="w-fit" dir={dir}>
      <Field orientation="horizontal">
        <RadioGroupItem value="default" id="r1-rtl" dir={dir} />
        <FieldContent>
          <FieldLabel htmlFor="r1-rtl" dir={dir}>
            {t.default}
          </FieldLabel>
          <FieldDescription dir={dir}>{t.defaultDescription}</FieldDescription>
        </FieldContent>
      </Field>
      <Field orientation="horizontal">
        <RadioGroupItem value="comfortable" id="r2-rtl" dir={dir} />
        <FieldContent>
          <FieldLabel htmlFor="r2-rtl" dir={dir}>
            {t.comfortable}
          </FieldLabel>
          <FieldDescription dir={dir}>
            {t.comfortableDescription}
          </FieldDescription>
        </FieldContent>
      </Field>
      <Field orientation="horizontal">
        <RadioGroupItem value="compact" id="r3-rtl" dir={dir} />
        <FieldContent>
          <FieldLabel htmlFor="r3-rtl" dir={dir}>
            {t.compact}
          </FieldLabel>
          <FieldDescription dir={dir}>{t.compactDescription}</FieldDescription>
        </FieldContent>
      </Field>
    </RadioGroup>
  )
}

Subdomains

Functions

Dependencies

  • field
  • language-selector
  • radio-group
  • react

Frequently Asked Questions

What does radio-group-rtl.tsx do?
radio-group-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 radio-group-rtl.tsx?
radio-group-rtl.tsx defines 1 function(s): RadioGroupRtl.
What does radio-group-rtl.tsx depend on?
radio-group-rtl.tsx imports 4 module(s): field, language-selector, radio-group, react.
Where is radio-group-rtl.tsx in the architecture?
radio-group-rtl.tsx is located at apps/v4/examples/radix/radio-group-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