Command

A fast, composable command menu for keyboard-first search and actions.

Loading preview…

Installation

Usage

Use command for searchable action menus. Compose input, list, groups, and items. Use Command.Dialog for a modal command palette.

1<script lang="ts">
2	import * as Command from '~/components/command';
3</script>
4
5<Command.Root class="rounded-lg border shadow-md">
6	<Command.Input placeholder="Type a command or search..." />
7	<Command.List>
8		<Command.Empty>No results found.</Command.Empty>
9		<Command.Group heading="Suggestions">
10			<Command.Item>Calendar</Command.Item>
11			<Command.Item>Search Emoji</Command.Item>
12			<Command.Item>Calculator</Command.Item>
13		</Command.Group>
14	</Command.List>
15</Command.Root>