Blazorise Dropdown API
Explore the Blazorise Dropdown API reference for parameters, events, methods, and related types.
For examples and usage guidance, see the Dropdown documentation.
API
Parameters
Dropdown
| Parameter | Default | Type |
|---|---|---|
Animated | true | bool |
Enables the transitions supplied by the CSS provider. Set to false for immediate changes. | ||
AnimationDuration | null | int? |
Overrides the provider's animation duration, in milliseconds. Null preserves the provider's default. Zero or a negative value disables transitions. | ||
AriaDescribedBy | — | string |
Specifies the aria-describedby attribute value for the dropdown root element. When set, this value is rendered as-is on the dropdown root element. | ||
AriaInvalid | — | string |
Specifies the aria-invalid attribute value for the dropdown root element. When set, this value is rendered as-is on the dropdown root element. | ||
AriaLabelledBy | — | string |
Specifies the aria-labelledby attribute value for the dropdown root element. When set, this value is rendered as-is on the dropdown root element. | ||
AriaRequired | — | string |
Specifies the aria-required attribute value for the dropdown root element. When set, this value is rendered as-is on the dropdown root element. | ||
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this Dropdown. | ||
Direction | Direction.Default | Direction |
Dropdown-menu slide direction. Possible values: DefaultDownUpEndStart | ||
Disabled | false | bool |
If true, dropdown would not react to button click. | ||
DropdownMenuTargetId | — | string |
Provides an alternative, or custom anchor element id for the dropdown menu. This is useful when you want the dropdown menu to be anchored from a different element than the toggle. | ||
EndAligned | false | bool |
If true, a dropdown menu will be aligned to the end. | ||
HoverCloseDelay | DefaultHoverCloseDelay | int |
Delay in milliseconds before hiding a hover-opened dropdown after the mouse leaves it. | ||
PositionStrategy | Fixed | DropdownPositionStrategy |
Specifies the positioning strategy of the dropdown menu as a 'floating' element. Possible values: AbsoluteFixed | ||
Submenu | false | bool |
Forces the dropdown to use submenu classes and behavior. | ||
Trigger | Click | DropdownTrigger |
Defines which pointer interactions can open or close this dropdown. Possible values: NoneClickHoverAll | ||
Visible | false | bool |
If true, a dropdown menu will be visible. | ||
DropdownMenu
| Parameter | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this Container. | ||
MaxMenuHeight | — | string |
Sets the maximum height of the dropdown menu. | ||
DropdownItem
| Parameter | Default | Type |
|---|---|---|
Active | false | bool |
Indicate the currently active item. | ||
Checked | false | bool |
Tracks the Checked state whenever the DropdownItem is in checkbox mode. | ||
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this DropdownItem. | ||
CloseParentDropdowns | true | bool |
Specifies whether clicking this item should close the entire dropdown hierarchy or only the current dropdown. | ||
Disabled | false | bool |
Indicate the currently disabled item. | ||
Indeterminate | false | bool |
Displays a partial selection indicator when ShowCheckbox is enabled. This does not change Checked; update it when the related selections change. | ||
ShowCheckbox | false | bool |
The dropdown renders a checkbox. | ||
TabIndex | 0 | int? |
Specifies the tabindex value for keyboard navigation. When omitted, uses 0 when enabled. Disabled items always use -1. | ||
Value | null | object |
Holds the item value. | ||
DropdownToggle
| Parameter | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this DropdownToggle. | ||
Color | Color.Default | Color |
Specifies the dropdown color. | ||
Disabled | false | bool |
Makes the toggle element look inactive. | ||
Ghost | false | bool |
Gets or sets whether to use a transparent, borderless appearance with provider-specific interaction states. Color controls the foreground and interaction palette. This appearance takes precedence over Outline. | ||
Intent | null | Intent |
Specifies the dropdown intent. | ||
Outline | false | bool |
Button outline. | ||
ShowToggleIcon | true | bool? |
Specifies a value indicating whether the dropdown toggle icon is visible. When unspecified, uses the theme setting, falling back to true. | ||
Size | Default | Size? |
Specifies the dropdown size. When omitted, uses the theme dropdown size, falling back to Size.Default. | ||
Split | false | bool |
Indicates that a toggle should act as a split button. | ||
TabIndex | null | int? |
If defined, indicates that its element can be focused and can participates in sequential keyboard navigation. | ||
ToggleIconVisible | true | bool? |
Specifies a value indicating whether the dropdown toggle icon is visible. This parameter is retained for source compatibility. Use ShowToggleIcon instead. When unspecified, uses the theme setting, falling back to true. | ||
Events
Dropdown
| Event | Type |
|---|---|
VisibleChanged | EventCallback<bool> |
Occurs after the dropdown menu visibility has changed. | |
DropdownItem
| Event | Type |
|---|---|
CheckedChanged | EventCallback<bool> |
Occurs after the Checked state is changed, whenever the DropdownItem is in checkbox mode. | |
Clicked | EventCallback<object> |
Notifies when the item is clicked. | |
DropdownToggle
| Event | Type |
|---|---|
Clicked | EventCallback<MouseEventArgs> |
Notifies when the toggle button is clicked. | |
Methods
Dropdown
| Method | Return | Parameters |
|---|---|---|
Hide | Task | bool hideAll |
Hide the dropdown menu.
| ||
Show | Task | — |
Show the dropdown menu.
| ||
Toggle | Task | string dropdownToggleElementId |
Toggle the visibility of the dropdown menu.
| ||
DropdownToggle
| Method | Return | Parameters |
|---|---|---|
Close | Task | CloseReason closeReason |
Forces the parent dropdown to close the dropdown-menu.
| ||
Focus | Task | bool scrollToElement |
Sets focus on the input element, if it can be focused.
| ||
IsSafeToClose | Task<bool> | string elementId, CloseReason closeReason, bool isChildClicked |
Returns true of the parent dropdown-menu is safe to be closed.
| ||