Active Foundation · Example
Label, control and description
Label, control and descriptionClient
Used for sign-in and for service notifications.
Full source examples/ui/field-anatomy.tsx
// apps/docs/examples/ui/field-anatomy.tsx'use client';
import { Field, FieldDescription, FieldLabel,} from '@workspace/active-ui/components/primitives/field';import {Input} from '@workspace/active-ui/components/primitives/input';
/** * Label, control and description. `FieldLabel` does not associate itself: * `htmlFor` on the label and the same `id` on the control do. Clicking the * label moves the focus into the input. */export default function FieldAnatomy() { return ( <Field className="max-w-sm"> <FieldLabel htmlFor="anatomy-email">Email</FieldLabel> <Input id="anatomy-email" type="email" placeholder="name@example.com" aria-describedby="anatomy-email-description" /> <FieldDescription id="anatomy-email-description"> Used for sign-in and for service notifications. </FieldDescription> </Field> );}