An open API service indexing awesome lists of open source software.

https://github.com/wobsoriano/v-command-palette

A cmd+k component for Vuetify
https://github.com/wobsoriano/v-command-palette

command-palette vue vuetify

Last synced: 6 months ago
JSON representation

A cmd+k component for Vuetify

Awesome Lists containing this project

README

          

# v-command-palette

A command palette for [Vuetify](https://next.vuetifyjs.com).

https://github.com/wobsoriano/v-command-palette/assets/13049130/f99bccff-acde-422c-a30b-1a53bac0ffa0

## Installation

```bash
npm install v-command-palette
```

## Usage

Import the component at the root of your app

```vue

import { VCommandPalette, createCommand } from 'v-command-palette'

const commands = [
createCommand({
title: 'Home',
icon: 'mdi-home',
command() { /** do something */ },
section: 'Navigation',
shortcut: ['h'],
}),
createCommand({
title: 'Docs',
icon: 'mdi-book',
command() { /** do something */ },
section: 'Navigation',
shortcut: ['g', 'd'],
}),
]





```

## Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| commands | `array` | `[]` | The list of commands to display. See the [`Command`](https://github.com/wobsoriano/v-command-palette/blob/e1ed365d227caeb6c1fa6222ebbb98f80cc8fff8/lib/useSearch.ts#L6) interface. |
| textFieldProps | `object` | `{}` | [VTextField props](https://vuetifyjs.com/en/api/v-text-field/#props) |
| dialogProps | `object` | `{}` | [VDIalog props](https://vuetifyjs.com/en/api/v-dialog/#props) |
| cardProps | `object` | `{}` | [VCard props](https://vuetifyjs.com/en/api/v-card/#props) |
| cardTextProps | `object` | `{}` | [VCardText props](https://vuetifyjs.com/en/api/v-card-text/#props) |
| fuseOptions | `object` | `{}` | [Fuse.js options](https://www.fusejs.io/api/options.html) |

## Composables

- `useCommandPalette` - Programmaticaly open or close the dialog.

## License

MIT