Home / Function/ SelectRtl() — ui Function Reference

SelectRtl() — ui Function Reference

Architecture documentation for the SelectRtl() function in select-rtl.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  208aace5_9c01_e37c_df14_925092ee14b2["SelectRtl()"]
  fb962ced_13cc_c8f6_7825_3b70b7581a47["select-rtl.tsx"]
  208aace5_9c01_e37c_df14_925092ee14b2 -->|defined in| fb962ced_13cc_c8f6_7825_3b70b7581a47
  style 208aace5_9c01_e37c_df14_925092ee14b2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/radix/select-rtl.tsx lines 71–115

export function SelectRtl() {
  const { dir, t, language } = useTranslation(translations, "ar")
  const [selectedFruit, setSelectedFruit] = React.useState<string>("")

  const fruits = [
    { label: t.apple, value: "apple" },
    { label: t.banana, value: "banana" },
    { label: t.blueberry, value: "blueberry" },
    { label: t.grapes, value: "grapes" },
    { label: t.pineapple, value: "pineapple" },
  ]

  const vegetables = [
    { label: t.carrot, value: "carrot" },
    { label: t.broccoli, value: "broccoli" },
    { label: t.spinach, value: "spinach" },
  ]

  return (
    <Select value={selectedFruit} onValueChange={setSelectedFruit}>
      <SelectTrigger className="w-32" dir={dir}>
        <SelectValue placeholder={t.selectFruit} />
      </SelectTrigger>
      <SelectContent dir={dir} data-lang={dir === "rtl" ? language : undefined}>
        <SelectGroup>
          <SelectLabel>{t.fruits}</SelectLabel>
          {fruits.map((item) => (
            <SelectItem key={item.value} value={item.value}>
              {item.label}
            </SelectItem>
          ))}
        </SelectGroup>
        <SelectSeparator />
        <SelectGroup>
          <SelectLabel>{t.vegetables}</SelectLabel>
          {vegetables.map((item) => (
            <SelectItem key={item.value} value={item.value}>
              {item.label}
            </SelectItem>
          ))}
        </SelectGroup>
      </SelectContent>
    </Select>
  )
}

Subdomains

Frequently Asked Questions

What does SelectRtl() do?
SelectRtl() is a function in the ui codebase, defined in apps/v4/examples/radix/select-rtl.tsx.
Where is SelectRtl() defined?
SelectRtl() is defined in apps/v4/examples/radix/select-rtl.tsx at line 71.

Analyze Your Own Codebase

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

Try Supermodel Free