Code Monkey home page Code Monkey logo

cmd-bar's Introduction

cmd-bar wip

Preview

npm version npm downloads License Vue

Features

  • 🎨  Unstyled - No styles included, you can style it as you want
  • 🧩  Extensible - You can add your own Modal and components
  • ⌨️  Key bindings - Usable with just a keyboard
  • 🧙‍  Virtualized - It uses useVirtualList

📖  Read more

Quick Setup

  1. Add cmd-bar dependency to your project
# Using pnpm
pnpm add -D cmd-bar

# Using yarn
yarn add --dev cmd-bar

# Using npm
npm install --save-dev cmd-bar
  1. Then you can import the CmdBar Compound Component in your project.
import { CmdBar } from 'cmd-bar'

<CmdBar :groups="groupedCommands" />
  <CmdBar.Dialog>
    <template #header>
      <CmdBar.Input placeholder="search fo anything />
    </template>
    <template #content>
      <CmdBar.List :config="listConfig">
          <template #default="{ command }">
            <div class="leading">
              <img :src="command.leading" alt="icon" />
              {{ command.label }}
            </div>
            <span v-if="command.shortcut" class="actions">
              <kbd v-for="shortcut of formattedShortcuts(command.shortcut)" :key="shortcut">
                {{ shortcut }}
              </kbd>
            </span>
          </template>
      </CmdBar.List>
    </template>
  </CmdBar.Dialog>
</CmdBar>

That's it! ✨

📖  Read more

Props to xiaoluoboding/vue-command-palette and CommandPalette - Nuxt UI, for the inspiration.

cmd-bar's People

Contributors

fabkho avatar github-actions[bot] avatar nuxt-studio[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.