File Thumbnail
Preview tile for a file by type, with image preview and actions.
Installation
bun add @xerobi/ui
import { DownloadButton, FileThumbnail, RemoveButton } from "@xerobi/ui/file-thumbnail"This component is client-side. In Astro, hydrate it with a client directive.
API reference
DownloadButton
Also accepts every prop of <button> element.
No props of its own.
FileThumbnail
| Prop | Type | Description |
|---|---|---|
| tooltip | boolean | |
| file* | string | File | |
| imageView | boolean | |
| onDownload | () => void | |
| onRemove | () => void | |
| slotProps | { removeBtn?: DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> | undefined; downloadBtn?: DetailedHTMLProps<ButtonHTMLAttributes... |
RemoveButton
Also accepts every prop of <button> element.
No props of its own.