Radzen Blazor Components

Blazor InlineAIPrompt

The Blazor InlineAIPrompt component adds an AI assistant to any text field: a button opens an AIPrompt in a popup, the field value or its selection is the context and the result replaces or extends the value.

Select a part of the description, then open the assistant: the selection is the context and only it is replaced.

Console log

Usage Link to this section

Bind Value to the same value as the field, for example with @bind-Value, and the component replaces or appends to it when the user applies the output. Set TargetId to the id of the input or textarea: the text selected in it when the popup opens becomes the context and only the selection is replaced. Without a selection the whole value is the context. Suggestions and Commands work as in AIPrompt; the default SystemPrompt asks the model for the resulting text only, without explanations or markdown. The button is configurable through Icon, Text, ButtonStyle, Variant and Size; set ShowButton="false" and call OpenAsync(element) to open the popup from your own trigger, for example a keyboard shortcut or a selection toolbar. Applied fires with the new value, Generated with every output, and Open and Close follow the popup. The popup width is set by the --rz-inline-aiprompt-popup-width CSS variable.

Frequently asked questions

How does InlineAIPrompt change the field?

Bind Value to the same value as the field. Replace sets the value to the output, or only the selected part of it when TargetId points to the input and text is selected; Append adds the output after the value.

Can I open the assistant without the button?

Yes. Set ShowButton to false and call OpenAsync with the element to anchor the popup to, for example from a keyboard shortcut or a selection toolbar.

Radzen Blazor Newsletter

Get an email when new components and releases ship.

We care about your data. Read our Privacy Policy.

All the tools in one place

Save Hours on Every Project

With Radzen Blazor subscription you get the full toolkit, including:

Dedicated support backed by proven expertise

Premium themes and theme editor

Ready-to-use UI blocks

Complete app templates

Visual design-time-experience

Radzen Blazor Studio

Radzen Blazor Components, © 2018-2026 Radzen.
Source Code licensed under MIT

On this page

Demos Configuration

Premium Themes

  • Material 3
  • Material 3 Dark
  • Material 3 Expressive
  • Material 3 Expressive Dark
  • Zen
  • Zen Dark
  • Fluent
  • Fluent Dark

Free Themes

  • Material
  • Material Dark
  • Standard
  • Standard Dark
  • Default
  • Dark
  • Humanistic
  • Humanistic Dark
  • Software
  • Software Dark
An error has occurred. This app may no longer respond until reloaded. Reload 🗙