SakaniUI

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.pdfPDF · 2.4 MB
chart.pngPNG · 180 KB
renewals.csvUploading 64%
contacts.xlsxUpload failed. Try again

Props

PropTypeDefaultDescription
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.
namestringThe file name.
metastringThe second line, "PDF · 2.4 MB". Uploading and error have their own text unless you pass one.
previewstringImage thumbnail URL (type="image").
progressnumber0 to 100 (type="uploading").
onRemove() => voidShows the x.
classNamestringExtra class on the root.