syncfusion-maui-smart-text-editor

$npx mdskill add syncfusion/maui-ui-components-skills/syncfusion-maui-smart-text-editor

Add AI-powered predictive text suggestions to .NET MAUI apps.

  • Accelerates typing with inline or popup AI suggestions.
  • Integrates with Azure OpenAI, OpenAI, Ollama, or custom AI services.
  • Falls back to user-defined phrases when AI is unavailable.
  • Delivers suggestions via Tab/Arrow key acceptance or MVVM events.

SKILL.md

.github/skills/syncfusion-maui-smart-text-editorView on GitHub ↗
---
name: syncfusion-maui-smart-text-editor
description: Implements and configure the Syncfusion .NET MAUI AI-Powered Smart Text Editor (SfSmartTextEditor). Use when working with SfSmartTextEditor, AI-powered text input, predictive text suggestions, inline or popup suggestions, or UserRole/UserPhrases configurations. Covers suggestion display modes, custom AI services (Claude, DeepSeek, Gemini, Groq), Azure OpenAI integration, and customization options.
metadata:
  author: "Syncfusion Inc"
  version: "34.1.29"
---

# Implementing Syncfusion .NET MAUI Smart Text Editor

`SfSmartTextEditor` is a multiline text input control that accelerates typing with AI-powered predictive suggestions. It integrates with Azure OpenAI, OpenAI, Ollama, or any custom AI service via `IChatInferenceService`, and falls back to your custom `UserPhrases` list when AI is unavailable. Suggestions appear inline or as a popup near the caret and can be accepted with Tab or Right Arrow.

## When to Use This Skill

- **Add a multiline text input** with AI-powered autocomplete to a .NET MAUI app
- **Configure suggestion display** as inline (desktop) or popup (touch devices)
- **Integrate Azure OpenAI**, OpenAI, Ollama, Claude, DeepSeek, Gemini, or Groq
- **Implement a custom AI service** via `IChatInferenceService`
- **Customize text style**, placeholder, suggestion colors, popup background, or character limits
- **Respond to text change events** or MVVM commands
- **Apply the liquid glass visual effect** to the editor

## Component Overview

The **SfSmartTextEditor** control provides:
- **AI-Powered Predictions**: Context-aware completions via Azure OpenAI, OpenAI, Ollama, or custom IChatInferenceService integration
- **Flexible Suggestion Display**: Inline mode (desktop-first seamless flow) or Popup mode (touch-first overlay) with platform-specific defaults
- **Offline Fallback**: Custom UserPhrases library for AI-free suggestions when network or API is unavailable
- **Smart Context Engine**: UserRole property shapes suggestion tone and relevance based on typing scenario
- **Multi-Input Acceptance**: Tab/Right Arrow keyboard shortcuts (desktop) and tap/click gestures (all platforms)
- **Character Limit Validation**: MaxLength enforcement to prevent input beyond specified constraints
- **Rich Customization**: TextStyle, placeholder colors, suggestion preview colors, and popup background styling
- **MVVM Support**: Two-way Text binding, TextChanged event, and TextChangedCommand for reactive data flow
- **Modern Effects**: Liquid Glass Effect support for translucent designs (iOS/macOS 26+, .NET 10)

## Documentation and Navigation Guide

### Getting Started
📄 **Read:** [references/getting-started.md](references/getting-started.md)
- NuGet package installation (`Syncfusion.Maui.SmartComponents`)
- Handler registration with `ConfigureSyncfusionCore()` in `MauiProgram.cs`
- AI service registration with `ConfigureSyncfusionAIServices()`
- Adding `SfSmartTextEditor` in XAML and C#
- Configuring `UserRole` and `UserPhrases` for context-aware suggestions
- Offline fallback behavior when AI is unavailable

### Suggestion Display Modes
📄 **Read:** [references/suggestion-display-modes.md](references/suggestion-display-modes.md)
- Inline mode — suggestion rendered in-place after the caret (desktop-first)
- Popup mode — compact overlay near caret (touch-first, Android/iOS)
- Platform defaults and when to override them
- Accepting suggestions with Tab or Right Arrow keys
- Platform limitations (Tab key not supported on Android/iOS)

### Customization
📄 **Read:** [references/customization.md](references/customization.md)
- Setting and data-binding editor text via `Text` property
- Font and color via `TextStyle` (`SmartTextEditorStyle`)
- Placeholder text and `PlaceholderColor`
- `SuggestionTextColor` — style the suggestion preview text
- `SuggestionPopupBackground` — background color of popup suggestions
- `MaxLength` — enforce a character limit

### Events
📄 **Read:** [references/events.md](references/events.md)
- `TextChanged` event with `OldTextValue` and `NewTextValue`
- XAML event subscription and C# handler pattern
- `TextChangedCommand` for MVVM / data-binding scenarios
- ViewModel command setup example

