MessageActions

Inline action-button row beneath a message — copy, regenerate, thumbs-up/down. Pure container; consumer supplies the buttons + handlers.

Yes — useFormState is stable in React 19. It's the right hook for progressively-enhanced server-action forms.

Installation

pnpm
pnpm dlx @hex-core/cli add message-actions

API Reference

PropTypeDefaultDescription
childrenrequired
ReactNodeAction buttons (typically Button variant="ghost" size="icon").
className
stringAdditional CSS classes.

AI Guidance

When to use

Render after assistant turns where the user might want to copy, regenerate, or rate the response. Combine with `group/message` on the parent Message to enable hover-reveal.

When not to use

Don't use under user turns (no actions to take). Don't put primary CTAs here — actions row is for secondary, optional follow-ups.

Common mistakes

  • Forgetting `group/message` on the parent Message — hover-reveal won't trigger
  • Stacking too many buttons (more than ~4) — overwhelms the chat

Accessibility

Pure layout container. Each child button must carry its own `aria-label` since icon-only buttons have no accessible text.

Related components

Token budget: 180

Verified against @hex-core/components@1.12.0