nativescript-menu
A plugin that adds a pop-up menu to NativeScript
Installation
From your command prompt/terminal go to your app's root folder and execute:
tns plugin add nativescript-menu
Version lower then NativeScript 7
tns plugin add nativescript-menu@1.1.6
Demo
Android | iOS |
---|---|
Usage
<Page xmlns="http://schemas.nativescript.org/tns.xsd" loaded="pageLoaded" class="page" xmlns:ui="nativescript-menu"> <StackLayout class="p-20"> <Button id="menuBtn" text="getMenu" tap="{{ buttonTap }}"/> </StackLayout></Page>
;
with custom options
;
API
- MenuOptions
Method | Description |
---|---|
popup(options: MenuOptions): Promise<{id: number, title: string} | actionObject | boolean> | Create a pop-up menu and show it |