Skip to content

FileResultCard

Stable

A file the AI made, with what kind it is, a preview, Open and Download.

Also known as file card, download card, artifact card

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

Files the AI made

Q3 support report.docx

Document · 6 pages

Refunds by region.xlsx

Making Refunds by region.xlsx

Board slides.pptx

Could not make this file.

A document, a spreadsheet still being made, and one that failed.

When to use it

Hands people the files the AI made in a form they recognise, with the two things they want: look at it, or keep it.

Made of: Preview or file icon · File name · Kind and size · Open · Download · Making or failed line

Use it for

  • Documents, spreadsheets, slides and images the AI created.
  • A file that is still being made, or that failed.

Not for

Do and avoid

Q3 refunds.xlsx

Spreadsheet · 3 sheets

Do. The kind of file in words, its size, and both Open and Download.

Here is your file: download

Avoid. A bare link hides what the file is, and a failed file looks the same.

Do

  • Show the real file name and its kind in words.
  • Say when a file is still being made.
  • Offer Try again when it fails.

Avoid

  • Do not show a download link before the file exists.
  • Do not show only an icon for the kind of file.
  • Do not hide a failure; say it in words.

On a phone

  • The buttons wrap under the name when the card is narrow.
  • Long names end with an ellipsis; the full name is in the buttons' labels.

Seen in products

  • Claude can create and edit files such as documents, spreadsheets and slides, and hands them back in the chat.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started