---
id: portfolio.ds.chat-send-button
name: "Chat Send Button"
type: component
status: active
relations: [{"type":"supersedes","target":"portfolio.ds.chat-send-button-old"},{"type":"uses_token","target":"portfolio.ds.focus-interaction-states"},{"type":"uses_token","target":"portfolio.ds.primitive-scale"}]
sources: ["packages/design-system/src/components/ChatSendButton.astro","apps/portfolio-site/src/design-system/docs/chat-send-button.astro","apps/portfolio-site/src/lib/designSystemRegistry.ts"]
catalog: ["apps/portfolio-site/src/design-system/docs/chat-send-button.astro"]
previews: ["apps/portfolio-site/src/design-system/docs/chat-send-button.astro"]
---
# Chat Send Button

## Purpose
The private send/stop control owned by Chat Composer.

## Contract
- Chat Send Button is private to Chat Composer. Chat Composer must always use this component for its Send/Stop action instead of duplicating or replacing it. Isolated Design System previews are allowed for documentation and review, not as a separate product use.
- The canonical catalog URL is `/design-system/chat-send-button/`. No legacy route or redirect is retained.
- In the Design System menu, the entry is nested under Chat Composer below the separator. Its canonical URL remains flat and independent from menu ancestry.
- Native icon button with label, pending, disabled and hidden props. Its square outer size uses the new Primitive Scale's Space 9, not a fixed pixel dimension.
- `pending=false`: the message is to be written and sent. The user can compose the message; the button shows Send and submits it.
- `pending=true`: the message is being sent and the send/response operation is in progress. The button shows Stop; clicking it halts the current operation through the owning Chat controller's cancellation hook.
- Preview exposes `Pending: false / true`, directly matching the boolean `pending` prop. It does not rename this flag to `Status: idle / pending`.
- Button width and height use `--primitive-space-9`; Send (ArrowUp) and Stop (Square) both use `--primitive-space-7` for icon width and height. Internal padding is half the difference between these tokens. At the default 16px root, Tablet/Desktop/Ultra-wide use a 36 by 36px button with a 28px icon; Mobile uses a 32 by 32px button with a 24px icon. Padding is currently 4px per side on all breakpoints. This is an owner-approved migration of this component only; states, radius and behavior are unchanged.
- State changes are immediate: no transitions or animations.
- Normal, hover and pressed backgrounds and icon colors use the existing Alt Accent Interaction States token pairs (`--interaction-alt-*`). Focus and focus-visible retain their extra-contrast Interaction States rings; disabled uses the shared opacity token. No local brightness filter or raw color-token state styling. Radius remains `--radius-sm`.
- The child exposes Send/Stop hooks only. Chat Composer owns its placement, and the owning Chat controller handles submission, cancellation and the pending lifecycle; provider/request logic does not belong inside the button.
- Props, state options and abstract Preview content retain the existing contract. Preview simulations use the same interaction tokens as the component; parent previews must not invent product copy or different child-owned layout and states.

## Use
- Use inside Chat Composer for every Send/Stop action, or in its isolated Design System Preview for documentation and review.
- Reuse the existing adapter protocol without making paid requests from a component Preview.

## Do Not Use
- Do not consume this private child directly from pages or other product components, or create a separate Send/Stop implementation inside Chat Composer.
- Do not replace shared tokens with component-local colors, state effects, sizes or radius values.

## Accessibility
- Preserve native button semantics, accessible action names, keyboard behavior and inherited disabled state. The icon is decorative.
- Physical mobile keyboard and assistive-technology behavior still require separate review.

## Verification
- Check both Pending values across all four Preview contexts and all documented interaction states.
- Check native keyboard activation, inherited fieldset disabling, action-specific tooltip/accessibility labels and fixed token geometry.
- Check Composer submission and cancellation hooks without moving request logic into the child.
- Validate canonical route, imports and Essence graph references.

## Enabled Profile Records
- Registry ID: chat-send-button.
- Canonical route: /design-system/chat-send-button/.
- Media: no new source or delivery assets.
