This component no longer exists. It was in ondo-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-09 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
field
ondo-ui/fieldRemovedComponent
Combine labels, controls, and help text to compose accessible form fields and grouped inputs.
Install it
npx shadcn@latest add https://ui.ondo.dou.so/r/field.jsonSource
1"use client"23import { useMemo } from "react"4import { cva, type VariantProps } from "class-variance-authority"56import { cn } from "@/lib/utils"7import { Label } from "@/components/ui/label"8import { Separator } from "@/components/ui/separator"910function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {11 return (12 <fieldset13 data-slot="field-set"14 className={cn(15 "flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",16 className17 )}18 {...props}19 />20 )21}2223function FieldLegend({24 className,25 variant = "legend",26 ...props27}: React.ComponentProps<"legend"> & { variant?: "legend" | "label" }) {28 return (29 <legend30 data-slot="field-legend"31 data-variant={variant}32 className={cn(33 "mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",34 className35 )}36 {...props}37 />38 )39}4041function FieldGroup({ className, ...props }: React.ComponentProps<"div">) {42 return (43 <div44 data-slot="field-group"45 className={cn(46 "group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",47 className48 )}49 {...props}50 />51 )52}5354const fieldVariants = cva(55 "group/field flex w-full gap-3 data-[invalid=true]:text-destructive",56 {57 variants: {58 orientation: {59 vertical: "flex-col *:w-full [&>.sr-only]:w-auto",60 horizontal:61 "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",62 responsive:63 "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",64 },65 },66 defaultVariants: {67 orientation: "vertical",68 },69 }70)7172function Field({73 className,74 orientation = "vertical",75 ...props76}: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>) {77 return (78 <div79 role="group"80 data-slot="field"81 data-orientation={orientation}82 className={cn(fieldVariants({ orientation }), className)}83 {...props}84 />85 )86}8788// … truncated
What it pulls in
npm packages
Other registry items
