All Projects → xlmnxp → nativescript-menu

xlmnxp / nativescript-menu

Licence: MIT license
A plugin that adds a pop-up menu to NativeScript

Programming Languages

typescript
32286 projects
shell
77523 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to nativescript-menu

Fepopupmenucontroller
A simple, elegant pop-up menu view
Stars: ✭ 32 (+88.24%)
Mutual labels:  popup, menu
Customalertviewdialogue
Custom AlertView Dialogue is the world's most advanced alert view library. Custom AlertView Dialogue includes simple message popups, confirmation alerts, selector popups, action sheet bottom menus, and input/feedback contact forms.
Stars: ✭ 100 (+488.24%)
Mutual labels:  popup, menu
Electron Tray Window
🖼️ Generates custom tray windows with Electron.js
Stars: ✭ 71 (+317.65%)
Mutual labels:  popup, menu
Fwpopupview
弹窗控件:支持AlertView、Sheet、自定义视图的PopupView。AlertView中可以嵌套自定义视图,各组件的显示隐藏可配置;Sheet仿微信样式;同时提供自定义弹出。更多配置请参考”可设置参数“,提供OC使用Demo。
Stars: ✭ 361 (+2023.53%)
Mutual labels:  popup, menu
nativescript-image-filters
NativeScript plugin to apply filters to images
Stars: ✭ 30 (+76.47%)
Mutual labels:  nativescript, nativescript-plugin
Anylayer
Android稳定高效的浮层创建管理框架
Stars: ✭ 745 (+4282.35%)
Mutual labels:  popup, menu
Tippyjs
Tooltip, popover, dropdown, and menu library
Stars: ✭ 9,433 (+55388.24%)
Mutual labels:  popup, menu
Nativescript Vue
Native mobile applications using Vue and NativeScript.
Stars: ✭ 4,784 (+28041.18%)
Mutual labels:  nativescript, nativescript-plugin
Dropdownmenukit
UIKit drop down menu, simple yet flexible and written in Swift
Stars: ✭ 246 (+1347.06%)
Mutual labels:  popup, menu
Material Ui Popup State
boilerplate for common Material-UI Menu, Popover and Popper use cases
Stars: ✭ 186 (+994.12%)
Mutual labels:  popup, menu
Vc Popup
一个行为标准的vue popup组件集
Stars: ✭ 289 (+1600%)
Mutual labels:  popup, menu
texttospeech
Text to Speech NativeScript plugin for Android & iOS 📢
Stars: ✭ 44 (+158.82%)
Mutual labels:  nativescript, nativescript-plugin
Selectmenu
Simple, easily and diversity menu solution
Stars: ✭ 284 (+1570.59%)
Mutual labels:  popup, menu
Ybpopupmenu
快速集成popupMenu
Stars: ✭ 816 (+4700%)
Mutual labels:  popup, menu
Menu
The most customizable menu for macOS apps.
Stars: ✭ 84 (+394.12%)
Mutual labels:  popup, menu
Fwpopupviewoc
信手拈来的OC弹窗库:1、继承 FWPopupBaseView 即可轻松实现各种位置、动画类型的弹窗;2、新功能引导弹窗。更多弹窗场景等你来挑战,总之,想怎么弹就怎么弹!!!
Stars: ✭ 70 (+311.76%)
Mutual labels:  popup, menu
nativescript-vue-multi-drawer
A NativeScript-Vue component for creating multiple side drawers (4 sides supported)
Stars: ✭ 45 (+164.71%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-homekit
🏡 HomeKit plugin for your fancy NativeScript app
Stars: ✭ 23 (+35.29%)
Mutual labels:  nativescript, nativescript-plugin
Cascade
Nested popup menus with smooth height animations
Stars: ✭ 1,493 (+8682.35%)
Mutual labels:  popup, menu
nativescript-store-update
No description or website provided.
Stars: ✭ 18 (+5.88%)
Mutual labels:  nativescript, nativescript-plugin

nativescript-menu Build Status

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 [email protected]

Demo

Android iOS
screenshot 1 screenshot 2

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>
import { Menu } from "nativescript-menu";

export class HelloWorldModel extends Observable {
  public message: string;
  private menu: Menu;

  constructor(public page: Page) {
    super();
  }

  buttonTap() {
    Menu.popup({
      view: this.page.getViewById("menuBtn"),
      actions: ["Example", "NativeScript", "Menu"]
    })
      .then(action => {
        alert(action.id + " - " + action.title);
      })
      .catch(console.log);
  }
}

with custom options

import { Menu } from "nativescript-menu";

export class HelloWorldModel extends Observable {
  public message: string;
  private menu: Menu;

  constructor(public page: Page) {
    super();
  }

  buttonTap() {
    Menu.popup({
      view: this.page.getViewById("menuBtn"),
      actions: [
        { id: "one", title: "Example" },
        { id: "two", title: "NativeScript", customOption: "Hello" },
        { id: "three", title: "Menu" }
      ]
    })
      .then(action => {
        alert(JSON.stringify(action));
      })
      .catch(console.log);
  }
}

API

  • MenuOptions
export interface MenuOptions {
  title?: string; // IOS Only
  message?: string; // IOS Only
  view: View;
  actions: object[] | string[];
  cancelButtonText?: string; // IOS Only
}
Method Description
popup(options: MenuOptions): Promise<{id: number, title: string} | actionObject | boolean> Create a pop-up menu and show it
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].