Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@truework/true-command

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@truework/true-command

Command Palette interface

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
5
Weekly downloads
 
Created
Source

@truework/TrueCommand

Command bar for creating app shortcuts

npm i @truework/true-command

Example

To open the command palette press Cmd/Ctrl + k

import { CommandPalette } from '@truework/true-command';
// needed to use default command palette styles
import '@truework/true-command/dist/styles.css';

export function CommandBar() {
  return (
    <CommandPalette
      commands={[
        {
          name: 'Start verification',
          action: () => {
            console.log('Start verification action');
          },
          shortcutKey: {
            key: 'N',
            specialKey: 'shift'
          }
        },
        {
          name: 'Open settings',
          description: 'Opens the settings page',
          action: () => {
            console.log('Open settings action');
          }
        }
      ]}
    />
  );
}

FAQs

Package last updated on 27 May 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc