- Home
- Primitives
- Command Palette
Command Palette
Modal search and action launcher.
Preview
This preview uses documentation-only styling. Ship with one of the included recipe outputs (CSS, Tailwind, or UnoCSS) for production styles.
Modal search and action launcher.
Usage
Compose Root, Input, List, Group, Item, Empty.
import * as CommandPalette from "@solidiom/command-palette"
;<CommandPalette.Root>Command Palette content</CommandPalette.Root>Installation
Install the package with pnpm add @solidiom/command-palette. The package requires compatible solid-js and @solidjs/web peer dependencies.
Parts
Command Palette exposes 6 parts:
- Root —
data-part="root". - Input —
data-part="input". - List —
data-part="list". - Group —
data-part="group". - Item —
data-part="item". - Empty —
data-part="empty".
Styling
Command Palette carries data-scope="command-palette" and data-part attributes on each part for CSS/recipe targeting. State attributes like data-state, data-disabled, and data-highlighted are exposed where applicable.
Keyboard & behavior
This primitive has no keyboard interaction. It renders content that does not independently receive focus or respond to key events.
Composition
Command Palette is designed to compose with other primitives. Its parts can be combined with Field, Button, or other primitives as needed.
SSR and hydration
Command Palette renders as semantic HTML during server rendering. Interactive behavior (keyboard handlers, state management) activates on hydration without layout shift.