{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A form field: label, control (children), hint and error text. `htmlFor` ties the label to the id of the control.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * A form field: label, control (children), hint and error text. `htmlFor` ties the label to the id of the\n * control.\n */\nimport { type ReactNode } from \"react\";\nimport { Box, Label, Text } from \"../compose\";\nimport { cn } from \"../utils\";\n\nexport type FieldProps = {\n  label: string;\n  htmlFor: string;\n  hint?: string;\n  error?: string;\n  className?: string;\n  children?: ReactNode;\n};\n\nexport function Field({ label, htmlFor, hint, error, className, children }: FieldProps) {\n  return (\n    <Box className={cn(\"flex min-w-0 flex-col gap-2\", className)}>\n      <Label className=\"text-xs font-bold text-foreground\" htmlFor={htmlFor}>\n        {label}\n      </Label>\n      {children}\n      {error ? (\n        <Text className=\"m-0 text-xs font-semibold text-destructive\" role=\"alert\">\n          {error}\n        </Text>\n      ) : hint ? (\n        <Text className=\"m-0 text-xs font-medium text-muted-foreground\">\n          {hint}\n        </Text>\n      ) : null}\n    </Box>\n  );\n}\n",
      "path": "components/field.tsx",
      "target": "components/field.tsx"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "react",
      "component"
    ]
  },
  "name": "field",
  "registryDependencies": [
    "compose",
    "utils"
  ],
  "runtime": "react",
  "title": "Field",
  "type": "registry:component"
}
