{
  "antiPatterns": [
    "Using a placeholder as the only label.",
    "Repeating error text in a separate unlinked message."
  ],
  "api": {
    "importPath": "@ancrel/ui",
    "props": [
      {
        "name": "children",
        "required": true,
        "type": "ReactNode"
      },
      {
        "name": "description",
        "required": false,
        "type": "ReactNode"
      },
      {
        "name": "error",
        "required": false,
        "type": "ReactNode"
      },
      {
        "name": "key",
        "required": false,
        "type": "React.Key | null | undefined"
      },
      {
        "name": "label",
        "required": true,
        "type": "ReactNode"
      },
      {
        "name": "ref",
        "required": false,
        "type": "React.Ref<HTMLDivElement> | undefined"
      },
      {
        "name": "required",
        "required": false,
        "type": "boolean"
      }
    ],
    "symbol": "Field",
    "typeRef": "api/ui/field/index.d.ts"
  },
  "constraints": [
    "Use one TextInput, Select or Checkbox as the field control.",
    "Set required on Field to announce the native requirement and show the visible marker."
  ],
  "docs": "raw/frontend/field.md",
  "examples": [
    {
      "code": "'use client'\n\nimport { Field, TextInput } from '@ancrel/ui'\nimport '@ancrel/tokens/css'\nimport '@ancrel/ui/styles.css'\n\nexport default function App() {\n  return (\n    <Field label=\"File name\" description=\"Include the file extension.\" required>\n      <TextInput name=\"filename\" placeholder=\"notes.txt\" leading={<span aria-hidden=\"true\">/</span>} />\n    </Field>\n  )\n}\n",
      "command": "pnpm test",
      "entry": "examples/fe.field/App.tsx",
      "fixture": "examples/fe.field/",
      "id": "minimal"
    }
  ],
  "id": "fe.field",
  "kind": "react-component",
  "language": "typescript",
  "layer": "frontend",
  "owner": "frontend-infra",
  "package": {
    "ecosystem": "npm",
    "name": "@ancrel/ui",
    "version": "0.2.0"
  },
  "provenance": {
    "mode": "original",
    "origin": "Ancrel",
    "references": [
      {
        "commit": "4cc384c3bdbd09a3a50268adf81ba23f53aac93e",
        "note": "Lines 99–169 show labeled filter controls.",
        "path": "frontend/src/components/reflux/RefluxFilterBar.tsx",
        "repo": "rule-studio"
      }
    ]
  },
  "schemaVersion": 1,
  "stability": "experimental",
  "summary": "A label, help text and validation message linked to one native form control.",
  "tokenDependencies": [
    "ref.color.x202025",
    "ref.color.x393941",
    "ref.color.x9f3035",
    "ref.color.xc0c0c9",
    "ref.color.xededef",
    "ref.color.xf39b9b",
    "ref.leading.x1p35",
    "ref.space.px11",
    "ref.space.px2",
    "ref.space.px4",
    "ref.weight.w400",
    "sys.ink.primary",
    "sys.ink.secondary",
    "sys.space.hair",
    "sys.space.tight",
    "sys.status.danger.fg",
    "sys.type.meta.lineHeight",
    "sys.type.meta.size",
    "sys.type.ui.weight"
  ]
}
