0.0.18 • Published 3 years ago

svelte-kbar v0.0.18

Weekly downloads
-
License
MIT
Repository
github
Last release
3 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

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago