Chat card

Pro

A card in the agent's answer for something outside the chat: the browser tab it works in, a file it made, a page or a pull request it changed. Its picture sits beside its name and opens whole; while the agent works the picture holds the light and the change lands in it.

Pro opens soon
npx shadcn@latest add @pixilui-pro/chat-card

Preview

The card says what happened to the thing in its meta, and the state words never truncate.
Kind
Ending

When to use

Use it when

  • Something the agent made or changed in another app: a file, a Notion page, a pull request, a sheet, with its picture.
  • The browser tab the agent works in, with its cursor, and a hand-off when the site needs the person (Take over, Hand back).
  • A thing that didn't end done: stopped, failed or gone, said in its meta.

Use something else when

  • A link inside running text: keep it a link.
  • A source behind a claim: use the reasoning trail's citation chip.
  • A generic link preview with no picture of the thing.

Installation

chat-card.tsx1074 linesPro
Pro opens soon

Join the waitlist and we'll email you when PixilUI launches. The preview, props and docs stay open until then.

Pro installs with the same CLI as the free items. One command adds chat-card.tsx and the free aurora-light.tsx, the free avatar.tsx, the free button.tsx, the free kbd.tsx and the free tooltip.tsx it uses; your license key goes in once, as in Installation.

{
  "registries": {
    "@pixilui-pro": {
      "url": "https://pixilui.com/r/pro/{name}.json",
      "headers": { "Authorization": "Bearer ${PIXILUI_TOKEN}" }
    }
  }
}
Terminal
npx shadcn@latest add @pixilui-pro/chat-card

Adds chat-card.tsx with aurora-light.tsx, avatar.tsx, button.tsx, kbd.tsx and tooltip.tsx, and installs clsx and tailwind-merge. The CLI reads PIXILUI_TOKEN from .env.local; if this computer has not logged in yet, run npx pixilui@latest login once.

Usage

example.tsx
import { ChatCard } from "@/components/pixilui/chat-card";

<ChatCard onReady={onReady} />

A lone card is 360 wide at most, a live card 480; under 420 a small card is its row alone, and at 360 long names truncate before the state words.

API reference

PropTypeDefault
kindstring"plain"plain (a link), browser (the tab the agent works in), or a thing in pictures.kinds (file, notion, pr, sheet in the examples).
titlestring–Its name.
metastring–Where it lives.
hrefstring–Where it opens.
tilestring–A plain card's tile: an icon id (file, browse).
markstring–A product's favicon in the tile, by its mark id (stripe), in place of an icon.
badgestring–The app it is open in, on the tile (a mark id: chrome).

Also takes every native <div> attribute except title, and a ref.

Keyboard

TabReaches the card's row, then Open or Download, then Take over or Hand back when the tab asks.
Enter SpaceExpands or collapses a live card from its row; opens a plain card's link.

Accessibility

  • A plain card's row is a link; a live card's is a button with aria-expanded, labelled by its name and where it lives.
  • The picture is role img with a label; the picture, the light and the cursors are aria-hidden.
  • Open and Download are named links with the locked tooltip; on touch every button reaches 44.
  • Reduced motion: the glide, the typing, the cursors and the swaps happen at once; a run settles to the same end.

Motion

  • Small to big and back: the view grows out of the picture (FLIP, 280ms on the out curve) and the card's height follows.
  • The agent's hands on the tab: the Aurora light blooms from the picture and holds; done rings it out (the browser tab adds the pop).
  • Cursors glide, shorter trips quicker (520ms at most); a click dips the arrow and opens a ring; you type slower and unevenly than the agent.
  • Gone: the picture drains to grey at half strength and Open fades out. The name and meta change with the quiet swap.
Aurora lightLight crosses the card, and what it passes over changes under it.
Reasoning trailFolds into one line when the answer starts; anything that went wrong stays on it.
Tool callA secret in a tool's arguments stays masked, and Copy copies the mask, never the key.

PixilUI Pro opens soon. The first 20 licenses are $99.