# Inline-Action.

## What does the pattern do?

- Allows interactions within an AI output.

## When should the pattern be used?

- If the user wants to edit or reference part of the output text.

## Recommendation

- The actions are only displayed when the text has been selected.
- The new prompt can be created either in a context dialog or in the general text input field with a reference to the selected text.
- For the former, the text is completely overwritten and therefore the user should confirm the action.

## Example

 ![Example for interactions within an AI-Output](https://digital.sbb.ch/assets/images/patternlibrary/components/en/pattern_inline_action_light_en.webp "Pattern inline-action")

## Specifications

[Design](https://www.figma.com/design/ASKJJ0RgQNp0TAhXBpLmXd/AI-Patterns-Documentation?node-id=2225-16687)

---

Source: https://digital.sbb.ch/en/design-system/patternlibrary/patterns/inline-action/
