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

toggle-group-rtl.tsx — ui Source File

Architecture documentation for toggle-group-rtl.tsx, a tsx file in the ui codebase. 2 imports, 0 dependents.

File tsx DocumentationAtlas ContentSourcing 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  a8c98ded_b2c1_57b8_9ed6_85e3b4be53b0["toggle-group-rtl.tsx"]
  e06183f1_0018_762b_f331_c7997076a23c["toggle-group"]
  a8c98ded_b2c1_57b8_9ed6_85e3b4be53b0 --> e06183f1_0018_762b_f331_c7997076a23c
  2c1404ab_bf28_6225_f9a0_b9e29400c66c["language-selector"]
  a8c98ded_b2c1_57b8_9ed6_85e3b4be53b0 --> 2c1404ab_bf28_6225_f9a0_b9e29400c66c
  style a8c98ded_b2c1_57b8_9ed6_85e3b4be53b0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import {
  ToggleGroup,
  ToggleGroupItem,
} from "@/examples/radix/ui-rtl/toggle-group"

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

const translations: Translations = {
  en: {
    dir: "ltr",
    values: {
      list: "List",
      grid: "Grid",
      cards: "Cards",
    },
  },
  ar: {
    dir: "rtl",
    values: {
      list: "قائمة",
      grid: "شبكة",
      cards: "بطاقات",
    },
  },
  he: {
    dir: "rtl",
    values: {
      list: "רשימה",
      grid: "רשת",
      cards: "כרטיסים",
    },
  },
}

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

  return (
    <ToggleGroup variant="outline" type="single" defaultValue="list">
      <ToggleGroupItem value="list" aria-label={t.list}>
        {t.list}
      </ToggleGroupItem>
      <ToggleGroupItem value="grid" aria-label={t.grid}>
        {t.grid}
      </ToggleGroupItem>
      <ToggleGroupItem value="cards" aria-label={t.cards}>
        {t.cards}
      </ToggleGroupItem>
    </ToggleGroup>
  )
}

Subdomains

Functions

Dependencies

  • language-selector
  • toggle-group

Frequently Asked Questions

What does toggle-group-rtl.tsx do?
toggle-group-rtl.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, ContentSourcing subdomain.
What functions are defined in toggle-group-rtl.tsx?
toggle-group-rtl.tsx defines 1 function(s): ToggleGroupRtl.
What does toggle-group-rtl.tsx depend on?
toggle-group-rtl.tsx imports 2 module(s): language-selector, toggle-group.
Where is toggle-group-rtl.tsx in the architecture?
toggle-group-rtl.tsx is located at apps/v4/examples/radix/toggle-group-rtl.tsx (domain: DocumentationAtlas, subdomain: ContentSourcing, 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