A set of Bootstrap 6 Menu dropdowns on buttons, laid out as a reference board: a menu with headers, icons and dividers, a split button with selectable merge options, and three direction variants (drop up, drop end and drop start). Use it as a starting point for action menus in toolbars, tables and admin screens.
How it works
Every toggle is a button with data-bs-toggle="menu", and its .menu sits right after it as a sibling. There is no .dropdown wrapper in Bootstrap 6. The plugin positions each menu with the bundled Floating UI. Directions come from data-bs-placement on the toggle: top for the Share menu, end-start for Move to and start-start for Sort by. Floating UI flips a menu when there is no room, so on phones the side menus open above or below instead.
The featured "Project actions" menu shows the content classes: h6.menu-header section titles, hr.menu-divider, .menu-item-icon icons, a disabled item and a red .menu-item.theme-danger item. The split button is a .btn-group with a .menu-toggle-split button. Its options use .menu-item-content with .menu-item-description, and a .menu-item-check icon that only shows on the .selected item.
script.js moves .selected and aria-current to the clicked option, copies its data-mbv-label onto .mbv-split-main and shows the chosen sort order in .mbv-sort-value. Every choice is also announced in the .mbv-status live region. For the preview, the featured menu is opened on load with Menu.getOrCreateInstance(...).show(), and .mbv-instant turns off its fade-in.
Customization
- Remove
data-mbv-open-on-loadfrom.mbv-rootso all menus start closed (recommended in production). --mbv-bg,--mbv-tileand--mbv-lineon.mbv-root: change the board, tile and border colors.--bs-menu-bg,--bs-menu-item-hover-bgand--bs-menu-check-coloron.mbv-menu: restyle every menu surface, hover state and check mark.data-bs-placementon any toggle: trybottom-end,top-startor responsive values such asbottom-start md:end-start.data-mbv-labelon each.mbv-option: sets the text the split button shows after a choice.- Swap
theme-successortheme-primaryon the buttons for another theme role to recolor them.
Use cases
- Toolbars and action bars: a split button runs a default action and offers more options in a menu
- Admin interfaces: menu headers, icons and dividers group related actions
- Pages near the edges: drop up, drop start and drop end open the menu where there is room
- Settings and sorting controls: a split button with selectable options remembers the choice
Accessibility
Toggles are real buttons with aria-expanded, which the Menu plugin keeps up to date. The icon-only split toggle has a visually hidden label. The plugin handles keyboard use: Enter or Space opens a menu, the arrow keys move between items, and Escape closes it and returns focus to the toggle. Selected options carry aria-current="true", icons are aria-hidden, and the result line is a polite live region. Toggles and items have a high-contrast orange focus outline.
Bootstrap 6 notes
Bootstrap 5's .dropdown, .dropdown-menu, .dropdown-item and data-bs-toggle="dropdown" become .menu, .menu-item and data-bs-toggle="menu". dropup, dropend and dropstart are now data-bs-placement values, and dropdown-toggle-split is menu-toggle-split. Buttons use btn-solid, btn-outline and btn-subtle with theme-* roles. Built on Bootstrap 6.0.0-alpha.1, so alpha APIs can still change. Icons come from Bootstrap Icons.