FieldRtl() — ui Function Reference
Architecture documentation for the FieldRtl() function in field-rtl.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD feca4068_3698_75d4_088b_6e8287768518["FieldRtl()"] 004d72de_f38d_c966_62b3_7f430bf895d9["field-rtl.tsx"] feca4068_3698_75d4_088b_6e8287768518 -->|defined in| 004d72de_f38d_c966_62b3_7f430bf895d9 style feca4068_3698_75d4_088b_6e8287768518 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/examples/base/field-rtl.tsx lines 160–289
export function FieldRtl() {
const { dir, t } = useTranslation(translations, "ar")
const getMonthLabel = (value: string | null): string => {
if (value === null) return t.monthPlaceholder
const monthKey = `month${value}` as keyof typeof t
return t[monthKey] || value
}
return (
<div className="w-full max-w-md py-6" dir={dir}>
<form>
<FieldGroup>
<FieldSet>
<FieldLegend>{t.paymentMethod}</FieldLegend>
<FieldDescription>{t.secureTransactions}</FieldDescription>
<FieldGroup>
<Field>
<FieldLabel htmlFor="checkout-7j9-card-name-43j-rtl">
{t.nameOnCard}
</FieldLabel>
<Input
id="checkout-7j9-card-name-43j-rtl"
placeholder="Evil Rabbit"
required
/>
</Field>
<Field>
<FieldLabel htmlFor="checkout-7j9-card-number-uw1-rtl">
{t.cardNumber}
</FieldLabel>
<Input
id="checkout-7j9-card-number-uw1-rtl"
placeholder="1234 5678 9012 3456"
required
/>
<FieldDescription>{t.cardNumberDescription}</FieldDescription>
</Field>
<div className="grid grid-cols-3 gap-4">
<Field>
<FieldLabel htmlFor="checkout-exp-month-ts6-rtl">
{t.month}
</FieldLabel>
<Select items={months}>
<SelectTrigger id="checkout-exp-month-ts6-rtl">
<SelectValue />
</SelectTrigger>
<SelectContent dir={dir}>
<SelectGroup>
{months.map((item) => (
<SelectItem key={item.value} value={item.value}>
{getMonthLabel(item.value)}
</SelectItem>
))}
</SelectGroup>
</SelectContent>
</Select>
</Field>
<Field>
<FieldLabel htmlFor="checkout-7j9-exp-year-f59-rtl">
{t.year}
</FieldLabel>
<Select items={years}>
<SelectTrigger id="checkout-7j9-exp-year-f59-rtl">
<SelectValue />
</SelectTrigger>
<SelectContent dir={dir}>
<SelectGroup>
{years.map((item) => (
<SelectItem key={item.value} value={item.value}>
{item.label}
</SelectItem>
))}
</SelectGroup>
</SelectContent>
</Select>
</Field>
<Field>
<FieldLabel htmlFor="checkout-7j9-cvv-rtl">
{t.cvv}
</FieldLabel>
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does FieldRtl() do?
FieldRtl() is a function in the ui codebase, defined in apps/v4/examples/base/field-rtl.tsx.
Where is FieldRtl() defined?
FieldRtl() is defined in apps/v4/examples/base/field-rtl.tsx at line 160.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free