Skip to content

feat(elements): add composable choice component#374

Open
MaskyS wants to merge 2 commits intovercel:mainfrom
MaskyS:feat/choice-component
Open

feat(elements): add composable choice component#374
MaskyS wants to merge 2 commits intovercel:mainfrom
MaskyS:feat/choice-component

Conversation

@MaskyS
Copy link

@MaskyS MaskyS commented Feb 12, 2026

Adds a composable Choice component for AI workflows where the model needs user input before continuing, like how Claude Code prompts users with askUserQuestion.

Supports both single-select (auto-submits on click) and multi-select (with a confirm button).

  • Component (packages/elements/src/choice.tsx): Six composable pieces — Choice, ChoiceQuestion, ChoiceOptions, ChoiceOption, ChoiceSubmit, ChoiceStatus
Screenshot 2026-02-12 at 21 47 56

@vercel
Copy link
Contributor

vercel bot commented Feb 12, 2026

@MaskyS is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@MaskyS MaskyS force-pushed the feat/choice-component branch from 4290221 to 73d6439 Compare February 12, 2026 17:42
@MaskyS MaskyS marked this pull request as ready for review February 12, 2026 17:47
…recipe

- Use secondary variant for selected options instead of heavy primary fill
- Add cursor-pointer and conditional multi-line overrides matching Suggestion pattern
- Simplify inner content structure when no description is present
- Handle output-available state in AI SDK docs example
- Replace domain-specific example data with generic AI content
- Add resolved state section to documentation
@MaskyS MaskyS force-pushed the feat/choice-component branch from 73d6439 to 9754691 Compare February 12, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant