Command

Command

Fast, composable, unstyled command menu for Blazor.

Spotlight Command Palette

A beautiful, production-ready command palette with glassmorphism effect inspired by kokonutui.com and Fumadocs. Features smooth animations, backdrop blur, and global ⌘K / Ctrl+K support.

Press the keyboard shortcut to search...
K

Features:

  • Global keyboard shortcut: ⌘K / Ctrl+K
  • Glassmorphism with backdrop-blur and subtle transparency
  • Smooth height animations for list changes
  • Elegant fade-in/fade-out transitions
  • Works across all pages in the demo site
  • Built with Dialog and Command primitives only

Height Animation Component

The Spotlight Command Palette above uses the reusable HeightAnimation component to provide smooth transitions when content height changes. This component can be used with any dynamic content.

Customizable CSS Variables:

  • --height-animation-duration: Animation duration (default: 200ms)
  • --height-animation-timing: Timing function (default: cubic-bezier(0.4, 0, 0.2, 1))

Usage Example:

<HeightAnimation Config="@_config">
    <Command>
        <CommandInput />
        <CommandList>
            <!-- Dynamic content -->
        </CommandList>
    </Command>
</HeightAnimation>

@code {
    private HeightAnimationConfig _config = new() {
        ContentSelector = "[role=\"listbox\"]",
        InputSelector = "[data-command-input-wrapper]"
    };
}

Custom Animation Timing:

.fast-animation {
    --height-animation-duration: 150ms;
}

.bounce-animation {
    --height-animation-timing: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

Components that benefit from HeightAnimation

  • Command palette with filtering
  • Combobox with dynamic options
  • Select dropdowns with search
  • Collapsible content sections
  • Any component with content that changes height dynamically

Command Palette (Overlay)

A full command palette activated with a keyboard shortcut.

Basic Command Menu

Embedded command menu with search and items.

Suggestions
Calendar
Search Emoji
Calculator
Settings
Profile
Billing
Settings

Grouped Commands

Organize commands into logical groups with headings.

Navigation
Home
Dashboard
Projects
Account
Account Settings
Notifications
Logout
Actions
New Document
Import

With Keyboard Shortcuts

Show keyboard shortcuts alongside commands.

File
New File ⌘N
Open File ⌘O
Save ⌘S
Edit
Undo ⌘Z
Redo ⌘⇧Z

Disabled Items

Disable specific items that are currently unavailable.

Actions
Edit
Copy
Paste (unavailable)
Delete (unavailable)

Empty State

Show a custom message when no results match.

No matches here
Hidden item

Complex Example

Combining all features: groups, icons, shortcuts, and disabled items.

Suggestions
Calendar
Search Emoji
Calculator
File
New File ⌘N
Open File ⌘O
Save File ⌘S
Save As... (Disabled) ⇧⌘S
Settings
Profile ⌘P
Billing ⌘B
Settings ⌘,

Lazy Loading (Large Lists)

Efficiently handle large datasets with lazy loading. Items are loaded on-demand as you scroll.

Lucide
Feather
Heroicons

Keyboard Navigation

Use arrow keys to navigate items, Enter to select, and Escape to close the palette.

API Reference

Component parameters and their types.

Prop Type Default Description
OnValueChange EventCallback&lt;string&gt; Callback invoked when a command item is selected.
ChildContent RenderFragment? null CommandInput and CommandList elements.
Disabled bool false On CommandItem: prevents selection when true.
Value string On CommandItem: the value passed to OnValueChange.
Heading string? null On CommandGroup: heading text for the group.
Placeholder string? null On CommandInput: placeholder text.

Reconnecting...

Attempting to rejoin the server

Connection Lost

Retrying in seconds

Connection Failed

Failed to rejoin the server.
Please retry or reload the page.

Session Paused

The session has been paused by the server

Resume Failed

Failed to resume the session.
Please reload the page.