QuickReplyButton is a compact action for a ready-to-send response or reaction in a messaging surface. It is shorter than Button and carries a single line of text, an optional icon, or both. When it has both, the icon stays hidden until the control is focused or pressed, and the width animates as it reveals.Button.QuickReplyButton is built on Container, which is built on InteractableBase. Read those pages for the full interaction, material, and tooltip contract.import { ButtonRail, QuickReplyButton } from '@wearables-ui-toolkit/mrbd';
<ButtonRail>
<QuickReplyButton title="Thanks!" icon={thumbsUpIcon} onClick={() => send('Thanks!')} />
<QuickReplyButton title="On my way" onClick={() => send('On my way')} />
<QuickReplyButton
icon={heartIcon}
aria-label="React with a heart"
onClick={() => react('heart')}
/>
</ButtonRail>;
import { ButtonGroup, QuickReplyButton } from '@wearables-ui-toolkit/mrbd';
<ButtonGroup>
{suggestions.map(suggestion => (
<QuickReplyButton
key={suggestion.id}
title={suggestion.text}
icon={sendIcon}
disabled={isSending}
onClick={() => send(suggestion.text)}
/>
))}
</ButtonGroup>;
QuickReplyButtonProps. It extends the Container prop type, minus the props the control owns itself.| Prop | Type | Default | Description |
|---|---|---|---|
title | string | — | The reply text. Also supplies the accessible name. |
icon | IconSource | — | Optional icon. Revealed on focus and press when there is also text; always visible when there is no text. |
| Prop | Type | Default | Description |
|---|---|---|---|
onClick | (event: MouseEvent) => void | — | Activation handler. Receives a real DOM click event for pointer and keyboard activation. |
onActivate | (event: InteractableActivationEvent) => void | — | Called once per activation; keyboard activation receives the originating keyboard event. |
onLongPress | (event) => void | — | Called when the press is held past the long-press threshold. |
onStateChange | (prev: InteractionState, next: InteractionState) => void | — | Called on every default / focused / pressed / disabled transition. |
disabled | boolean | false | Dim the control and suppress activation. It stays focusable. |
interactive | boolean | true | Master switch for focusable, pressable, and clickable. |
focusable | boolean | inherits interactive | Whether the control takes focus. |
initialFocusEligible | boolean | true | Whether the control may receive initial focus when a route mounts. |
aria-label | string | — | Accessible name. Required when there is no title. |
tooltipText | string | — | Tooltip copy. |
tooltipMode | TooltipMode | TooltipMode.NONE | When the tooltip appears. |
tooltipPosition | TooltipPosition | TooltipPosition.ANCHORED | Where the tooltip is placed relative to the control. |
material | ContainerMaterial | the button material | Material used for the background and stroke layers. |
shapeProvider | ShapeProvider | full-radius rounded rectangle | Geometry used for clipping and every material path. |
clipContent | boolean | true | Clip the content to the pill shape. |
className | string | '' | Extra class on the root element. |
style | CSSProperties | — | Extra inline styles on the root element. They merge over the component’s own transform and opacity, so use them for placement, not for restyling. |
QuickReplyButton does not accept children, width, or height: content comes from title and icon, and the size is component-owned. The state-and-motion hooks the reveal depends on are removed as well — materialTransition, visualStateOverride, visualStateForInteractionStateFn, contentScaleForStateFn, and stateChangeAnimations are not part of the type, because the component drives the width, scale, and icon fade itself. The role is component-owned as well, and so is the ariaLabel convenience prop — it is always set from title, so name an icon-only reply with the standard aria-label instead. The component forwards its ref to the root HTMLDivElement.Button, and a group sizes its row to the tallest child, so a quick-reply-only lane is not padded out to full button height. The control publishes a layout compensation that keeps spacing even in a group or rail while its width animates.aria-disabled, and suppresses activation. It still reports focus and blur through onStateChange.role="button", takes a focus stop, and activates on Enter, Space, and pointer click.title. For an icon-only quick reply, pass the standard aria-label prop; with no title and no aria-label the control has no accessible name at all.aria-label.ariaLabel to name the control; it is component-owned.