Home / File/ input-otp-rtl.tsx — ui Source File

input-otp-rtl.tsx — ui Source File

Architecture documentation for input-otp-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
  e74fd309_e41f_b7cc_c334_ced4d21e5afe["input-otp-rtl.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  e74fd309_e41f_b7cc_c334_ced4d21e5afe --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  68874b2d_841d_f625_bf4f_104dc94b730e["field"]
  e74fd309_e41f_b7cc_c334_ced4d21e5afe --> 68874b2d_841d_f625_bf4f_104dc94b730e
  879e9ba5_b2ce_6ec4_02ca_a65f8ebeb65f["input-otp"]
  e74fd309_e41f_b7cc_c334_ced4d21e5afe --> 879e9ba5_b2ce_6ec4_02ca_a65f8ebeb65f
  2c1404ab_bf28_6225_f9a0_b9e29400c66c["language-selector"]
  e74fd309_e41f_b7cc_c334_ced4d21e5afe --> 2c1404ab_bf28_6225_f9a0_b9e29400c66c
  style e74fd309_e41f_b7cc_c334_ced4d21e5afe fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { Field, FieldLabel } from "@/examples/radix/ui-rtl/field"
import {
  InputOTP,
  InputOTPGroup,
  InputOTPSlot,
} from "@/examples/radix/ui-rtl/input-otp"

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

const translations: Translations = {
  en: {
    dir: "ltr",
    values: {
      verificationCode: "Verification code",
    },
  },
  ar: {
    dir: "rtl",
    values: {
      verificationCode: "رمز التحقق",
    },
  },
  he: {
    dir: "rtl",
    values: {
      verificationCode: "קוד אימות",
    },
  },
}

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

  return (
    <Field className="mx-auto max-w-xs">
      <FieldLabel htmlFor="input-otp-rtl">{t.verificationCode}</FieldLabel>
      <InputOTP
        maxLength={6}
        defaultValue="123456"
        dir={dir}
        id="input-otp-rtl"
      >
        <InputOTPGroup>
          <InputOTPSlot index={0} />
          <InputOTPSlot index={1} />
          <InputOTPSlot index={2} />
          <InputOTPSlot index={3} />
          <InputOTPSlot index={4} />
          <InputOTPSlot index={5} />
        </InputOTPGroup>
      </InputOTP>
    </Field>
  )
}

Subdomains

Functions

Dependencies

  • field
  • input-otp
  • language-selector
  • react

Frequently Asked Questions

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