syncfusion-blazor-toolkit-buttons
Provides implementation guidance for Blazor button components using Syncfusion Toolkit.
Install
mkdir -p .claude/skills/syncfusion-blazor-toolkit-buttons && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10720" && unzip -o skill.zip -d .claude/skills/syncfusion-blazor-toolkit-buttons && rm skill.zipInstalls to .claude/skills/syncfusion-blazor-toolkit-buttons
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Implement interactive Blazor button components with Syncfusion Toolkit. Covers SfButton, SfButtonGroup with styling and accessibility.Key capabilities
- →Implement SfButton
- →Implement SfButtonGroup
- →Handle button events
- →Apply accessibility standards
How it works
It provides component-specific implementation patterns for Syncfusion's Blazor button suite, including event handling and styling.
Inputs & outputs
When to use syncfusion-blazor-toolkit-buttons
- →Adding interactive buttons to Blazor
- →Implementing button groups
- →Styling components
- →Handling component accessibility
About this skill
Syncfusion Blazor Toolkit Buttons
Component Overview
The Syncfusion Blazor Toolkit provides a comprehensive suite of button components for building interactive user interfaces. From basic buttons to button groups, these components support rich content, events, accessibility, and extensive customization.
Components Included:
- SfButton — Core interactive button component
- SfButtonGroup — Group multiple buttons with selection modes
When you need interactive buttons, use the appropriate component from this skill based on your UI requirements.
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- Installation and package setup
- Adding button component to your project
- First button implementation
- Basic click event handling
- Content property usage
- Testing in samples
When to read: Start here for your first button component or to understand project setup.
Button Fundamentals
📄 Read: references/button-fundamentals.md
- Button states (enabled, disabled)
- Disabled state implementation
- Primary vs standard button styling
- CSS class combinations
- HTML attributes capture
- Styling with CssClass property
- Common styling patterns
When to read: Need to style buttons, set disabled state, or apply custom CSS classes.
Icons and Content
📄 Read: references/icons-and-content.md
- Icon CSS classes and icon library
- Icon positioning (left, right, top, bottom)
- Content vs ChildContent properties
- Complex content patterns
- SVG and custom icons
- Icon-only buttons
- Practical icon examples
When to read: Want to add icons, position them, or create complex button content.
Events and Callbacks
📄 Read: references/events-and-callbacks.md
- Click event handling
- Created lifecycle event
- EventCallback usage
- Async event handling patterns
- State management with events
- Two-way binding
- Debugging event issues
When to read: Need to handle button clicks, lifecycle events, or implement event-driven logic.
Button Groups
📄 Read: references/button-group.md
- SfButtonGroup component
- Selection modes (single, multiple)
- SelectedChanged event
- Button child component
- Default selection
- Real-world patterns
When to read: Need to group buttons or implement selection patterns (radio group, multi-select toolbar).
Quick Start Example
Basic Button
<SfButton Content="Click Me" />
Button with Click Handler
<SfButton Content="Submit" OnClick="OnClickHandler" />
@code {
private void OnClickHandler(MouseEventArgs args)
{
Console.WriteLine("Button clicked!");
}
}
Button with Icon
<SfButton Content="Add" IconCss="e-icons e-add" IconPosition="IconPosition.Left" />
Button with Form Integration
<SfButton Type="ButtonType.Submit" Content="Submit Form" IsPrimary="true" OnClick="SubmitForm" />
<SfButton Type="ButtonType.Reset" Content="Clear Form" />
@code {
private async Task SubmitForm(MouseEventArgs args)
{
// Handle form submission logic
Console.WriteLine("Form submitted!");
}
}
Primary Button with Event
<SfButton Content="Save" IsPrimary="true" OnClick="SaveData" />
@code {
private async Task SaveData(MouseEventArgs args)
{
// Handle save logic
}
}
Common Patterns
Pattern 1: Disabled State Management
<SfButton Content="Submit" Disabled="@isProcessing" OnClick="Submit" />
@code {
private bool isProcessing = false;
private async Task Submit(MouseEventArgs args)
{
isProcessing = true;
await Task.Delay(2000); // Simulate work
isProcessing = false;
}
}
Pattern 2: Icon Positioning
<!-- Icon on the left -->
<SfButton IconCss="e-icons e-edit" IconPosition="IconPosition.Left" Content="Edit" />
<!-- Icon on top -->
<SfButton IconCss="e-icons e-delete" IconPosition="IconPosition.Top" Content="Delete" />
<!-- Icon only -->
<SfButton IconCss="e-icons e-search" />
Pattern 3: Button Group Selection
<SfButtonGroup Mode="@SelectionMode.Multiple">
<Button>Bold</Button>
<Button>Italic</Button>
<Button>Underline</Button>
</SfButtonGroup>
Key Properties Summary
| Component | Key Property | Purpose | Type | Default |
|---|---|---|---|---|
| SfButton | Content | Button text | string | "" |
| SfButton | Disabled | Enable/disable | bool | false |
| SfButton | IsPrimary | Primary styling | bool | false |
| SfButton | IconCss | Icon classes | string | "" |
| SfButton | IconPosition | Icon placement | IconPosition | Left |
| SfButton | CssClass | Custom CSS | string | "" |
| SfButton | Type | Form button type | ButtonType | Button |
| SfButton | HtmlAttributes | Capture HTML attributes | Dictionary<string, object> | {} |
| SfButton | OnClick | Click event handler | EventCallback<MouseEventArgs> | - |
| SfButton | Created | Lifecycle event | EventCallback<object> | - |
| SfButtonGroup | Mode | Selection type | SelectionMode | None |
| SfButtonGroup | IsVertical | Vertical layout | bool | false |
| SfButtonGroup | CssClass | Custom CSS | string | "" |
| SfButtonGroup | HtmlAttributes | Additional HTML attributes | Dictionary<string, object> | {} |
| SfButtonGroup | Created | Lifecycle event | EventCallback<object> | - |
Button (in SfButtonGroup) Properties
| Property | Type | Purpose | Default |
|---|---|---|---|
| Button | Content | Button text | string |
| Button | IconCss | Icon classes | string |
| Button | IconPosition | Icon placement | IconPosition |
| Button | CssClass | Custom CSS | string |
| Button | Disabled | Enable/disable | bool |
| Button | Selected | Selection state | bool |
| Button | SelectedChanged | Selection changed event | EventCallback<bool> |
| Button | IsToggle | Toggle behavior | bool |
| Button | Name | Form input name | string |
| Button | Value | Form input value | string |
| Button | HtmlAttributes | Additional HTML attributes | Dictionary<string, object> |
Button Component Decision Tree
Need a button?
├─ Simple clickable button?
│ └─ Use SfButton with Content and OnClick
└─ Multiple related buttons?
└─ Use SfButtonGroup with Mode
Accessibility Considerations
All button components support accessibility best practices:
- Keyboard Navigation: All buttons are keyboard accessible via Tab, Enter, and Space
- ARIA Support: Proper ARIA attributes are applied automatically
- Screen Reader Support: Buttons announce their content and state to screen readers
- Focus Indicators: Clear focus indicators for keyboard navigation
- Disabled State: Disabled buttons are properly announced and not focusable
When implementing custom HTML attributes or complex content, ensure you maintain these accessibility standards.
Next Steps
- Start Simple: Read getting-started.md to create your first button
- Style and Configure: Explore button-fundamentals.md for styling options
- Add Interactivity: Learn event handling in events-and-callbacks.md
- Expand: Explore button-group.md for grouping buttons
Demo: Syncfusion Blazor Toolkit official demo at https://blazor.syncfusion.com/demos/toolkit/buttons/button
When not to use it
- →Non-Blazor applications
- →Native HTML button requirements
Prerequisites
Limitations
- →Requires Syncfusion Blazor Toolkit
How it compares
It offers specialized guidance for Syncfusion-specific properties and accessibility features not found in standard Blazor buttons.
Compared to similar skills
syncfusion-blazor-toolkit-buttons side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| syncfusion-blazor-toolkit-buttons (this skill) | 0 | 1mo | No flags | Beginner |
| syncfusion-maui-digital-gauge | 0 | 4mo | No flags | Beginner |
| component-development | 1 | 4mo | Review | Intermediate |
| avalonia-viewmodels-zafiro | 0 | 6mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by syncfusion
View all by syncfusion →You might also like
syncfusion-maui-digital-gauge
syncfusion
Implements Syncfusion .NET MAUI DigitalGauge (SfDigitalGauge) control to display alphanumeric characters in LED-style digital format. Use when working with digital gauges, LED displays, seven-segment displays, digital clocks, or digital counters. Ideal for displaying numbers, letters, or special cha
component-development
FritzAndFriends
Guidance for creating Blazor components that emulate ASP.NET Web Forms controls. Use this when implementing new components or extending existing ones in the BlazorWebFormsComponents library.
avalonia-viewmodels-zafiro
davila7
Optimal ViewModel and Wizard creation patterns for Avalonia using Zafiro and ReactiveUI.
syncfusion-blazor-toolkit-calendars
syncfusion
Build and customize calendar-based components in Syncfusion Blazor Toolkit. Covers Calendar, DatePicker, DateTimePicker, and TimePicker. Use when implementing date/time selection features, handling date range restriction, formatting dates, managing calendar events, validating dates, or customizing c
dotnet-blazor
managedcode
Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and hosting choices.
dotnet-spectre-console
rudironsoni
>-