MenuButton
A menu button is a menu item that displays a word or phrase that the user can click to initiate an operation.
Notes
The BitMenuButton is a Multi-API component which can accept the list of Items in 3 different ways: BitMenuButtonItem class, a custom Generic class, and BitMenuButtonOption component.Usage
Basic
Split
Explore the Split behavior of BitMenuButton, demonstrating buttons divided into two sections. One section triggers an action on click, while the other section opens a callout to reveal additional options.
Variant
The MenuButton offers three variants: Fill (default), Outline, and Text.
Color
Offering a range of specialized color variants with Primary being the default, providing visual cues for specific actions or states within your application.
Size
Varying sizes for menu buttons tailored to meet diverse design needs, ensuring flexibility and visual hierarchy within your interface.
Sticky
Experience the Sticky functionality of BitMenuButton, showcasing a button that remains sticky after an item selection. The button displays the selected item and retains its state for continuous user interaction.
Icons
Present BitMenuButton instances with customized icons, enriching the visual options for representing menu buttons.
Style & Class
Empower customization by overriding default styles and classes, allowing tailored design modifications to suit specific UI requirements.
Component's Style & Class:
Item's Style & Class:
Styles & Classes:
Templates
Explore BitMenuButton's customization capabilities.
Note that if Sticky set to true, HeaderTemplate and Text will be ignored.
HeaderTemplate
ItemTemplate
Item's template
Events
Demonstrate BitMenuButton instances highlighting item click events, offering versatile interactions within the menu buttons.
Non-Sticky
Sticky
Changed item:
Clicked item:
Binding
This example demonstrates different ways to handle item selection and changes within the component.
DefaultSelectedItem:
Two-way SelectedItem:
Item's IsSelected:
One-way IsOpen (closes after 2 seconds):
Two-way IsOpen:
RTL
Use BitMenuButton in right-to-left (RTL).
API
BitMenuButton parameters
Name |
Type |
Default value |
Description |
---|---|---|---|
BitComponentBase parameters
Name |
Type |
Default value |
Description |
---|---|---|---|
BitComponentBase public members
Name |
Type |
Default value |
Description |
---|---|---|---|
BitMenuButtonClassStyles properties
Name |
Type |
Default value |
Description |
---|---|---|---|
BitNameSelectorPair properties
Name |
Type |
Default value |
Description |
---|---|---|---|
BitColor enum
Name |
Value |
Description |
---|---|---|
BitSize enum
Name |
Value |
Description |
---|---|---|
BitVariant enum
Name |
Value |
Description |
---|---|---|
BitVisibility enum
Name |
Value |
Description |
---|---|---|
BitDir enum
Name |
Value |
Description |
---|---|---|
- On this page