bit Bheadless

Command Palette

A cmdk-style command menu — fuzzy search, groups, nested pages and a ⌘K palette — with zero visual opinion.

Implementation: CSS Tailwind

Inline command menu

A search field over a filterable list of actions. The input is a combobox that drives a listbox through aria-activedescendant, so focus never leaves it. Type to fuzzy-filter — "smiley" finds Search emoji through its Keywords — then use ↑ / ↓ (or Ctrl+N / Ctrl+P), Alt+↑ / Alt+↓ to jump between groups, and Enter to run. Empty groups hide, separators disappear while searching, the disabled item is skipped, and the result count is announced.

Last command: (none)

Nested pages

Turn one menu into a drill-down. Wrap each level in a BitBhCommandPage (no Name = the root) and navigate with PushPageAsync on the context its Template receives — the search clears on every push. Backspace in an empty input goes back one level, and PageChanged keeps the breadcrumb in sync. Try Settings → Change theme.

Home
Last command: (none) · Theme: System

⌘K command palette

BitBhCommandDialog puts a command menu in a modal dialog and registers a global Shortcut ("mod+k" = ⌘K on macOS, Ctrl+K elsewhere — press it anywhere on this page). Running a command closes the palette, Escape or an outside click dismisses it, and focus returns where it was. Drive it with Open; OpenChanged reports the changes the palette makes itself (shortcut, Escape, outside click, running a command).

Last command: (none) · Opened by the palette itself: 0×

Server-side search

Set ShouldFilter="false" when results come from somewhere else (an API, a database): the menu then renders exactly the items you give it. Handle SearchChanged, fetch, and re-render the list — highlight, keyboard navigation, the empty state and the results announcement keep working. This demo fakes a 350 ms round-trip and drops stale responses.

Accordion Vertically stacked, collapsible sections
Checkbox Two- or three-state toggle with a label
Combobox Text input with a filterable list of options
Command Palette Searchable, keyboard-first list of actions
Dialog Modal window with a focus trap
Disclosure Show and hide a section of content
Last command: (none)

Relevance sorting and highlight binding

Sort="true" ranks matches by relevance through the CSS order property (so the list is a flex column) and Loop="true" wraps the arrow keys. @bind-Value follows the highlighted item, and an item's Template receives whether it is highlighted — here it reveals an ↵ hint. Type "bar" and watch the best matches move to the top.

App.razor
BitBhAnchorOptions.cs
BitBhCommand.cs
BitBhCommandDialog.cs
BitBhCommandItem.cs
BitBhMenubar.cs
BitBhToggleGroup.cs
BitBhToolbar.cs
CommandPage.razor
MenubarPage.razor
Program.cs
ToolbarPage.razor
Highlighted: (none) · Last command: (none)
An unhandled error has occurred. Reload 🗙