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
  ca09c515_67ae_c59d_50ab_d359ecae58e5["input-otp-rtl.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  ca09c515_67ae_c59d_50ab_d359ecae58e5 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  7e9c1e20_5a8a_4152_90a3_40c280dc340e["field"]
  ca09c515_67ae_c59d_50ab_d359ecae58e5 --> 7e9c1e20_5a8a_4152_90a3_40c280dc340e
  94defded_ada6_29d9_baa8_98a77f1fbea7["input-otp"]
  ca09c515_67ae_c59d_50ab_d359ecae58e5 --> 94defded_ada6_29d9_baa8_98a77f1fbea7
  2c1404ab_bf28_6225_f9a0_b9e29400c66c["language-selector"]
  ca09c515_67ae_c59d_50ab_d359ecae58e5 --> 2c1404ab_bf28_6225_f9a0_b9e29400c66c
  style ca09c515_67ae_c59d_50ab_d359ecae58e5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { Field, FieldLabel } from "@/examples/base/ui-rtl/field"
import {
  InputOTP,
  InputOTPGroup,
  InputOTPSlot,
} from "@/examples/base/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/base/input-otp-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