0.0.18 • Published 4 years ago

svelte-kbar v0.0.18

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

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
  1. Use the KBar component in your svelte app

See this live in the Svelte REPL

<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
  1. Install dependencies
yarn install
  1. Start the dev server
yarn run dev
  1. Go to http://localhost:3000 to see your live development instance.
0.0.18

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago