ui

Command

A command palette component built with Dialog and Autocomplete for searching and executing commands. Built with Base UI and Tailwind CSS. Copy-paste ready.

API Reference

Installation

Usage

Examples

Simple Command

A basic command dialog with a flat list of searchable items and an empty-state message when no results match.

With Groups

Organizes items into labeled sections (e.g. "Settings", "Shortcuts") using CommandGroup for better command palette discoverability.

Filters a list of files by name as the user types, showing the file path and type for each match.

Searches a user directory and displays each match with an avatar, name, and role details.

With Shortcuts

Lists available actions alongside their keyboard shortcuts using CommandShortcut, similar to a VS Code command palette.

Recent and Favorites

Pre-populates the command list with recently used and starred items before the user types a search query.

Account Settings Palette

Three groups — Account, Preferences, and Session — each with icon-prefixed items. Sign out is in the Session group styled as destructive.

Searches across issues, pull requests, branches, and files in one palette. Each result type has a distinct colored icon and a number badge where applicable.

Go To Page

A navigation palette where frequently accessed pages have keyboard shortcut hints. Unbound pages show a trailing arrow instead.

Appearance Picker

Two groups — Theme and Accent Color — with a checkmark on the currently active option. Selecting an item closes the dialog and updates external state.

A minimal page-jump palette with notification count badges on relevant items and a CommandFooter showing keyboard navigation hints.