Attachment Chip

Compact Tailwind file chip with a paperclip icon, truncated filename and an optional remove button, for attachments in chat composers, emails and forms.

src/registry/ui/attachment-chip.tsx/r/attachment-chip.json

Installation#

bash
npx shadcn@latest add @minidev/attachment-chip

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/attachment-chip.json

Usage#

tsx
import { AttachmentChip } from "@/components/ui/attachment-chip"

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

API reference#

AttachmentChip props
PropTypeDefault
name*string-
onRemove() => void-
classNamestring-

* required

Dependencies#

npm

lucide-react

Built from

No other MiniDev files
All AI chat UI components for React