Syncfusion.AspNetCore.SmartComponents
34.1.32
Prefix Reserved
dotnet add package Syncfusion.AspNetCore.SmartComponents --version 34.1.32
NuGet\Install-Package Syncfusion.AspNetCore.SmartComponents -Version 34.1.32
<PackageReference Include="Syncfusion.AspNetCore.SmartComponents" Version="34.1.32" />
<PackageVersion Include="Syncfusion.AspNetCore.SmartComponents" Version="34.1.32" />
<PackageReference Include="Syncfusion.AspNetCore.SmartComponents" />
paket add Syncfusion.AspNetCore.SmartComponents --version 34.1.32
#r "nuget: Syncfusion.AspNetCore.SmartComponents, 34.1.32"
#:package Syncfusion.AspNetCore.SmartComponents@34.1.32
#addin nuget:?package=Syncfusion.AspNetCore.SmartComponents&version=34.1.32
#tool nuget:?package=Syncfusion.AspNetCore.SmartComponents&version=34.1.32
Syncfusion® ASP.NET Core Smart Components
AI-powered enhancements that can be embedded into Syncfusion controls to deliver intelligent, context-aware features powered by large language models (LLMs). Includes Smart Paste Button and Smart TextArea components.
Supported Components
This package includes the following components:
ASP.NET Core Smart Paste Button Component
The ASP.NET Core Smart Paste Button Component intelligently analyzes clipboard text and automatically maps it to the appropriate fields in a form using AI — eliminating repetitive copy-paste work for end users.
Key Features:
- AI-Powered Form Fill: Reads clipboard content and intelligently populates matching form fields (text inputs, checkboxes, radio buttons, dropdowns, textareas)
- Multi-Field Mapping: Maps a single block of unstructured copied text to multiple form fields in one click
- LLM Provider Support: Works with OpenAI, Azure OpenAI, and self-hosted Ollama models
- Drop-in Button: Renders as a standard button (
<ejs-smartpaste>) placed inside any existing HTML form — no form restructuring required - Icon & Style Support: Configurable
content,iconCss, andcssClassfor seamless visual integration - Secure Configuration: AI credentials are configured server-side in
Program.csand never exposed to the client
Documentation
ASP.NET Core Smart TextArea Component
The ASP.NET Core Smart TextArea Component extends the standard textarea with real-time AI-based sentence completion suggestions as the user types, tailored to a configurable user role and predefined phrase list.
Key Features:
- AI Autocompletion: Suggests contextually relevant sentence completions as the user types, powered by an LLM
- User Role Context: The
user-roleattribute defines the persona and context used to generate completions (e.g., "Support agent replying to customer tickets") - User Phrases: The
user-phrasesattribute provides common expressions to guide the AI toward application-specific tone and vocabulary - Tab to Accept: Users accept inline suggestions with the Tab key, keeping the typing flow uninterrupted
- LLM Provider Support: Compatible with OpenAI, Azure OpenAI, and Ollama
- Floating Label: Supports
floatLabelTypeand standard TextArea properties likerows,width, andplaceholder - Secure Configuration: AI service credentials are registered server-side and never sent to the browser
Documentation
Common Setup
All Syncfusion ASP.NET Core controls share the same foundational setup steps:
1. Install NuGet Package
Install-Package Syncfusion.AspNetCore.SmartComponents
2. Register Tag Helper
Add the following to ~/Pages/_ViewImports.cshtml or ~/Views/_ViewImports.cshtml:
@addTagHelper *, Syncfusion.AspNetCore.Base
@addTagHelper *, Syncfusion.AspNetCore.SmartComponents
3. Add Stylesheet & Script References
In your layout file (~/Pages/Shared/_Layout.cshtml):
<head>
<link rel="stylesheet" href="_content/Syncfusion.AspNetCore.Themes/styles/fluent2.css" />
<script src="_content/Syncfusion.AspNetCore.Buttons/scripts/sf-button.min.js"></script>
<script src="_content/Syncfusion.AspNetCore.Inputs/scripts/sf-textarea.min.js"></script>
</head>
4. Register Script Manager
In your layout file (~/Pages/Shared/_Layout.cshtml), At the end of your <body> tag:
<ejs-scripts></ejs-scripts>
Configure AI Service
Both Smart Components require an AI backend. Install the relevant NuGet packages and configure your chosen provider in ~/Program.cs.
Install AI Service NuGet Packages
Install-Package Microsoft.Extensions.AI
Install-Package Microsoft.Extensions.AI.OpenAI
# For Azure OpenAI only
Install-Package Azure.AI.OpenAI
# For Ollama only
Install-Package OllamaSharp
OpenAI
using Microsoft.Extensions.AI;
using OpenAI;
using Syncfusion.EJ2;
string openAIApiKey = "API-KEY";
string openAIModel = "OPENAI_MODEL";
OpenAIClient openAIClient = new OpenAIClient(openAIApiKey);
IChatClient openAIChatClient = openAIClient.GetChatClient(openAIModel).AsIChatClient();
builder.Services.AddChatClient(openAIChatClient);
builder.Services.AddSyncfusionSmartComponents()
.InjectOpenAIInference();
Azure OpenAI
using Syncfusion.EJ2;
using Microsoft.Extensions.AI;
using Azure.AI.OpenAI;
using System.ClientModel;
string azureOpenAIKey = "AZURE_OPENAI_KEY";
string azureOpenAIEndpoint = "AZURE_OPENAI_ENDPOINT";
string azureOpenAIModel = "AZURE_OPENAI_MODEL";
AzureOpenAIClient azureOpenAIClient = new AzureOpenAIClient(
new Uri(azureOpenAIEndpoint),
new ApiKeyCredential(azureOpenAIKey)
);
IChatClient azureOpenAIChatClient = azureOpenAIClient.GetChatClient(azureOpenAIModel).AsIChatClient();
builder.Services.AddChatClient(azureOpenAIChatClient);
builder.Services.AddSyncfusionSmartComponents()
.InjectOpenAIInference();
Ollama (Self-Hosted)
using Syncfusion.EJ2;
using Microsoft.Extensions.AI;
using OllamaSharp;
string ModelName = "MODEL_NAME";
IChatClient chatClient = new OllamaApiClient("http://localhost:11434?utm_source=nuget&utm_medium=listing&utm_campaign=aspnetcore-smart-nuget", ModelName);
builder.Services.AddChatClient(chatClient);
builder.Services.AddSyncfusionSmartComponents()
.InjectOpenAIInference();
Download and install Ollama from ollama.com and pull a model (e.g.,
llama2:13b,mistral:7b) before running.
Quick Start
Smart Paste Button — ~/Pages/Index.cshtml
Add <ejs-smartpaste> inside any HTML form. When clicked, it reads the clipboard and maps the content to the surrounding form fields automatically.
<form action="/submit" method="post">
<div class="mb-2">
<label for="name">Full Name</label>
<input type="text" id="name" name="name" class="form-control" />
</div>
<div class="mb-2">
<label for="email">Email</label>
<input type="email" id="email" name="email" class="form-control" />
</div>
<div class="mb-2">
<label for="phone">Phone Number</label>
<input type="tel" id="phone" name="phone" class="form-control" />
</div>
<div class="mb-2">
<label for="message">Message</label>
<textarea id="message" name="message" class="form-control" rows="4"></textarea>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
<ejs-smartpaste id="smartPasteBtn" content="Smart Paste" cssClass="e-primary" iconCss="e-icons e-paste"></ejs-smartpaste>
</form>
Smart TextArea — ~/Pages/Index.cshtml
Set user-role (required) to define the AI completion context. Use user-phrases (optional) to supply common expressions that tune the suggestions toward your application's tone.
@{
var userRole = "Maintainer of an open-source project replying to GitHub issues";
var userPhrases = new[]
{
"Thank you for contacting us.",
"To investigate, we'll need a repro as a public Git repo.",
"Could you please post a screenshot of NEED_INFO?",
"This sounds like a usage question. This issue tracker is intended for bugs and feature proposals.",
"We don't accept ZIP files as repros."
};
}
<ejs-smarttextarea id="smartTextarea"
user-role="@userRole"
user-phrases="@userPhrases"
placeholder="Write your response to the GitHub issue..."
floatLabelType="Auto"
rows="5"
width="75%">
</ejs-smarttextarea>
Support
License
This is a commercial product and requires a paid license for possession or use. Review the Syncfusion® EULA
About Syncfusion®
Syncfusion® provides 1600+ UI components and frameworks for web, mobile, and desktop development across multiple platforms:
Web: Blazor | ASP.NET Core | ASP.NET MVC | JavaScript | Angular | React | Vue
Desktop: WinForms | WPF | WinUI
Learn more at www.syncfusion.com
sales@syncfusion.com | Toll Free: 1-888-9-DOTNET
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.AI.Abstractions (>= 9.9.1)
- Newtonsoft.Json (>= 13.0.4)
- Syncfusion.AspNetCore.Base (>= 34.1.32)
- Syncfusion.AspNetCore.Buttons (>= 34.1.32)
- Syncfusion.AspNetCore.Inputs (>= 34.1.32)
- Syncfusion.Licensing (>= 34.1.32)
-
net8.0
- Microsoft.Extensions.AI.Abstractions (>= 9.9.1)
- Newtonsoft.Json (>= 13.0.4)
- Syncfusion.AspNetCore.Base (>= 34.1.32)
- Syncfusion.AspNetCore.Buttons (>= 34.1.32)
- Syncfusion.AspNetCore.Inputs (>= 34.1.32)
- Syncfusion.Licensing (>= 34.1.32)
-
net9.0
- Microsoft.Extensions.AI.Abstractions (>= 9.9.1)
- Newtonsoft.Json (>= 13.0.4)
- Syncfusion.AspNetCore.Base (>= 34.1.32)
- Syncfusion.AspNetCore.Buttons (>= 34.1.32)
- Syncfusion.AspNetCore.Inputs (>= 34.1.32)
- Syncfusion.Licensing (>= 34.1.32)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.