Files

Files an agent made or fetched, as cards in a conversation or a task's list.

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/file-list

Usage

import { FileCard, FileList } from "./ui/uicontext/components/kit/FileList.ts"
export const Files = <M>(h: Html.H<M>) => [	FileCard(h, { file: { id: "agenda", name: "Kickoff agenda.pdf", size: 1_240_000, detail: "12 pages", href: "/files/agenda.pdf" } }),	FileList(h, {		label: "Files",		files: [{ id: "remit", name: "remittance-4410.pdf", size: 98_304, source: "From Priya Anand's email", href: "/files/remittance-4410.pdf" }],		empty: "Files the assistant downloads or makes show up here.",	}),]

Examples

Attachment cards

A file in a conversation: kind, name, what's in it and its size, and a download. Without a link there's nothing to press.

Halcyon kickoff agenda.pdf12 pages · 1.2 MB
Invoices due Friday.csv4.1 KB
2026-11-30.mdDraft · 4.6 KB

API reference

FileCardView function

Options

FileCard options
NameTypeDescription
filerequiredFileItem—
localestring—
styleStyle—

FileListView function

Options

FileList options
NameTypeDescription
labelrequiredstring—
filesrequiredFileItem[]—
emptystringShown with no files: what will appear here
localestring—

Source