# SelectionActions Controlled workflow for applying an instruction to selected text, then accepting, rejecting, or retrying its result. Use SelectionActions for a controlled edit to selected text. Keep the selection visible. Show a preview before acceptance. Preserve errors until retry or rejection. Supply one announcement for each semantic transition. ## API The package declarations define these public members. ### Inherited prop contracts - `Omit, 'children'>` — Props from this native base are accepted except the listed members. | Member | Type | Kind | Required | Default | Description | | --- | --- | --- | --- | --- | --- | | `anchorId` | `string` | prop | No | `undefined` | ID of an optional consumer-owned anchor. This component does not position it. | | `announcement` | `string` | prop | No | `undefined` | Consumer-owned text for one semantic workflow transition. | | `error` | `Snippet` | snippet | No | `undefined` | No additional description. | | `instructions` | `readonly SelectionInstruction[]` | prop | Yes | - | No additional description. | | `labels` | `SelectionActionsLabels` | prop | Yes | - | No additional description. | | `onAccept` | `() => void` | callback | Yes | - | No additional description. | | `onInstruction` | `(instruction: SelectionInstruction) => void` | callback | Yes | - | No additional description. | | `onReject` | `() => void` | callback | Yes | - | No additional description. | | `onRetry` | `() => void` | callback | Yes | - | No additional description. | | `preview` | `Snippet` | snippet | No | `undefined` | No additional description. | | `selectedText` | `string` | prop | Yes | - | Consumer-owned text. Empty text keeps the workflow out of the DOM. | | `state` | `SelectionActionsState` | binding | No | `'idle'` | No additional description. | ## Related - [ActivityStatus](/docs/components/activity-status): Compact agent activity status with elapsed time, task progress, and one live announcement. - [AgentTrace](/docs/components/agent-trace): Controlled disclosure of observable stages, searches, tools, files, and checks. - [AgentResponse](/docs/components/agent-response): Assistant result with consumer-rendered content, streaming state, sources, actions, and follow-up prompts.