Inline card
A compact card for the conversation: a title, up to five data points and up to two actions. Its height always fits its content.
Display modes: inline · Source: MCP Blocks UI
Can you take care of this?
Here's what I found:
App
Northwind renewal
Annual contract, renews in 32 days
- Owner
- M. Ortega
- Stage
- Proposal
- Seats
- 48
- Last contact
- 9 days ago
Inline height 0px fits
At most 5 data points (dev warning above that)
At most 2 actions, placed at the bottom
No inner scrolling, height fits content
44px tap targets
#Installation
To get started, add the component to your project via the shadcn CLI:
$npx shadcn@latest add https://mcpblocks.dev/r/inline-card.jsonThis also installs host-tokens, adding Claude's CSS variables and utilities like bg-host-bg to your stylesheet.
#Basic example
import { InlineCard } from "@/components/inline-card"
export function DealSummary({ deal }) {
return (
<InlineCard
title={deal.name}
badge={{ label: "At risk", tone: "warning" }}
fields={[
{ label: "Owner", value: deal.owner },
{ label: "Stage", value: deal.stage },
]}
actions={[
{ label: "Open record", onClick: () => app.requestDisplayMode({ mode: "fullscreen" }) },
{ label: "Draft follow-up", onClick: () => app.sendMessage({ role: "user", content: [{ type: "text", text: "Draft a follow-up" }] }) },
]}
/>
)
}#Component API
| Prop | Type | Description |
|---|---|---|
| title | ReactNode | Card heading. |
| badge | { label, tone? } | Status chip: neutral, info, success, warning or danger. |
| fields | { label, value }[] | Data points. Keep to 5 or fewer. |
| actions | { label, onClick?, variant? }[] | Up to 2 buttons. First is primary. |
| columns | 1 | 2 | 3 | 4 | Field grid columns. 4 collapses to 2 on narrow widths. |