Skip to content

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

PropTypeDescription
tooltipboolean
file*string | File
imageViewboolean
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.

Search documentation

Search pages, components and blocks.