CommandBar
A sticky site bar whose prompt is a real input: it runs your Commands and searches for anything else,
printing the output below the bar like a terminal. help lists the commands. / or ⌘K (Ctrl K) focuses it from
anywhere on the page, the arrow keys move through results, Enter opens one and Escape clears. As in fish, what Tab
would complete to shows faded after what's typed, and Tab or → at the end takes it.
CommandBar(props: CommandBarProps): ElementProps
- commandsoptional
Command[] - searchoptional
(query: string) => Promise<CommandResult[]> Searches for anything that isn't a command. Called as the reader types; earlier calls are ignored once a later one starts.
- authoroptional
Author Defaults to defaultAuthor.
- cwdoptional
string Shown as the prompt's working directory, such as the section being read.
- homeoptional
string Where the author's photo links to. Defaults to
/.- placeholderoptional
string Defaults to "search, or type help", or "type help" without a search.
- actionsoptional
ComponentChildren Links or buttons beside the ThemeToggle.
- classoptional
string
design-system is a Ben Hodgson projectGitHub