New to Telerik UI for Blazor? Start a free 30-day trial

A component that lets you render a primary action with a dropdown of related commands. Supports custom main button content, item containers and popup settings, optional arrow button, and JS initialization for interactions.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

C#
public class TelerikDropDownButton : DropDownButtonBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IPopupContainer, IAsyncDisposable

Inheritance: objectComponentBaseBaseComponentButtonBaseDropDownButtonBaseTelerikDropDownButton...

Implements: IAsyncDisposableIComponentIDisposableIHandleAfterRenderIHandleEventIPopupContainer...

Inherited Members DropDownButtonBase.FocusAsync()DropDownButtonBase.OpenAsync()DropDownButtonBase.CloseAsync()DropDownButtonBase.EndIconDropDownButtonBase.EndIconVariantDropDownButtonBase.OnClickButtonBase.IdButtonBase.ChildContentButtonBase.TitleButtonBase.IconButtonBase.IconVariantButtonBase.EnabledButtonBase.TabIndexButtonBase.FillModeButtonBase.RoundedButtonBase.SizeButtonBase.ThemeColorButtonBase.AriaLabelButtonBase.AriaLabelledByButtonBase.AriaDescribedByButtonBase.AriaControlsBaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.Dispose()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)...

Constructors

C#
public TelerikDropDownButton()

Properties

Defines the content of the main DropDownButton action button. Children: allows arbitrary content.

C#
[Parameter]
public RenderFragment DropDownButtonContent { get; set; }

Defines the container tag for the dropdown buttons items.See DropDownButtonItem. Children: DropDownButtonItem.

C#
[Parameter]
public RenderFragment DropDownButtonItems { get; set; }

Defines the container tag for additional DropDownButton settings. The parameters should be set in a DropDownButtonPopupSettings tag. Children: DropDownButtonPopupSettings. Also accepts DropDownButtonWebMcpSettings to configure WebMCP tool names and overrides.

C#
[Parameter]
public RenderFragment DropDownButtonSettings { get; set; }

Exposes popup open and close operations as WebMCP tools discoverable by AI models through the browser. Requires an enabled button and at least one configured item. Defaults to false. Configure names and overrides in DropDownButtonSettings. Item actions require an explicitly enabled SelectItem override and can run application code.

C#
[Parameter]
public bool EnableWebMcpTools { get; set; }

Fires before the popup closes, both on user interaction and when calling CloseAsync(). Set IsCancelled to true to keep the popup open.

C#
[Parameter]
public EventCallback<DropDownButtonCloseEventArgs> OnClose { get; set; }

Fires before the popup opens, both on user interaction and when calling OpenAsync(). Set IsCancelled to true to prevent the opening.

C#
[Parameter]
public EventCallback<DropDownButtonOpenEventArgs> OnOpen { get; set; }

Defines whether to render an arrow button for opening the DropDownButton. Default value is true.

C#
[Parameter]
public bool ShowArrowButton { get; set; }

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

C#
public ValueTask DisposeAsync()
Returns:

ValueTask

Implements: IAsyncDisposable.DisposeAsync()

C#
protected Task InitJsComponentAsync()
Returns:

Task

C#
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters:firstRenderboolReturns:

Task

Overrides: BaseComponent.OnAfterRenderAsync(bool)