checkbox-rtl.tsx — ui Source File
Architecture documentation for checkbox-rtl.tsx, a tsx file in the ui codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR e1ac0f86_4f7b_8ccc_a111_2fae81cdb1c0["checkbox-rtl.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] e1ac0f86_4f7b_8ccc_a111_2fae81cdb1c0 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 cc83a0fe_5b64_ae51_20ef_2b5653e9e45f["checkbox"] e1ac0f86_4f7b_8ccc_a111_2fae81cdb1c0 --> cc83a0fe_5b64_ae51_20ef_2b5653e9e45f 7e9c1e20_5a8a_4152_90a3_40c280dc340e["field"] e1ac0f86_4f7b_8ccc_a111_2fae81cdb1c0 --> 7e9c1e20_5a8a_4152_90a3_40c280dc340e 7ef314f6_7093_dcb4_c528_ee12b9a57e00["label"] e1ac0f86_4f7b_8ccc_a111_2fae81cdb1c0 --> 7ef314f6_7093_dcb4_c528_ee12b9a57e00 2c1404ab_bf28_6225_f9a0_b9e29400c66c["language-selector"] e1ac0f86_4f7b_8ccc_a111_2fae81cdb1c0 --> 2c1404ab_bf28_6225_f9a0_b9e29400c66c style e1ac0f86_4f7b_8ccc_a111_2fae81cdb1c0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import { Checkbox } from "@/examples/base/ui-rtl/checkbox"
import {
Field,
FieldContent,
FieldDescription,
FieldGroup,
FieldLabel,
FieldTitle,
} from "@/examples/base/ui-rtl/field"
import { Label } from "@/examples/base/ui-rtl/label"
import {
useTranslation,
type Translations,
} from "@/components/language-selector"
const translations: Translations = {
en: {
dir: "ltr",
values: {
acceptTerms: "Accept terms and conditions",
acceptTermsDescription:
"By clicking this checkbox, you agree to the terms.",
enableNotifications: "Enable notifications",
enableNotificationsDescription:
"You can enable or disable notifications at any time.",
},
},
ar: {
dir: "rtl",
values: {
acceptTerms: "قبول الشروط والأحكام",
acceptTermsDescription: "بالنقر على هذا المربع، فإنك توافق على الشروط.",
enableNotifications: "تفعيل الإشعارات",
enableNotificationsDescription:
"يمكنك تفعيل أو إلغاء تفعيل الإشعارات في أي وقت.",
},
},
he: {
dir: "rtl",
values: {
acceptTerms: "קבל תנאים והגבלות",
acceptTermsDescription:
"על ידי לחיצה על תיבת הסימון הזו, אתה מסכים לתנאים.",
enableNotifications: "הפעל התראות",
enableNotificationsDescription:
"אתה יכול להפעיל או להשבית התראות בכל עת.",
},
},
}
export function CheckboxRtl() {
const { dir, t } = useTranslation(translations, "ar")
return (
<FieldGroup className="max-w-sm" dir={dir}>
<Field orientation="horizontal">
<Checkbox id="terms-checkbox-rtl" name="terms-checkbox" />
<Label htmlFor="terms-checkbox-rtl">{t.acceptTerms}</Label>
</Field>
<Field orientation="horizontal">
<Checkbox
id="terms-checkbox-2-rtl"
name="terms-checkbox-2"
defaultChecked
/>
<FieldContent>
<FieldLabel htmlFor="terms-checkbox-2-rtl">
{t.acceptTerms}
</FieldLabel>
<FieldDescription>{t.acceptTermsDescription}</FieldDescription>
</FieldContent>
</Field>
<Field orientation="horizontal" data-disabled>
<Checkbox id="toggle-checkbox-rtl" name="toggle-checkbox" disabled />
<FieldLabel htmlFor="toggle-checkbox-rtl">
{t.enableNotifications}
</FieldLabel>
</Field>
<FieldLabel>
<Field orientation="horizontal">
<Checkbox id="toggle-checkbox-2" name="toggle-checkbox-2" />
<FieldContent>
<FieldTitle>{t.enableNotifications}</FieldTitle>
<FieldDescription>
{t.enableNotificationsDescription}
</FieldDescription>
</FieldContent>
</Field>
</FieldLabel>
</FieldGroup>
)
}
Domain
Subdomains
Functions
Dependencies
- checkbox
- field
- label
- language-selector
- react
Source
Frequently Asked Questions
What does checkbox-rtl.tsx do?
checkbox-rtl.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, Changelog subdomain.
What functions are defined in checkbox-rtl.tsx?
checkbox-rtl.tsx defines 1 function(s): CheckboxRtl.
What does checkbox-rtl.tsx depend on?
checkbox-rtl.tsx imports 5 module(s): checkbox, field, label, language-selector, react.
Where is checkbox-rtl.tsx in the architecture?
checkbox-rtl.tsx is located at apps/v4/examples/base/checkbox-rtl.tsx (domain: DocumentationAtlas, subdomain: Changelog, 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