IInbox
Components

Attachment

Image thumbnails and an audio player.

324 KB1.2 MB
0:121:23

Installation

npx shadcn@latest add https://ui.whoisroktim.lol/r/attachment.json

The size label sits on the image

On bg/scrim, not beneath it — so a row of thumbnails stays a row of squares rather than a row of squares with ragged captions.

Remove is always visible

Not hover-only. On a touch screen there is no hover to reveal it, and a thumbnail you cannot remove on a phone is a thumbnail you are stuck with.

The waveform is decorative

It says "this is audio" at a glance, which two timestamps alone do not. Its profile is fixed rather than generated per render — a waveform that changes on every render reads as a live meter, which it is not.

PropTypeDefaultDescription
src / alt / sizestringAttachmentThumbnail. Size is the file size, shown over the image.
onAdd() => voidRenders the Add variant instead of an image.
elapsed / totalstringAudioAttachment. Already formatted.