/syncfusion-blazor:syncfusion-blazor-data-formfrom Syncfusion Blazor Components
Implement Syncfusion Blazor DataForm component for creating dynamic, data-bound forms with validation and field management. Use this when building forms in Blazor with Syncfusion components, handling form validation, binding models, creating editable fields, or managing form events. This skill covers form layout customization, data binding, FormItems configuration, FormAutoGenerateItems setup, templates, events, and data annotation validation.
Ships in Syncfusion Blazor Components. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A comprehensive skill for implementing the Syncfusion Blazor DataForm component. This skill covers installation, configuration, data binding, validation, event handling, templating, and customization of forms in Blazor applications.
The Syncfusion Blazor DataForm (SfDataForm) is a powerful form component that streamlines the creation of dynamic, data-driven forms with automatic validation, field binding, and event handling. It supports:
📄 Read: references/getting-started.md
Start here for installation, NuGet package setup, namespace imports, service registration, theme configuration, and a basic DataForm example.
📄 Read: references/form-items.md
Learn how to define form items, configure labels, placeholders, hints, editor types, and customize individual field behavior.
📄 Read: references/autogeneration.md
Discover how to automatically generate form fields from model properties using FormAutoGenerateItems, including type mapping and combining auto-generated with custom fields.
📄 Read: references/data-binding.md
Understand model binding, EditContext binding, two-way data binding, and binding to complex data structures.
📄 Read: references/validation.md
Master form validation with data annotations, custom validation rules, Fluent Validation integration, and error message display.
📄 Read: references/events.md
Learn about form submission events and field-level events for handling user interactions and form state changes.
📄 Read: references/layout-customization.md
Customize form layout with columns, column spans, label positioning, floating labels, and custom button placement.
📄 Read: references/templates.md
Create custom form layouts and field renderings using FormTemplate and FormItemTemplate with render fragments.
📄 Read: references/localization.md
Set up localization for validation messages, form labels, and error messages in multiple languages.
Here's a minimal working example to get started:
@page "/dataform-example"
@using System.ComponentModel.DataAnnotations
@using Syncfusion.Blazor.DataForm
<SfDataForm ID="MyDataForm"
Model="@employeeModel">
<FormValidator>
<DataAnnotationsValidator></DataAnnotationsValidator>
</FormValidator>
<FormItems>
<FormAutoGenerateItems></FormAutoGenerateItems>
</FormItems>
</SfDataForm>
@code {
public class EmployeeModel
{
[Required(ErrorMessage = "First Name is required")]
[Display(Name = "First Name")]
public string FirstName { get; set; }
[Required(ErrorMessage = "Email is required")]
[EmailAddress(ErrorMessage = "Invalid email address")]
[Display(Name = "Email")]
public string Email { get; set; }
[Range(18, 65, ErrorMessage = "Age must be between 18 and 65")]
[Display(Name = "Age")]
public int Age { get; set; }
[Display(Name = "Date of Birth")]
public DateTime? DateOfBirth { get; set; }
}
private EmployeeModel employeeModel = new EmployeeModel();
}
<SfDataForm ID="ContactForm" Model="@contact" OnValidSubmit="HandleValidSubmit">
<FormValidator>
<DataAnnotationsValidator></DataAnnotationsValidator>
</FormValidator>
<FormItems>
<FormItem Field="@nameof(contact.Name)" LabelText="Full Name"></FormItem>
<FormItem Field="@nameof(contact.Email)" LabelText="Email Address"></FormItem>
<FormItem Field="@nameof(contact.Message)" EditorType="FormEditorType.TextArea"></FormItem>
</FormItems>
</SfDataForm>
@code {
private Contact contact = new();
private async Task HandleValidSubmit(EditContext context)
{
// Save contact to database
await SaveContactAsync(contact);
}
}
<SfDataForm Model="@product">
<FormItems>
<FormItem Field="@nameof(product.Name)" LabelText="Product Name"></FormItem>
<FormAutoGenerateItems></FormAutoGenerateItems>
<FormItem Field="@nameof(product.Category)" EditorType="FormEditorType.DropDownList"></FormItem>
</FormItems>
</SfDataForm>
@code {
private Product product = new();
}
<SfDataForm Model="@order" OnUpdate="HandleFieldUpdate">
<FormItems>
<FormItem Field="@nameof(order.Country)" LabelText="Country"></FormItem>
<FormItem Field="@nameof(order.City)" LabelText="City"></FormItem>
<FormAutoGenerateItems></FormAutoGenerateItems>
</FormItems>
</SfDataForm>
@code {
private Order order = new();
private async Task HandleFieldUpdate(FormUpdateEventArgs args)
{
if (args.FieldName == nameof(Order.Country))
{
// Update cities based on selected country
order.City = await GetCitiesForCountryAsync(order.Country);
}
}
}
<SfDataForm Model="@employee" ColumnCount="2">
<FormItems>
<FormItem Field="@nameof(employee.FirstName)" LabelText="First Name" ColumnSpan="1"></FormItem>
<FormItem Field="@nameof(employee.LastName)" LabelText="Last Name" ColumnSpan="1"></FormItem>
<FormItem Field="@nameof(employee.Email)" LabelText="Email" ColumnSpan="2"></FormItem>
<FormItem Field="@nameof(employee.Department)" LabelText="Department" ColumnSpan="1"></FormItem>
<FormItem Field="@nameof(employee.Salary)" LabelText="Salary" ColumnSpan="1"></FormItem>
</FormItems>
</SfDataForm>
@code {
private Employee employee = new();
}
| Property | Type | Purpose |
|---|---|---|
Model | object | The data model bound to the form |
EditContext | EditContext | Blazor EditContext for advanced binding scenarios |
ColumnCount | int | Number of columns for form layout |
OnValidSubmit | EventCallback | Fires when form is submitted with valid data |
OnInvalidSubmit | EventCallback | Fires when form is submitted with invalid data |
OnSubmit | EventCallback | Fires on every submit attempt |
OnUpdate | EventCallback | Fires when a field value changes |
Important: In most cases, you don't need to specify EditorType as the DataForm automatically selects the appropriate editor based on your model property type. Use these values only when you need to override the default behavior.
| FormEditorType | Use Case | When to Use |
|---|---|---|
TextBox | Single-line text input | Override for string fields (default), not needed for numeric types |
TextArea | Multi-line text input | When you need multi-line text entry for string properties |
DatePicker | Date selection only | Override for DateTime (default for DateTime) |
DateTimePicker | Date and time selection | When you need both date and time for DateTime properties |
TimePicker | Time selection only | When you need only time selection for TimeSpan or DateTime |
DropDownList | Dropdown selection from list | For enum or custom list selection |
ComboBox | Editable dropdown with filtering | When you need searchable dropdown |
AutoComplete | Auto-complete with suggestions | When you need auto-suggest functionality |
Checkbox | Boolean toggle (note: lowercase 'b') | Override for bool (default), NOT CheckBox |
Switch | Toggle switch for boolean | Alternative to checkbox for bool properties |
Password | Password input with masking | For password string fields |
Critical Notes:
int, long, decimal, double, float → Numeric textbox (no EditorType needed)string → Textbox (no EditorType needed)bool → Checkbox (no EditorType needed)DateTime → DatePicker (no EditorType needed)enum → DropDownList (no EditorType needed)Checkbox (lowercase 'b'), NOT CheckBox (capital B)NumericTextBox editor type - numeric behavior is automatic based on property typeEditorType when you want to override the default behavior| Method | Purpose |
|---|---|
Refresh() | Refresh form and re-render fields |
Submit() | Programmatically submit the form |
Reset() | Clear form and reset to initial values |
IsValid() | Check if form is valid |
Validate() | Trigger validation without submitting |
When configuring FormItem elements with EditorType, keep these critical points in mind:
Automatic Editor Selection: The DataForm automatically selects the appropriate editor based on your model property type. You typically don't need to specify EditorType unless you want to override the default behavior.
When to Specify EditorType: Only specify EditorType when you want to override the default:
FormEditorType.TextArea for multi-line string inputFormEditorType.Switch instead of checkbox for booleanFormEditorType.DateTimePicker instead of DatePicker for DateTime with timeFormEditorType.Password for password stringsFormEditorType.DropDownList or ComboBox for custom listsCheckbox Casing: When explicitly specifying checkbox, use FormEditorType.Checkbox with lowercase 'b', not FormEditorType.CheckBox.
No NumericTextBox Type: There is no FormEditorType.NumericTextBox. Numeric behavior is automatic based on property type.
Example:
<!-- Numeric field - EditorType not needed, automatically renders numeric textbox -->
<FormItem Field="@nameof(model.Quantity)"
LabelText="Quantity">
</FormItem>
<!-- Boolean field - EditorType not needed, automatically renders checkbox -->
<FormItem Field="@nameof(model.IsActive)"
LabelText="Is Active">
</FormItem>
<!-- String field with TextArea override -->
<FormItem Field="@nameof(model.Description)"
LabelText="Description"
EditorType="FormEditorType.TextArea">
</FormItem>
<!-- Boolean field with Switch override -->
<FormItem Field="@nameof(model.IsEnabled)"
LabelText="Enabled"
EditorType="FormEditorType.Switch">
</FormItem>
references/autogeneration.md (opens in a new tab)references/data-binding.md (opens in a new tab)references/events.md (opens in a new tab)references/form-items.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/layout-customization.md (opens in a new tab)references/localization.md (opens in a new tab)references/templates.md (opens in a new tab)references/validation.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-blazor69 skills in this plugin
/syncfusion-blazor-3d-chartsProvides guidance for building and customizing Syncfusion Blazor 3D Charts. Trigger this skill whenever the user needs help with SfChart3D, 3D Column/Bar charts, axes, data binding, rotation, tilt, depth, legends, tooltips, or any configuration in Syncfusion.Blazor.Chart3D./syncfusion-blazor-accordionGuide for implementing the Syncfusion Blazor Accordion component for creating collapsible panels with expandable content. Use this skill when users need to build accordions, implement collapsible sections, create expandable panels, organize content in navigation components, implement FAQs, build collapsible menus, add nested accordions, configure expand modes (single or multiple), handle accordion events, customize accordion styling, implement accessible accordions with WCAG compliance, integrate data binding, or work with any vertically collapsible content containers in Blazor applications./syncfusion-blazor-accumulation-chartImplement Syncfusion Blazor Accumulation Chart (SfAccumulationChart) for proportional data visualization. Use this when creating pie charts, doughnut charts, funnel charts, or pyramid charts. This skill covers data labels, legends, tooltips, slice grouping, and part-to-whole visualizations in Blazor applications.Other plugins' skills for the same job