Context Pill

Rounded pill for showing attached context, such as files or pages in an AI prompt, with a truncated label and an optional remove button.

src/registry/ui/context-pill.tsx/r/context-pill.json

Installation#

bash
npx shadcn@latest add @minidev/context-pill

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/context-pill.json

Usage#

tsx
import { ContextPill } from "@/components/ui/context-pill"

export function Example() {
  return <ContextPill />
}

API reference#

ContextPill props
PropTypeDefault
children*React.ReactNode-
classNamestring-
onRemove() => void-

* required

Dependencies#

npm

lucide-react

Built from

No other MiniDev files
All AI chat UI components for React