### AI Service Configuration (Azure OpenAI / OpenAI / Ollama)
📄 **Read:** [references/ai-service-configuration.md](references/ai-service-configuration.md)
- Azure OpenAI — required NuGet packages, endpoint/key/model configuration
- OpenAI — API key and model setup
- Ollama — self-hosted local model configuration
- Registering the chat client and `ConfigureSyncfusionAIServices()` in `MauiProgram.cs`
- Choosing the right provider for your scenario

### Custom AI Services (Claude / DeepSeek / Gemini / Groq)
📄 **Read:** [references/custom-ai-services.md](references/custom-ai-services.md)
- `IChatInferenceService` interface and when to use it
- Claude AI — request/response models, service class, registration
- DeepSeek — chat completions integration and registration
- Gemini — Google AI Studio setup, safety settings, registration
- Groq — low-latency OpenAI-compatible endpoint, registration
- No need to call `ConfigureSyncfusionAIServices()` when using custom services
- Troubleshooting when no suggestions appear

### Liquid Glass Effect
📄 **Read:** [references/liquid-glass-effect.md](references/liquid-glass-effect.md)
- Prerequisites: .NET 10, macOS 26+ or iOS 26+
- Wrapping `SfSmartTextEditor` in `SfGlassEffectView`
- Enabling via `EnableLiquidGlassEffect="True"`
- Setting `Background="Transparent"` for correct glass tinting
- Full XAML and C# examples

More from syncfusion/maui-ui-components-skills

SkillDescription
syncfusion-maui-accordionImplements Syncfusion .NET MAUI Accordion (SfAccordion) - a vertically collapsible panel with stacked headers for expanding/collapsing content. Use when working with accordions, collapsible panels, expandable lists, employee lists with details, or FAQ sections in .NET MAUI applications. Covers AccordionItem configuration, expand modes, and grouped content display.
syncfusion-maui-ai-assistviewImplements Syncfusion .NET MAUI AI AssistView (SfAIAssistView) for AI-powered interactive chat interfaces. Use when working with AI chat interfaces, AI AssistView, SfAIAssistView, conversational UI, or chat with AI responses. Covers integrating AI services, creating chat UIs, implementing conversation flows, managing AI requests/responses, and displaying AI suggestions.
syncfusion-maui-autocompleteImplements and configure Syncfusion .NET MAUI Autocomplete (SfAutocomplete) control for intelligent text input with suggestions. Use when implementing autocomplete, autosuggest, type-ahead search, smart search, or filtered dropdowns in .NET MAUI applications. Covers data binding, filtering modes, custom search logic, AI-powered search, multi-selection with tokens, and UI customization.
syncfusion-maui-avatar-viewImplements Syncfusion .NET MAUI Avatar View (SfAvatarView) for displaying user profile pictures, initials, or group avatars. Use when working with avatar views, profile pictures, user images, initials display, profile icons, or contact images. Ideal for implementing user profile displays, contact lists, chat interfaces, or social feeds.
syncfusion-maui-backdropImplements Syncfusion .NET MAUI Backdrop Page (SfBackdropPage) with back layer and front layer surfaces. Use when working with backdrop pages, SfBackdropPage, back layer, front layer, or reveal/conceal animations. Covers backdrop navigation patterns, header icons, corner shapes, reveal height, layer state events, and liquid glass effect.
syncfusion-maui-badge-viewImplements Syncfusion .NET MAUI Badge View (SfBadgeView) control. Use when adding badge notifications, status indicators, unread counts, or notification overlays to MAUI applications. Covers SfBadgeView setup, badge text customization, position adjustments, animations, predefined symbols, and accessibility features.
syncfusion-maui-barcode-generatorImplements Syncfusion .NET MAUI Barcode Generator (SfBarcodeGenerator) for generating machine-readable barcodes. Use when working with barcodes, barcode generation, QR codes, data matrix, EAN codes, UPC codes, Code128, or Code39. This skill covers both one-dimensional (linear) and two-dimensional (matrix) barcode symbologies with extensive customization options.
syncfusion-maui-busy-indicatorImplements Syncfusion .NET MAUI Busy Indicator (SfBusyIndicator) for showing loading states, data processing, and app activity indicators. Use when displaying loading indicators, busy animations, activity spinners, or processing feedback in .NET MAUI apps. Covers busy indicator setup, animations, and visual feedback during long-running operations.
syncfusion-maui-buttonImplements and customize Syncfusion .NET MAUI Button (SfButton) control. Use when working with MAUI buttons, SfButton implementation, button customization, or visual states. Covers button icons, background images, RTL support, Liquid Glass effects, custom button views, button styling, events, and checkable buttons.
syncfusion-maui-calendarImplements and customize Syncfusion .NET MAUI Calendar (SfCalendar) control. Use when implementing calendar functionality, date selection (single, multiple, range), or calendar views (month, year, decade, century). Covers date restrictions (min/max dates, EnablePastDates, SelectableDayPredicate), calendar customization, events (ViewChanged, SelectionChanged, Tapped), and header/footer customization.