Svelte Search Panel - Bitblue

Keyboard-first search panel for jumping to pages, commands, or records

A dialog search panel with live filtering, keyboard navigation, and a Ctrl or Cmd shortcut. The docs header uses this component to search every page. Press the button below, or Ctrl/Cmd + K from anywhere in the docs.

Setup

<script lang="ts">
	import { Button, SearchPanel } from '.';
</script>

Default

shortcut defaults to k. Pass shortcut={false} when another panel on the page already listens for that shortcut. Pass href to navigate, or onselect to run a command.

<script lang="ts">
	import { Button, SearchPanel, type SearchPanelItem } from '.';

	let open = $state(false);

	const items: SearchPanelItem[] = [
		{
			id: 'accordion',
			label: 'Accordion',
			description: 'Components',
			keywords: ['collapse', 'faq'],
			href: '/docs/components/accordion'
		},
		{
			id: 'modal',
			label: 'Modal',
			description: 'Components',
			keywords: ['dialog'],
			href: '/docs/components/modal'
		},
		{
			id: 'input',
			label: 'Input',
			description: 'Forms',
			href: '/docs/forms/input'
		}
	];
</script>

<Button onclick={() => (open = true)}>Open search panel</Button>
<SearchPanel bind:open {items} placeholder="Search components" />

Props

PropTypeDefaultDescription
openbooleanfalseBindable open state
itemsSearchPanelItem[][]Results. Each item needs id and label. Optional description, keywords, href, icon, onselect
placeholderstringSearch…Input placeholder
emptyMessagestringNo results found.Shown when the query matches nothing
shortcutstring or falsekKey used with Ctrl or Cmd. false disables it
vimbooleanfalsej and k move the highlight

© 2026 Bitblue is a registered trademark. All Rights Reserved.