Syncfusion Blazor Smart TextArea
AI-powered text input component that provides context-aware autocompletion suggestions inline or in a popup, driven by OpenAI, Azure OpenAI, Ollama, or custom AI backends.
When to Use
Use this skill when you need to:
- Add
SfSmartTextArea to a Blazor Web App for AI-assisted text input
- Configure OpenAI, Azure OpenAI, Ollama, or a custom
IChatInferenceService
- Switch between inline and popup suggestion display modes
- Tune suggestions with
UserRole and UserPhrases context
- Implement a custom AI backend for Claude, DeepSeek, Groq, Gemini, etc.
- Troubleshoot missing suggestions or AI connectivity issues
Prerequisites
- Blazor Web App (.NET 8.0+) with Interactive Server render mode
- Visual Studio 2022 or Visual Studio Code
- Active OpenAI / Azure OpenAI account, Ollama instance, or custom AI backend
- Basic knowledge of Blazor and C#
Core Documentation
1. Getting Started with Smart TextArea
Complete setup guide including prerequisites, NuGet package installation, service registration, and component implementation.
→ Full Getting Started Guide
Key Topics:
- Creating a new Blazor Web App
- Registering Syncfusion services
- Configuring AI services (OpenAI, Azure OpenAI, Ollama)
- Adding stylesheets and scripts
- Implementing the first Smart TextArea component
2. Customization and Features
Guidance on customizing suggestion appearance and leveraging inherited TextArea features.
→ Full Customization & Features Guide
Key Topics:
- Popup vs inline suggestion display modes
- UserRole and UserPhrases configuration
- Inherited TextArea features (forms, floating labels, events, methods, styling)
- Best practices and complete examples
3. Custom AI Service Integration
Detailed procedures for implementing custom AI backends beyond the default providers.
→ Full Custom AI Integration Guide
Key Topics:
IChatInferenceService interface overview
- Mock AI service examples
- Integration with Claude, DeepSeek, Groq, Gemini
- Service registration patterns
- Testing and troubleshooting custom services
Quick Start Checklist
□ Ensure Blazor Web App is created with Server Interactivity mode
□ Install required NuGet packages (SmartComponents, Themes)
□ Register Syncfusion Blazor service in Program.cs
□ Register and configure AI service (OpenAI/Azure/Ollama/Custom)
□ Add stylesheet and script references to App.razor
□ Add SfSmartTextArea component with UserRole
□ Test with Ctrl+F5 (Windows) or ⌘+F5 (macOS)
Key Concepts
| Concept |
Reference |
| UserRole |
Defines context for AI autocompletion suggestions |
| UserPhrases |
Optional predefined expressions aligned with tone/usage patterns |
| ShowSuggestionOnPopup |
Controls display mode: true (popup) or false (inline, default) |
| IChatInferenceService |
Interface for implementing custom AI backends |
| ChatParameters |
Standardized input for AI response generation |
NuGet Packages
Core Packages:
Syncfusion.Blazor.SmartComponents (v33.1.44+)
Syncfusion.Blazor.Themes (v33.1.44+)
AI Service Packages (based on provider):
- OpenAI:
Microsoft.Extensions.AI, Microsoft.Extensions.AI.OpenAI
- Azure OpenAI:
Microsoft.Extensions.AI, Microsoft.Extensions.AI.OpenAI, Azure.AI.OpenAI
- Ollama:
Microsoft.Extensions.AI, OllamaSharp
1---2name: syncfusion-blazor-smart-textarea3description: Set up and configure the Syncfusion Blazor Smart TextArea for AI-powered inline or popup text autocompletion. Covers OpenAI, Azure OpenAI, Ollama, and custom IChatInferenceService backends, plus UserRole, UserPhrases, and suggestion display mode customization.4---5
6# Syncfusion Blazor Smart TextArea
7
8AI-powered text input component that provides context-aware autocompletion suggestions inline or in a popup, driven by OpenAI, Azure OpenAI, Ollama, or custom AI backends.
9
10## When to Use
11
12Use this skill when you need to:
13- Add `SfSmartTextArea` to a Blazor Web App for AI-assisted text input
14- Configure OpenAI, Azure OpenAI, Ollama, or a custom `IChatInferenceService`
15- Switch between inline and popup suggestion display modes
16- Tune suggestions with `UserRole` and `UserPhrases` context
17- Implement a custom AI backend for Claude, DeepSeek, Groq, Gemini, etc.
18- Troubleshoot missing suggestions or AI connectivity issues
19
20## Prerequisites
21
22- Blazor Web App (.NET 8.0+) with **Interactive Server** render mode
23- Visual Studio 2022 or Visual Studio Code
24- Active OpenAI / Azure OpenAI account, Ollama instance, or custom AI backend
25- Basic knowledge of Blazor and C#
26
27## Core Documentation
28
29### 1. Getting Started with Smart TextArea
30Complete setup guide including prerequisites, NuGet package installation, service registration, and component implementation.
31
32→ [Full Getting Started Guide](./references/getting-started.md)
33
34**Key Topics:**
35- Creating a new Blazor Web App
36- Registering Syncfusion services
37- Configuring AI services (OpenAI, Azure OpenAI, Ollama)
38- Adding stylesheets and scripts
39- Implementing the first Smart TextArea component
40
41### 2. Customization and Features
42Guidance on customizing suggestion appearance and leveraging inherited TextArea features.
43
44→ [Full Customization & Features Guide](./references/customization-features.md)
45
46**Key Topics:**
47- Popup vs inline suggestion display modes
48- UserRole and UserPhrases configuration
49- Inherited TextArea features (forms, floating labels, events, methods, styling)
50- Best practices and complete examples
51
52### 3. Custom AI Service Integration
53Detailed procedures for implementing custom AI backends beyond the default providers.
54
55→ [Full Custom AI Integration Guide](https://blazor.syncfusion.com/documentation/smart-textarea/custom-inference-backend)
56
57**Key Topics:**
58- `IChatInferenceService` interface overview
59- Mock AI service examples
60- Integration with Claude, DeepSeek, Groq, Gemini
61- Service registration patterns
62- Testing and troubleshooting custom services
63
64## Quick Start Checklist
65
66```
67□ Ensure Blazor Web App is created with Server Interactivity mode
68□ Install required NuGet packages (SmartComponents, Themes)
69□ Register Syncfusion Blazor service in Program.cs
70□ Register and configure AI service (OpenAI/Azure/Ollama/Custom)
71□ Add stylesheet and script references to App.razor
72□ Add SfSmartTextArea component with UserRole
73□ Test with Ctrl+F5 (Windows) or ⌘+F5 (macOS)
74```
75
76## Key Concepts
77
78| Concept | Reference |
79|---------|-----------|
80| **UserRole** | Defines context for AI autocompletion suggestions |
81| **UserPhrases** | Optional predefined expressions aligned with tone/usage patterns |
82| **ShowSuggestionOnPopup** | Controls display mode: `true` (popup) or `false` (inline, default) |
83| **IChatInferenceService** | Interface for implementing custom AI backends |
84| **ChatParameters** | Standardized input for AI response generation |
85
86## NuGet Packages
87
88**Core Packages:**
89- `Syncfusion.Blazor.SmartComponents` (v33.1.44+)
90- `Syncfusion.Blazor.Themes` (v33.1.44+)
91
92**AI Service Packages (based on provider):**
93- OpenAI: `Microsoft.Extensions.AI`, `Microsoft.Extensions.AI.OpenAI`
94- Azure OpenAI: `Microsoft.Extensions.AI`, `Microsoft.Extensions.AI.OpenAI`, `Azure.AI.OpenAI`
95- Ollama: `Microsoft.Extensions.AI`, `OllamaSharp`