For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt, and this page is available as Markdown at https://wallarm.github.io/design-system/components/message-actions.md.

MessageActions

The small row of icon buttons under a chat message — copy, feedback, a more menu and a timestamp. Every MessageAction is a ghost icon button whose required aria-label doubles as its tooltip, so the row never needs a visible caption. By default the row is transparent until the nearest group/message parent is hovered or holds focus, keeping its 30px height so the conversation does not jump; pass visible for the latest answer. Copy is composed with Copyable and CopyableIcon, menus with DropdownMenuTrigger asChild, and feedback with aria-pressed — the row itself holds no state. Give a menu-trigger action an explicit data-testid: the trigger injects its own --trigger id, which replaces the cascaded --action one.

Source · Storybook

Usage

import { Copyable, CopyableIcon } from '@wallarm-org/design-system/Copyable';
import { MessageAction, MessageActions, MessageTimestamp } from '@wallarm-org/design-system/MessageActions';

Examples

Wally

Under a Wally answer: Copy, thumbs up and down, a more menu, then the timestamp. The Ellipsis button is the menu trigger and keeps its own tooltip anchored to it.

Visible

Default versus visible. The first row stays transparent (but tabbable) until its message is hovered or focused; the second is forced on, as for the latest answer.

Pressed feedback

Thumbs feedback is a plain toggle: pass aria-pressed and the button keeps the states-primary-active background while pressed. Click one to try it.

Analytics

data-analytics-id and data-analytics-props go straight onto each MessageAction and land on its real <button> — also through Copyable and DropdownMenuTrigger asChild.

Props

PropTypeDefaultDescription
visibleboolean | undefinedfalseForce-show the row (e.g. the latest answer). By default the row is revealed on hover / focus-within of the nearest group/message parent, and always shown on hover: none devices. Hidden rows keep their 30px height and stay tabbable.
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
data-testidstring | undefined

MessageAction

PropTypeDefaultDescription
aria-label *stringRequired: the accessible name and the tooltip text.
titlestring | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
type"button" | "submit" | "reset" | undefined
disabledboolean | undefined
namestring | undefined
valuestring | number | readonly string[] | undefined
data-testidstring | undefined

MessageTimestamp

PropTypeDefaultDescription
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
data-testidstring | undefined

Explorer