---
id: portfolio.ds.chat-suggested-question
name: "Chat Suggested Question"
type: component
status: active
relations: [{"type":"composes","target":"portfolio.ds.icon-and-label-button"}]
sources: ["packages/design-system/src/components/ChatSuggestedQuestion.astro","apps/portfolio-site/src/design-system/docs/chat-suggested-question.astro","apps/portfolio-site/src/lib/designSystemRegistry.ts"]
catalog: ["apps/portfolio-site/src/design-system/docs/chat-suggested-question.astro"]
previews: ["apps/portfolio-site/src/design-system/docs/chat-suggested-question.astro"]
---
# Chat Suggested Question

## Purpose
Offer one optional question as a native button without owning its answer.

## Contract
- Props: `question` and `disabled`. Omitting `question` uses the default `Question text`. An explicitly empty or whitespace-only question renders nothing.
- The [standalone preview](/design-system/chat-suggested-question/) is nested under Chat Message List -> Chat Suggested Questions in the menu. The group uses the same button.
- Renders Icon and Label Button with `variant="trailing-outlined"`, `accent="alt"` and a decorative ArrowUpRight. The shared button owns typography, spacing, radius, icon size and interaction states.
- On the default surface the Alt text and border are black. Hover and pressed use the Alt fills; focus and keyboard focus use the shared focus rings and a matching accent border. Disabled uses the native disabled button.
- The question string is both visible label and data-chat-question payload. A consuming composition may handle its native click; the button has no network, history, generated-answer logic or built-in Chat-controller behavior.
- The group passes disabled through. In the standalone preview, the six-state switcher shares the native styling rules. Pressed illustrates a focused pointer press (pressed background and focus ring); disabled uses a real disabled button. Selected and visited do not apply.

## Use
- Optional question groups in an explicitly designed composition and their standard component previews.

## Do Not Use
- Do not use as a navigation link, add provider/answer logic, or invent real questions in parent previews.

## Accessibility
- Verified in Chromium: the visible question supplies the accessible name, the decorative arrow is hidden, Tab shows a focus ring, and Enter and Space each activate the enabled button once. Tab skips the disabled button and clicking it does not activate it.
- Measured label contrast on the white preview surface: 21:1 normal, 17.6:1 hover and 14.5:1 pressed.
- At a 320px viewport, short questions keep their natural width. Long sentences and unbroken words wrap within the available width, with the arrow visible on the right and no horizontal scrolling.

## Verification
- Check standalone and grouped Preview defaults, all six standalone switcher states, long labels, keyboard activation and focus at supported breakpoints. Compare forced hover/pressed/focus styling with native interactions.
- Verify that pointer, Enter and Space activate the enabled button once with the exact `data-chat-question` value. A disabled button cannot be activated. Empty and whitespace-only questions must not produce an unnamed focus target.
