Skip to main content
All docs
V25.1
  • DxAIChat.PromptSuggestionContentTemplate Property

    Specifies a template for prompt suggestion content.

    Namespace: DevExpress.AIIntegration.Blazor.Chat

    Assembly: DevExpress.AIIntegration.Blazor.Chat.v25.1.dll

    NuGet Package: DevExpress.AIIntegration.Blazor.Chat

    Declaration

    [Parameter]
    public RenderFragment<IPromptSuggestion> PromptSuggestionContentTemplate { get; set; }

    Property Value

    Type Description
    RenderFragment<IPromptSuggestion>

    The prompt suggestion content.

    Remarks

    Use the PromptSuggestionContentTemplate property to display any render fragment in a prompt suggestion (hint bubble). This template does not affect the default bubble rendering, such as paddings or inner content alignment.

    <DxAIChat Initialized="ChatInitialized">
        <PromptSuggestionContentTemplate>
            <div class="hint-bubble">
                @context.Title
            </div>
        </PromptSuggestionContentTemplate>
        <PromptSuggestions>
            @foreach (var suggestion in PromptSuggestions) {
                <DxAIChatPromptSuggestion Title="@suggestion.Title" Text="@suggestion.Text" PromptMessage="@suggestion.PromptMessage" />
            }
        </PromptSuggestions>
    </DxAIChat>
    
    @code {
        List<PromptSuggestion> PromptSuggestions { get; set; }
    
        void ChatInitialized() {
            PromptSuggestions = PromptSuggestionsDataProvider.GetData();
        }
    }
    

    AI Chat - Prompt Suggestion Content Template

    For more information about prompt suggestions in Blazor AI Chat, refer to the following section: AI Chat - Prompt Suggestions.

    See Also