Files
supabase/apps/design-system/registry/default/example/field-fieldset.tsx
Francesco Sansalvadore f42760e2d1 feat(design-system): add Field component and docs (#41162)
* feat(ui): add Field component
* feat(design-system): add Field documentation
2025-12-09 09:47:46 +01:00

37 lines
1.1 KiB
TypeScript

import { Input } from 'ui'
import {
FieldSet,
FieldLegend,
FieldDescription,
Field,
FieldLabel,
FieldGroup,
} from 'ui/src/components/shadcn/ui/field'
export default function FieldFieldset() {
return (
<div className="w-full max-w-md space-y-6">
<FieldSet>
<FieldLegend>Address Information</FieldLegend>
<FieldDescription>We need your address to deliver your order.</FieldDescription>
<FieldGroup>
<Field>
<FieldLabel htmlFor="street">Street Address</FieldLabel>
<Input id="street" type="text" placeholder="123 Main St" />
</Field>
<div className="grid grid-cols-2 gap-4">
<Field>
<FieldLabel htmlFor="city">City</FieldLabel>
<Input id="city" type="text" placeholder="New York" />
</Field>
<Field>
<FieldLabel htmlFor="zip">Postal Code</FieldLabel>
<Input id="zip" type="text" placeholder="90502" />
</Field>
</div>
</FieldGroup>
</FieldSet>
</div>
)
}