Blazor AI AssistView Example - Template Customization
This demo passes automated axe checks with 0 violations — semantic markup, ARIA, full keyboard operation, visible focus. Section 508 conformant
Accessibility report
VPAT
Hello! Ask Questions, to better understand how your prompt interacts with AI AssistView!
- How do I set daily goals in my work day?
- Steps to publish a e-book with marketing strategy
This sample demonstrates the template functionality of the AI AssistView component.
The AI AssistView component uses customizable templates for the banner, prompts, responses, loading indicator and suggestions. The following templates are utilized:
- BannerTemplate - Customizes the banner content and appearance.
- PromptItemTemplate - Defines the structure and styling of prompt items.
- ResponseItemTemplate - Customizes the appearance of response items.
- PromptSuggestionItemTemplate - Defines the structure of suggestion items.
- ResponseAnimationTemplate - Defines the custom loading animation displayed while the AI response is being generated.
By using the ExecutePromptAsync method, you can trigger prompt requests externally and generate output based on the PromptRequested event data. If a matching prompt is found, the response is displayed and suggestions are updated accordingly.