Follow-ups
Suggests next prompts to send.
Layout
chipsdefault
rows
States
rest
hover
held
focus-visible
disabled
Usage
When to use it
- Use
- Under the newest finished agent turn, to offer the likely next prompts.
- Use
- After a result the agent can change: "Refund the other two", "Email the customer".
- Use
- In an empty thread, as starting prompts (layout="rows").
- Not for
- Filters a person turns on and off. Use Chip.
- Not for
- Actions on the answer itself, such as copy or retry. Use Toolbar.
- Not for
- A yes or no the agent is waiting on. Use Tool call.
Rules
7 rules
- Must
- Send the text as the next prompt in onSelect; never only fill the composer. Because the person chose the words already, and filling the box makes them find Send and press again.
- Must
- Render follow-ups only under the newest finished turn; remove them once a prompt is sent. Because old suggestions under an earlier turn send prompts the thread has moved past.
- Should
- Pass disabled while a reply runs, if the row stays on screen.
- Never
- Offer prompts that fit any answer, such as Tell me more. Because a generic prompt saves no typing and says nothing about what the agent can do next.
- Should
- Write each one as the person would type it, in the first person and imperative.
- Should
- Use layout="chips" for prompts of a few words and layout="rows" for prompts that run to a sentence. Because a chip ends a long prompt in an ellipsis, and rows wrap it.
- Never
- Make a follow-up glass or a primary Button. Because a suggestion is an offer, and the composer's Send is the one lead in a thread.
State order
5 states, highest first
- 1
- disabled
- 2
- held
- 3
- focus-visible
- 4
- hover
- 5
- rest
Accessibility
4 checks
- role="group" named "Suggested follow-ups"; each suggestion is a button named by its full text.
- Tab moves between suggestions; Enter and Space send.
- A chip takes the small focus ring; a row draws the ring inside its edge, since rows touch.
- A truncated chip keeps its full text as its name and its title.
Keyboard
2 keys
- Tab
- Moves to the next suggestion.
- Enter, Space
- Sends the suggestion.
Edge cases
6 edge cases
- More than max
- The first max show; the rest are cut.
- No suggestions
- Renders nothing.
- Long prompt as a chip
- Ends in an ellipsis at the row's width.
- Long prompt as a row
- Wraps; the arrow stays on the first line.
- Right to left
- Chips start at the right; text aligns to the start.
- Dark theme
- Chips turn near-black with a light hairline; rows take the light wash.
API
6 props
suggestionsreadonly string[]onSelect(suggestion: string, index: number) => voidlayout'chips' | 'rows'default'chips'maxnumberdefault3disabledbooleandefaultfalselabels{group?}default{group: 'Suggested follow-ups'}
Tokens
15 tokens
--paper- #ffffff
--line-control- rgb(5 5 5 / 0.15)
--line-focus- rgb(5 5 5 / 0.32)
--line-faint- rgb(5 5 5 / 0.06)
--hover- rgb(5 5 5 / 0.06)
--pressed- rgb(5 5 5 / 0.10)
--text-1- rgb(5 5 5 / 0.80)
--text-3- rgb(5 5 5 / 0.45)
--text-disabled- rgb(5 5 5 / 0.32)
--control- 32px
--control-sm- 26px
--radius-pill- 999px
--radius-tag- 6px
--type-label-sm- 500 12px/1.35 var(--font-sans)
--type-body-sm- 400 13px/1.5 var(--font-sans)