# Shadcn Shared Files

> Files shared in a thread

- Type: example, free and open source (MIT)
- Component: [Message](https://web.dev.reui.io/components/message.md)
- Page: https://web.dev.reui.io/components/message/c-message-5
- Docs (Base UI): https://ui.shadcn.com/docs/components/base/message.md
- Docs (Radix UI): https://ui.shadcn.com/docs/components/radix/message.md
- MCP: `get_example("c-message-5")`
- Registry item: https://web.dev.reui.io/r/styles/base-nova/c-message-5.json
- Uses: Attachment, Avatar, Bubble, Message

## Best for

An outgoing image tile above its caption and an incoming CSV card under its text, with a named download button

## Agent notes

- `HERO_ARTWORK` and the file names and sizes are demo values; fill them from each uploaded file's URL, name and size
- The download `AttachmentAction` has no click handler, so wire it to your file download

## When not to use

- A tray of removable file chips in the composer before anything is sent: use [Attachment](https://web.dev.reui.io/components/attachment.md) (`get_component("attachment")`)

## Install

```bash
npx shadcn@latest add @reui/c-message-5
```

## About Shadcn Message

### When to use

- Chat, support and team threads laid out turn by turn, with avatars, sender names and read receipts
- Assistant replies carrying a copy, regenerate and rating toolbar, or a pending then streaming state
- Shared images and documents carried in a turn beside its text

### When not to use

- A text surface on its own, with no avatar slot, metadata row or side switching: use [Bubble](https://web.dev.reui.io/components/bubble.md) (`get_component("bubble")`)
- A long thread that scrolls and must stay pinned to the newest turn: use [Message Scroller](https://web.dev.reui.io/components/message-scroller.md) (`get_component("message-scroller")`)
- A complete assistant screen with a composer, a thread switcher and streaming controls: use the [AI Chat blocks](https://web.dev.reui.io/blocks/ai-agents/ai-chat.md)

### Agent notes

- On an `align` end row only children of `MessageContent` that carry a `data-slot` move to the end; a plain element there keeps to the start
- `MessageHeader` and `MessageFooter` set no gap, so a header or footer built from several nodes needs its own gap class

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
