A split button component that combines a primary action button with a dropdown menu of additional related actions. RadzenSplitButton displays a main button with a small dropdown toggle, allowing quick access to a default action while providing alternatives. Ideal when you have a primary action and several related alternatives. The left side executes the default action, the right side opens a menu of options. Common examples include Save (with options: Save As, Save and Close), Download (with options: Download PDF, Download Excel, Download CSV), and Send (with options: Send Now, Schedule Send, Save Draft). Features main action triggered by clicking the left portion, additional options in a dropdown from the right toggle, ButtonStyle/Variant/Shade/Size for consistent appearance, optional icon on the main button, and keyboard navigation (Arrow keys, Enter, Escape) for menu navigation. Menu items are defined using RadzenSplitButtonItem components as child content.
IComponent
IHandleEvent
IHandleAfterRender
RadzenComponentWithChildren.ChildContent
RadzenComponent.SetParametersAsync
RadzenComponent.OnAfterRenderAsync
RadzenComponent.RaiseContextMenu
RadzenComponent.RaiseMouseEnter
RadzenComponent.AddContextMenu
RadzenComponent.RaiseMouseLeave
RadzenComponent.OnBecameInvisible
RadzenComponent.DefaultCulture
RadzenComponent.IsJSRuntimeAvailable
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSet
ComponentBase.OnParametersSetAsync
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public class RadzenSplitButton : RadzenComponentWithChildren, IComponent, IHandleEvent, IHandleAfterRenderBasic split button:
<RadzenSplitButton Text="Save" Icon="save" Click=@OnSave>
<ChildContent>
<RadzenSplitButtonItem Text="Save and Close" Value="save-close" />
<RadzenSplitButtonItem Text="Save As..." Value="save-as" />
</ChildContent>
</RadzenSplitButton>
@code {
void OnSave(RadzenSplitButtonItem item)
{
Console.WriteLine(item?.Value ?? "primary");
}
}
Download split button with variants:
<RadzenSplitButton Text="Download" Icon="download" ButtonStyle="ButtonStyle.Success" Click=@Download>
<ChildContent>
<RadzenSplitButtonItem Text="Download PDF" Icon="picture_as_pdf" Value="pdf" />
<RadzenSplitButtonItem Text="Download Excel" Icon="table_view" Value="excel" />
<RadzenSplitButtonItem Text="Download CSV" Icon="description" Value="csv" />
</ChildContent>
</RadzenSplitButton>A split button component that combines a primary action button with a dropdown menu of additional related actions. RadzenSplitButton displays a main button with a small dropdown toggle, allowing quick access to a default action while providing alternatives. Ideal when you have a primary action and several related alternatives. The left side executes the default action, the right side opens a menu of options. Common examples include Save (with options: Save As, Save and Close), Download (with options: Download PDF, Download Excel, Download CSV), and Send (with options: Send Now, Schedule Send, Save Draft). Features main action triggered by clicking the left portion, additional options in a dropdown from the right toggle, ButtonStyle/Variant/Shade/Size for consistent appearance, optional icon on the main button, and keyboard navigation (Arrow keys, Enter, Escape) for menu navigation. Menu items are defined using RadzenSplitButtonItem components as child content.
public RadzenSplitButton()Gets or sets the value indication behaviour to always open popup with item on click and not invoke Click event.
public bool AlwaysOpenPopup { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets the value indication behaviour to always open popup with item on click and not invoke Click event. |
Gets or sets the busy text.
public string BusyText { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the busy text. |
Gets or sets the add button aria-label attribute.
public string ButtonAriaLabel { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the add button aria-label attribute. |
Gets or sets the child content.
public RenderFragment ButtonContent { get; set; }
| Type | Description |
|---|---|
| RenderFragment | Gets or sets the child content. |
Gets or sets the button style.
public ButtonStyle ButtonStyle { get; set; }
| Type | Description |
|---|---|
| ButtonStyle | Gets or sets the button style. |
Gets or sets the type of the button.
public ButtonType ButtonType { get; set; }
| Type | Description |
|---|---|
| ButtonType | Gets or sets the type of the button. |
Gets or sets the click callback.
public EventCallback<RadzenSplitButtonItem> Click { get; set; }
| Type | Description |
|---|---|
| EventCallback<RadzenSplitButtonItem> | Gets or sets the click callback. |
Gets or sets a value indicating whether this RadzenSplitButton is disabled.
public bool Disabled { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether this RadzenSplitButton is disabled. |
Gets or sets the icon of the drop down.
public string DropDownIcon { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the icon of the drop down. |
Gets or sets the icon.
public string Icon { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the icon. |
Gets or sets the icon color.
public string IconColor { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the icon color. |
Gets or sets the image.
public string Image { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the image. |
Gets or sets the text.
public string ImageAlternateText { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the text. |
Gets or sets a value indicating whether this instance busy text is shown.
public bool IsBusy { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether this instance busy text is shown. |
Gets a value indicating whether this instance is disabled.
public bool IsDisabled { get; }
| Type | Description |
|---|---|
| bool | Gets a value indicating whether this instance is disabled. |
Gets or sets the open button aria-label attribute.
public string OpenAriaLabel { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the open button aria-label attribute. |
Gets or sets the color shade of the button.
public Shade Shade { get; set; }
| Type | Description |
|---|---|
| Shade | Gets or sets the color shade of the button. |
Gets or sets the size.
public ButtonSize Size { get; set; }
| Type | Description |
|---|---|
| ButtonSize | Gets or sets the size. |
Gets or sets the index of the tab.
public int TabIndex { get; set; }
| Type | Description |
|---|---|
| int | Gets or sets the index of the tab. |
Gets or sets the text.
public string Text { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the text. |
Adds the item.
public void AddItem(RadzenSplitButtonItem item)
| Type | Name | Description |
|---|---|---|
| RadzenSplitButtonItem | item | The item. |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | __builder |
protected override string GetComponentCssClass()
| Type | Description |
|---|---|
| string |
Handles the click event.
public Task OnClick(MouseEventArgs args)
| Type | Name | Description |
|---|---|---|
| MouseEventArgs | args | The MouseEventArgs instance containing the event data. |
| Type | Description |
|---|---|
| Task |
Removes the item.
public void RemoveItem(RadzenSplitButtonItem item)
| Type | Name | Description |
|---|---|---|
| RadzenSplitButtonItem | item | The item. |