import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display"; import { Checkbox, FormField, Input, Label, Switch, Textarea } from "@godxjp/ui/data-entry"; import { Flex, PageContainer } from "@godxjp/ui/layout"; /** * Label — styled Radix Label. Always pass htmlFor matching the control's id. * PREFER FormField for fields that need helper text, error, or a required marker — * it renders Label internally and wires aria-describedby / aria-invalid. Use bare * Label only when FormField's block layout is too heavy (inline settings rows, * table cells, third-party controls). Composed only from real @godxjp/ui components. */ export default function Demo() { return ( Label + Checkbox (inline) A compact pair where Field’s two-line layout is unnecessary, e.g. a “remember me” row. When the peer control is disabled, the Label dims (peer-disabled:opacity-70 + cursor-not-allowed). Label + Switch (settings row) Labelling a standalone Switch in an inline row that FormField’s full-width block would break. Label + Textarea (minimal) A free-text field where helper / error slots are not needed.