Attachment Chip
A file or image attached to a prompt: a file, an image, an upload in progress, or an error.
It arrives scaling from 0.96 and fading in. progress eases between values. Pass onRemove to show the x.
Types
Q4 pipeline.pdf
chart.png
renewals.csv
contacts.xlsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| type | 'file' | 'image' | 'uploading' | 'error' | 'file' | File: an icon tile. Image: a thumbnail. Uploading: an ember ring and progress line. Error: a danger tile, border and text. |
| name | string | The file name. | |
| meta | string | The second line, "PDF · 2.4 MB". Uploading and error have their own text unless you pass one. | |
| preview | string | Image thumbnail URL (type="image"). | |
| progress | number | 0 to 100 (type="uploading"). | |
| onRemove | () => void | Shows the x. | |
| className | string | Extra class on the root. |