1.0.11 • Published 6 months ago

shell-main-menu v1.0.11

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
6 months ago

Usage

import Menu from "shell-main-menu";
//or
const Menu = require('shell-main-menu');


const menu = new Menu("this title", { //title
	subTitle: "this sub title", //subTitle
	options: [{
		label: string; //label  item from menu
		menu?: Menu; //sub menu
		cb?: () => void; //handle or action for selected item menu
		question?: {
          text: string; // text your question
          cb: () => void; //callback for user response
        }; // object or array objects
	}], 
});


menu.render();

About

use arrow UP or DOWN for chenge select item menu

methoddescripton
renderrender menu on terminal
static exitdisable menu and remove listener "keyboard"
paramdescripton
title: stringtitle for menu
subTitle?: stringsub-title for menu
statuc useBack: booleanrender menu item for back to parent
statuc useBack: booleanrender menu item for back to parent

Example

example

1.0.9

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.11

6 months ago

1.0.10

6 months ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago