Class 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.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenSplitButton : RadzenComponentWithChildren, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Examples
Basic 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>
Constructors
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.
Declaration
public RadzenSplitButton()
Examples
Basic 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>
Properties
AlwaysOpenPopup
Gets or sets the value indication behaviour to always open popup with item on click and not invoke Click event.
Declaration
[Parameter]
public bool AlwaysOpenPopup { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
BusyText
Gets or sets the busy text.
Declaration
[Parameter]
public string BusyText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The busy text. |
ButtonAriaLabel
Gets or sets the add button aria-label attribute.
Declaration
[Parameter]
public string ButtonAriaLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ButtonContent
Gets or sets the child content.
Declaration
[Parameter]
public RenderFragment ButtonContent { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment | The child content. |
ButtonStyle
Gets or sets the button style.
Declaration
[Parameter]
public ButtonStyle ButtonStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| ButtonStyle | The button style. |
ButtonType
Gets or sets the type of the button.
Declaration
[Parameter]
public ButtonType ButtonType { get; set; }
Property Value
| Type | Description |
|---|---|
| ButtonType | The type of the button. |
Click
Gets or sets the click callback.
Declaration
[Parameter]
public EventCallback<RadzenSplitButtonItem> Click { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<RadzenSplitButtonItem> | The click callback. |
Disabled
Gets or sets a value indicating whether this RadzenSplitButton is disabled.
Declaration
[Parameter]
public bool Disabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
DropDownIcon
Gets or sets the icon of the drop down.
Declaration
[Parameter]
public string DropDownIcon { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Icon
Gets or sets the icon.
Declaration
[Parameter]
public string Icon { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The icon. |
IconColor
Gets or sets the icon color.
Declaration
[Parameter]
public string IconColor { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The icon color. |
Image
Gets or sets the image.
Declaration
[Parameter]
public string Image { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The image. |
ImageAlternateText
Gets or sets the text.
Declaration
[Parameter]
public string ImageAlternateText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The text. |
IsBusy
Gets or sets a value indicating whether this instance busy text is shown.
Declaration
[Parameter]
public bool IsBusy { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
IsDisabled
Gets a value indicating whether this instance is disabled.
Declaration
public bool IsDisabled { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
OpenAriaLabel
Gets or sets the open button aria-label attribute.
Declaration
[Parameter]
public string OpenAriaLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Shade
Gets or sets the color shade of the button.
Declaration
[Parameter]
public Shade Shade { get; set; }
Property Value
| Type | Description |
|---|---|
| Shade | The color shade of the button. |
Size
Gets or sets the size.
Declaration
[Parameter]
public ButtonSize Size { get; set; }
Property Value
| Type | Description |
|---|---|
| ButtonSize | The size. |
TabIndex
Gets or sets the index of the tab.
Declaration
[Parameter]
public int TabIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| int | The index of the tab. |
Text
Gets or sets the text.
Declaration
[Parameter]
public string Text { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The text. |
Variant
Gets or sets the design variant of the button.
Declaration
[Parameter]
public Variant Variant { get; set; }
Property Value
| Type | Description |
|---|---|
| Variant | The variant of the button. |
Methods
AddItem(RadzenSplitButtonItem)
Adds the item.
Declaration
public void AddItem(RadzenSplitButtonItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| RadzenSplitButtonItem | item | The item. |
BuildRenderTree(RenderTreeBuilder)
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.
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
Overrides
Close()
Closes this instance popup.
Declaration
public void Close()
Dispose()
Detaches event handlers and disposes Reference.
Declaration
public override void Dispose()
Overrides
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
| Type | Description |
|---|---|
| string |
Overrides
OnClick(MouseEventArgs)
Handles the Click event.
Declaration
public Task OnClick(MouseEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseEventArgs | args | The MouseEventArgs instance containing the event data. |
Returns
| Type | Description |
|---|---|
| Task |
RemoveItem(RadzenSplitButtonItem)
Removes the item.
Declaration
public void RemoveItem(RadzenSplitButtonItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| RadzenSplitButtonItem | item | The item. |