{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "inline-card",
  "type": "registry:component",
  "title": "Inline card",
  "description": "Compact card with up to 5 data points and 2 actions. Auto-fits its height.",
  "registryDependencies": [
    "https://mcpblocks.dev/r/host-button.json",
    "https://mcpblocks.dev/r/host.json"
  ],
  "files": [
    {
      "path": "registry/mcpblocks/components/inline-card.tsx",
      "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { guideline } from \"@/registry/mcpblocks/lib/host\"\nimport {\n  HostButton,\n  type HostButtonProps,\n} from \"@/registry/mcpblocks/ui/host-button\"\n\nexport type InlineCardField = {\n  label: string\n  value: React.ReactNode\n}\n\nexport type InlineCardAction = {\n  label: string\n  onClick?: () => void\n  variant?: HostButtonProps[\"variant\"]\n  disabled?: boolean\n}\n\nexport type InlineCardTone = \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\"\n\nexport type InlineCardProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n  title: React.ReactNode\n  /** Short status label shown top-right. */\n  badge?: { label: string; tone?: InlineCardTone }\n  description?: React.ReactNode\n  /** Claude guidelines: at most 4–5 data points in an inline card. */\n  fields?: InlineCardField[]\n  /** Claude guidelines: at most 2 actions, at the bottom of the card. */\n  actions?: InlineCardAction[]\n  /** Number of columns for the field grid. */\n  columns?: 1 | 2 | 3 | 4\n}\n\nconst toneClass: Record<InlineCardTone, string> = {\n  neutral: \"bg-host-bg-secondary text-host-fg-secondary\",\n  info: \"bg-host-info-bg text-host-fg border-[length:var(--border-width-regular,0.5px)] border-host-info-border/40\",\n  success: \"bg-host-success-bg text-host-success-fg\",\n  warning: \"bg-host-warning-bg text-host-warning-fg\",\n  danger: \"bg-host-danger-border/15 text-host-danger-fg\",\n}\n\nconst columnClass = {\n  1: \"grid-cols-1\",\n  2: \"grid-cols-2\",\n  3: \"grid-cols-3\",\n  4: \"grid-cols-2 @md:grid-cols-4\",\n} as const\n\n/**\n * A compact card for the conversation: summary data plus up to two actions.\n * Height always fits its content (no inner scrolling).\n */\nexport function InlineCard({\n  title,\n  badge,\n  description,\n  fields = [],\n  actions = [],\n  columns = 2,\n  className,\n  children,\n  ...props\n}: InlineCardProps) {\n  guideline(fields.length > 5, \"InlineCard: more than 5 fields. Consider fullscreen.\")\n  guideline(actions.length > 2, \"InlineCard: more than 2 actions. Claude allows at most 2.\")\n\n  return (\n    <section\n      data-slot=\"inline-card\"\n      className={cn(\n        \"@container flex w-full flex-col gap-4 rounded-host-xl border-[length:var(--border-width-regular,0.5px)] border-host-border-secondary bg-host-bg p-5 text-host-fg font-[family-name:var(--font-sans)]\",\n        className\n      )}\n      {...props}\n    >\n      <header className=\"flex items-start justify-between gap-3\">\n        <div className=\"flex min-w-0 flex-col gap-1\">\n          <h3 className=\"text-base leading-snug font-semibold\">{title}</h3>\n          {description ? (\n            <p className=\"text-sm text-host-fg-secondary\">{description}</p>\n          ) : null}\n        </div>\n        {badge ? (\n          <span\n            className={cn(\n              \"shrink-0 rounded-full px-2 py-0.5 text-xs font-semibold\",\n              toneClass[badge.tone ?? \"neutral\"]\n            )}\n          >\n            {badge.label}\n          </span>\n        ) : null}\n      </header>\n\n      {fields.length > 0 ? (\n        <dl className={cn(\"grid gap-3\", columnClass[columns])}>\n          {fields.map((f, i) => (\n            <div key={i} className=\"min-w-0\">\n              <dt className=\"text-xs text-host-fg-tertiary\">{f.label}</dt>\n              <dd className=\"truncate text-sm font-medium\">{f.value}</dd>\n            </div>\n          ))}\n        </dl>\n      ) : null}\n\n      {children}\n\n      {actions.length > 0 ? (\n        <footer className=\"flex gap-2\">\n          {actions.slice(0, 2).map((a, i) => (\n            <HostButton\n              key={a.label}\n              block\n              variant={a.variant ?? (i === 0 ? \"primary\" : \"secondary\")}\n              onClick={a.onClick}\n              disabled={a.disabled}\n            >\n              {a.label}\n            </HostButton>\n          ))}\n        </footer>\n      ) : null}\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ]
}