Skip to content

No.161 · AI & Chat

Message Actions

The quiet row under an AI reply, where every action has its own honest micro-state: copy becomes a check, retry turns once and adds a version switcher, and a thumbs-down asks one short question.

The prompt

The design brief behind this component — reuse it to regenerate, remix, or explain it.

Build the action row that sits under an AI reply. At rest it's 55% opacity; hovering or focusing the message brings it to full. Each icon button (18px line icons, 32px targets, ink tooltips from data-tip) answers in its own way: - Copy writes the message text to the clipboard; the two-sheet glyph shrinks away and a check draws in its place for 1.4s, with a 'Copied' tooltip held open. - Retry turns once (620ms, expo-out) and adds a version switcher '‹ 2 / 3 ›' in tabular mono; switching versions fades the message body in. - Thumbs up fills lightly and pops (overshoot). - Thumbs down fills, then folds open (grid rows 0fr → 1fr) a single line: 'What went wrong?' with reason pills staggered 40ms; choosing one replaces the line with 'Thanks — that helps the next answer.' for a couple of seconds. - Share shows 'Link copied'. Everything is announced through a polite live region. Paper and night themes, next to a small assistant mark.

Notes

Interaction
Hover the reply to reveal the row; copy, retry (then flip between versions), vote, give a reason, share.
Motion
Copy morph 320ms; retry spin 620ms; vote pop 420ms overshoot; reason row fold 420ms; body cross-fade 460ms; tooltips 260ms.
Accessibility
role=toolbar with labelled buttons, aria-pressed on votes, version count announced, live region for copied/shared/feedback. Reduced motion removes spins, pops and folds.
Responsive
Fluid up to 38rem; reason pills wrap.
On touch
On touch the row is always at full opacity; tooltips appear only as confirmations.

Featured

301 components