Coder Social home page Coder Social logo

wobsoriano / v-command-palette Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 0.0 145 KB

A cmd+k component for Vuetify

Home Page: https://v-command-palette.vercel.app

License: MIT License

JavaScript 0.53% HTML 2.95% Vue 64.13% TypeScript 32.39%
command-palette vue vuetify

v-command-palette's Introduction

v-command-palette

A command palette for Vuetify.

Screen.Recording.2023-12-22.at.3.29.56.PM.mov

Installation

npm install v-command-palette

Usage

Import the component at the root of your app

<script setup>
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'],
  }),
]
</script>

<template>
  <VApp>
    <VMain>
      <VCommandPalette :commands="commands" />
    </VMain>
  </VApp>
</template>

Props

Name Type Default Description
commands array [] The list of commands to display. See the Command interface.
textFieldProps object {} VTextField props
dialogProps object {} VDIalog props
cardProps object {} VCard props
cardTextProps object {} VCardText props
fuseOptions object {} Fuse.js options

Composables

  • useCommandPalette - Programmaticaly open or close the dialog.

License

MIT

v-command-palette's People

Contributors

wobsoriano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

v-command-palette's Issues

[Bug] Ctrl+K focuses address bar on Firefox

This doesn't appear to happen on other sites I tried this on (Vuetify, Prime Vue, and Mantine) ๐Ÿค”

Maybe a default behavior that's not being blocked or prevented?

2024-01-01_gE0cQec6gM.mp4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.