{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "search",
  "type": "registry:component",
  "title": "SearchField & CommandPalette",
  "description": "A search box with a wobbly marker outline that boils while it has focus, grouped results on a taped sheet, highlighter matches and keycap shortcuts. The same field powers a ⌘K command palette.",
  "categories": [
    "inputs"
  ],
  "dependencies": [
    "@plop-ui/react",
    "@plop-ui/fonts"
  ],
  "registryDependencies": [
    "https://plopui.com/r/plop-setup.json"
  ],
  "files": [
    {
      "path": "registry/plopui/search-example.tsx",
      "type": "registry:component",
      "target": "components/plop/search-example.tsx",
      "content": "\"use client\";\n\nimport { useState } from \"react\";\nimport { Button, CommandPalette, SearchField, toast, type SearchGroup } from \"@plop-ui/react\";\n\nconst sketches: SearchGroup = {\n  id: \"sketches\",\n  label: \"Sketches\",\n  items: [\n    { id: \"teacup\", title: \"Cat in a teacup\", sub: \"Draft · 2 days ago\" },\n    { id: \"moon\", title: \"Moon picnic\", sub: \"Shipped\", meta: { label: \"new\", tone: \"mint\" } },\n  ],\n};\nconst people: SearchGroup = {\n  id: \"people\",\n  label: \"People\",\n  items: [{ id: \"rosa\", title: \"Rosa Santos\", sub: \"Illustrator\" }],\n};\nconst actions: SearchGroup = {\n  id: \"actions\",\n  label: \"Actions\",\n  items: [{ id: \"new\", title: \"New sketch\" }],\n};\n\n/** SearchField and CommandPalette: grouped results, recent searches, and a ⌘K / Ctrl K palette. */\nexport function SearchExample() {\n  const [open, setOpen] = useState(false);\n  return (\n    <>\n      <SearchField\n        label=\"Search the sketchbook\"\n        shortcut=\"/\"\n        groups={[sketches, people]}\n        recentKey=\"recent-searches\"\n        onSelect={(item) => toast(`Opening ${item.title}`)}\n      />\n\n      <Button variant=\"plain\" onClick={() => setOpen(true)}>\n        Open command palette (⌘K)\n      </Button>\n      <CommandPalette\n        open={open}\n        onOpenChange={setOpen}\n        groups={[sketches, people]}\n        emptyGroups={[actions]}\n        onSelect={(item) => toast(`Run: ${item.title}`)}\n      />\n    </>\n  );\n}\n"
    }
  ],
  "docs": "Example: components/plop/search-example.tsx. Docs: https://plopui.com/docs/components/search"
}
