# svelte-kbar

> A reusable k-bar component for your Svelte application.

Latest version **0.0.18** (published 2021-10-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install svelte-kbar
pnpm add svelte-kbar
yarn add svelte-kbar
bun add svelte-kbar
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.18 |
| Published | 2021-10-15 |
| First published | 2021-10-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 2 |
| Unpacked size | 27.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tas Hasting |
| Maintainers | dwagio |
| Keywords | svelte, search, navigation, navbar, component |

## Links

- npm: https://www.npmjs.com/package/svelte-kbar
- Repository: https://github.com/dwagio/svelte-kbar
- Issues: https://github.com/dwagio/svelte-kbar/issues
- npm.io page: https://npm.io/package/svelte-kbar

## Dependencies (2)

- [match-sorter](https://npm.io/package/match-sorter.md) ^6.3.1
- [svelte-portal](https://npm.io/package/svelte-portal.md) ^2.1.2

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 0.0.18 (latest) — 2021-10-15
- 0.0.17 — 2021-10-15
- 0.0.16 — 2021-10-15
- 0.0.15 — 2021-10-15
- 0.0.14 — 2021-10-15
- 0.0.13 — 2021-10-15
- 0.0.12 — 2021-10-15
- 0.0.11 — 2021-10-15
- 0.0.10 — 2021-10-12
- 0.0.9 — 2021-10-12
- 0.0.8 — 2021-10-12
- 0.0.7 — 2021-10-12
- 0.0.4 — 2021-10-09
- 0.0.2 — 2021-10-08
- 0.0.1 — 2021-10-08

## README

# Svelte kbar

Svelte re-implementation of https://github.com/timc1/kbar

## Usage

1. Install in your project

```
yarn add svelte-kbar
```

or

```
npm install svelte-kbar
```

2. Use the KBar component in your svelte app

[See this live in the Svelte REPL](https://svelte.dev/repl/48685c134d644bf8b83cee8e513e680e?version=3.43.1)

```html
<script>
	import { KBar } from 'svelte-kbar';

	const actions = [
		{
			id: 'blog',
			name: 'Blog',
			shortcut: ['b'],
			keywords: 'writing words',
			perform: () => console.log('blog')
		},
		{
			id: 'contact',
			name: 'Contact',
			shortcut: ['c'],
			keywords: 'email',
			perform: () => console.log('contact')
		},
		{
			id: 'theme',
			name: 'Set Theme',
			shortcut: ['t'],
			keywords: 'dark light mode',
			children: ['dark', 'light']
		},
		{
			id: 'dark',
			name: 'Dark Mode',
			parent: 'theme',
			shortcut: ['d'],
			keywords: '',
			perform: () => {
				console.log('Dark mode');
			}
		},
		{
			id: 'light',
			name: 'Light Mode',
			parent: 'theme',
			shortcut: ['d'],
			keywords: '',
			perform: () => {
				console.log('Light mode');
			}
		}
	];
</script>

<KBar {actions} />
```

## Development Setup

1. Clone this repository

```
git clone git@github.com:dwagio/svelte-kbar.git
```

2. Install dependencies

```
yarn install
```

3. Start the dev server

```
yarn run dev
```

4. Go to http://localhost:3000 to see your live development instance.

---
_Source: https://npm.io/package/svelte-kbar · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
