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

ParameterDefaultType
Animatedtruebool

Enables the transitions supplied by the CSS provider. Set to false for immediate changes.
AnimationDurationnullint?

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.
ChildContentnullRenderFragment

Specifies the content to be rendered inside this Dropdown.
DirectionDirection.DefaultDirection

Dropdown-menu slide direction.
Possible values:DefaultDownUpEndStart
Disabledfalsebool

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.

EndAlignedfalsebool

If true, a dropdown menu will be aligned to the end.
HoverCloseDelayDefaultHoverCloseDelayint

Delay in milliseconds before hiding a hover-opened dropdown after the mouse leaves it.
PositionStrategyFixedDropdownPositionStrategy

Specifies the positioning strategy of the dropdown menu as a 'floating' element.
Possible values:AbsoluteFixed
Submenufalsebool

Forces the dropdown to use submenu classes and behavior.
TriggerClickDropdownTrigger

Defines which pointer interactions can open or close this dropdown.
Possible values:NoneClickHoverAll
Visiblefalsebool

If true, a dropdown menu will be visible.

DropdownMenu

ParameterDefaultType
ChildContentnullRenderFragment

Specifies the content to be rendered inside this Container.
MaxMenuHeight—string

Sets the maximum height of the dropdown menu.

DropdownItem

ParameterDefaultType
Activefalsebool

Indicate the currently active item.
Checkedfalsebool

Tracks the Checked state whenever the DropdownItem is in checkbox mode.
ChildContentnullRenderFragment

Specifies the content to be rendered inside this DropdownItem.
CloseParentDropdownstruebool

Specifies whether clicking this item should close the entire dropdown hierarchy or only the current dropdown.
Disabledfalsebool

Indicate the currently disabled item.
Indeterminatefalsebool

Displays a partial selection indicator when ShowCheckbox is enabled. This does not change Checked; update it when the related selections change.
ShowCheckboxfalsebool

The dropdown renders a checkbox.
TabIndex0int?

Specifies the tabindex value for keyboard navigation.
When omitted, uses 0 when enabled. Disabled items always use -1.
Valuenullobject

Holds the item value.

DropdownToggle

ParameterDefaultType
ChildContentnullRenderFragment

Specifies the content to be rendered inside this DropdownToggle.
ColorColor.DefaultColor

Specifies the dropdown color.
Disabledfalsebool

Makes the toggle element look inactive.
Ghostfalsebool

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.
IntentnullIntent

Specifies the dropdown intent.
Outlinefalsebool

Button outline.
ShowToggleIcontruebool?

Specifies a value indicating whether the dropdown toggle icon is visible.
When unspecified, uses the theme setting, falling back to true.
SizeDefaultSize?

Specifies the dropdown size.
When omitted, uses the theme dropdown size, falling back to Size.Default.
Splitfalsebool

Indicates that a toggle should act as a split button.
TabIndexnullint?

If defined, indicates that its element can be focused and can participates in sequential keyboard navigation.
ToggleIconVisibletruebool?

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

EventType
VisibleChangedEventCallback<bool>

Occurs after the dropdown menu visibility has changed.

DropdownItem

EventType
CheckedChangedEventCallback<bool>

Occurs after the Checked state is changed, whenever the DropdownItem is in checkbox mode.
ClickedEventCallback<object>

Notifies when the item is clicked.

DropdownToggle

EventType
ClickedEventCallback<MouseEventArgs>

Notifies when the toggle button is clicked.

Methods

Dropdown

MethodReturnParameters
HideTaskbool hideAll

Hide the dropdown menu.
ShowTask—

Show the dropdown menu.
ToggleTaskstring dropdownToggleElementId

Toggle the visibility of the dropdown menu.

DropdownToggle

MethodReturnParameters
CloseTaskCloseReason closeReason

Forces the parent dropdown to close the dropdown-menu.
FocusTaskbool scrollToElement

Sets focus on the input element, if it can be focused.
IsSafeToCloseTask<bool>string elementId, CloseReason closeReason, bool isChildClicked

Returns true of the parent dropdown-menu is safe to be closed.