- bit BlazorUI

DropMenu

DropMenu component is a versatile dropdown menu used in Blazor applications. It allows you to create a button that, when clicked, opens a callout or dropdown menu. This can be particularly useful for creating navigation menus, action lists, or any other interactive elements that require a dropdown.

Usage

Basic
This is the content

This is the content

This is the content
Icon
Customizing the drop menu icons.

This is the content


This is the content
Responsive
Rendering the callout in responsive mode on small screens.

This is the content
This is the content
This is the content
This is the content
Template
Here is an example of customizing the drop menu.

This is the content
Events
Utilizing the drop menu OnClick event:

This is the content
Style & Class
Further customization by overriding default styles and classes, allowing tailored design modifications to suit specific UI requirements.


Component's Style & Class:

This is the content

This is the content




Styles & Classes:

This is the content

This is the content
RTL
Use BitDropMenu in right-to-left (RTL).

این یک محتوای تستی می باشد.

API

BitDropMenu parameters
Name
Type
Default value
Description
Body RenderFragment? null Alias of the ChildContent.
ChevronDownIcon string? null The icon name of the chevron down part of the drop menu.
ChildContent RenderFragment? null The content of the callout of the drop menu.
Classes BitDropMenuClassStyles? null Custom CSS classes for different parts of the drop menu.
IconName string? null The icon to show inside the header of the drop menu.
IsOpen bool false Determines the opening state of the callout of the drop menu.
OnClick EventCallback The callback is called when the drop menu is clicked.
OnDismiss EventCallback The callback is called when the drop menu is dismissed.
Responsive bool false Renders the drop menu in responsive mode on small screens.
Styles BitDropMenuClassStyles? null Custom CSS styles for different parts of the drop menu.
Template RenderFragment? null The custom content to render inside the header of the drop menu.
Text string? null The text to show inside the header of the drop menu.
Transparent bool false Makes the background of the header of the drop menu transparent.
BitComponentBase parameters
Name
Type
Default value
Description
AriaLabel string? null The aria-label of the control for the benefit of screen readers.
Class string? null Custom CSS class for the root element of the component.
Dir BitDir? null Determines the component direction.
HtmlAttributes Dictionary<string, object> new Dictionary<string, object>() Capture and render additional attributes in addition to the component's parameters.
Id string? null Custom id attribute for the root element. if null the UniqueId will be used instead.
IsEnabled bool true Whether or not the component is enabled.
Style string? null Custom CSS style for the root element of the component.
Visibility BitVisibility BitVisibility.Visible Whether the component is visible, hidden or collapsed.
BitComponentBase public members
Name
Type
Default value
Description
UniqueId Guid Guid.NewGuid() The readonly unique id of the root element. it will be assigned to a new Guid at component instance construction.
RootElement ElementReference The ElementReference of the root element.
BitDropMenuClassStyles properties
Name
Type
Default value
Description
Root string? null Custom CSS classes/styles for the root element of the BitDropMenu.
Opened string? null Custom CSS classes/styles for the opened callout state of the BitDropMenu.
Button string? null Custom CSS classes/styles for the button of the BitDropMenu.
Icon string? null Custom CSS classes/styles for the icon of the BitDropMenu.
Text string? null Custom CSS classes/styles for the text of the BitDropMenu.
ChevronDown string? null Custom CSS classes/styles for the chevron-down icon of the BitDropMenu.
Overlay string? null Custom CSS classes/styles for the overlay of the BitDropMenu.
Callout string? null Custom CSS classes/styles for the callout of the BitDropMenu.
BitVisibility enum
Name
Value
Description
Visible 0 The content of the component is visible.
Hidden 1 The content of the component is hidden, but the space it takes on the page remains (visibility:hidden).
Collapsed 2 The component is hidden (display:none).
BitDir enum
Name
Value
Description
Ltr 0 Ltr (left to right) is to be used for languages that are written from the left to the right (like English).
Rtl 1 Rtl (right to left) is to be used for languages that are written from the right to the left (like Arabic).
Auto 2 Auto lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then applies that directionality to the whole element.
  • On this page