Skip to content

⌘-k, or anything — Create beautiful, performant command palettes for your application.

License

Notifications You must be signed in to change notification settings

stacksjs/command-palette

Repository files navigation

Social Card of Stacks

npm version GitHub Actions Commitizen friendly

Command Palettes

Command Palettes, similar to kbar, are often used within applications. This library is to help create a custom & performant command palette for your application. Useful functions & headless components included.

🤖 Zero-config, by design
🎨 Built-in animations
🧙🏼‍♀️ Fully customizable components
Highly performant

The simple way to to use & design ⌘-k command palettes.

Get Started

It's incredibly easy to get started with this Command Palette stack. Simply install either of the following packages, dependent on whether you want to use framework agnostic Web Components or Vue components.

npm install @stacksjs/command-palette-elements
npm install @stacksjs/command-palette-vue

🤖 Usage

Web Component usage
<html>
  <body>
    <command-palette></command-palette>
    <script src="command-palette.js"></script>
  </body>
</html>
Vue 2 & 3 usage
<script setup lang="ts">
import CommandPalette from '@stacksjs/command-palette-vue'
</script>

<template>
  <CommandPalette />
</template>

You're developing your own command palette components and simply want to reuse the functions/composables?

Functions usage
npm install command-palette-fx

After you installed the command-palette library, you can then make of functions in the following way:

import { isDark, toggleDark } from 'command-palette-fx'

console.log('is dark mode?', isDark)

🧪 Testing

pnpm test

📈 Changelog

Please see our releases page for more information on what has changed recently.

💪🏼 Contributing

Please see CONTRIBUTING for details.

🏝 Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discussions on GitHub

For casual chit-chat with others using this package:

Join the Open Web Discord Server

📄 License

The MIT License (MIT). Please see LICENSE for more information.

Made with ❤️