New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@cmdpalette/react

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cmdpalette/react

A command Palette for React websites

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

logo

CmdPalette React

A Command Palette Library for your Website or Webapp

Installation

npm install @cmdpalette/core @cmdpalette/react

Usage

See https://cmdpalette.dev/ for example usage.

Properties

commands: Array<ICmdCommand> | () => Promise<Array<ICmdCommand>> - An array of commands to be displayed in the palette. Each command is an object with the following properties:

  • command - The name of the command to be displayed in the palette
  • action - The function to be called when the command is selected, it will receive the command object back as a parameter
  • help - The help text to be displayed in the palette as helper text for your search
  • subCommands - add subcommands in the same format as commands above, they will lazy load when selected (tab)

count: number - The number of commands to be displayed in the palette, defaults to 10

open: boolean - To control the openeing and closing of the palette manually, defaults to false. The palette will self open and close using the key command check if this is not set.

placeholder: string - The placeholder text to be displayed in the search input, defaults to ""

keyCommandCheck: (e: KeyboardEvent) => boolean - To control if the palette should self open and close using a key command check, defaults checking for ctrl+k || command+k.

License

MIT

Keywords

command palette

FAQs

Package last updated on 18 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts