{"id":15141990,"url":"https://github.com/xlmnxp/nativescript-menu","last_synced_at":"2025-10-23T19:31:07.292Z","repository":{"id":32983285,"uuid":"148707154","full_name":"xlmnxp/nativescript-menu","owner":"xlmnxp","description":"A plugin that adds a pop-up menu to NativeScript","archived":false,"fork":false,"pushed_at":"2023-04-29T09:27:36.000Z","size":5792,"stargazers_count":20,"open_issues_count":9,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-30T20:31:12.514Z","etag":null,"topics":["android","ios","menu","nativescript","nativescript-plugin","popup"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xlmnxp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-13T22:53:57.000Z","updated_at":"2024-05-30T16:03:16.000Z","dependencies_parsed_at":"2024-06-21T05:44:50.196Z","dependency_job_id":"1fd06814-797f-4bff-b1de-168a6d5f6e59","html_url":"https://github.com/xlmnxp/nativescript-menu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlmnxp%2Fnativescript-menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlmnxp%2Fnativescript-menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlmnxp%2Fnativescript-menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlmnxp%2Fnativescript-menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xlmnxp","download_url":"https://codeload.github.com/xlmnxp/nativescript-menu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237877021,"owners_count":19380344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","ios","menu","nativescript","nativescript-plugin","popup"],"created_at":"2024-09-26T09:21:36.036Z","updated_at":"2025-10-23T19:31:01.651Z","avatar_url":"https://github.com/xlmnxp.png","language":"TypeScript","readme":"# nativescript-menu [![Build Status](https://travis-ci.org/xlmnxp/nativescript-menu.svg?branch=master)](https://travis-ci.org/xlmnxp/nativescript-menu)\n\nA plugin that adds a pop-up menu to NativeScript\n\n### Installation\n\nFrom your command prompt/terminal go to your app's root folder and execute:\n`tns plugin add nativescript-menu`\n\n#### Version lower then NativeScript 7\n`tns plugin add nativescript-menu@1.1.6`\n\n## Demo\n\n| Android | iOS |\n| ------------ | ------------ |\n| \u003cimg alt=\"screenshot 1\" src=\"https://raw.githubusercontent.com/xlmnxp/nativescript-menu/master/screenshots/screenshotAndroid.gif\" width=\"170\"\u003e | \u003cimg alt=\"screenshot 2\" src=\"https://raw.githubusercontent.com/JoshDSommer/nativescript-menu/master/screenshots/screenshotIos.gif\" width=\"170\"\u003e |\n\n## Usage\n\n###\n\n```XML\n\u003cPage xmlns=\"http://schemas.nativescript.org/tns.xsd\" loaded=\"pageLoaded\" class=\"page\"\n  xmlns:ui=\"nativescript-menu\"\u003e\n  \u003cStackLayout class=\"p-20\"\u003e\n    \u003cButton id=\"menuBtn\" text=\"getMenu\" tap=\"{{ buttonTap }}\"/\u003e\n  \u003c/StackLayout\u003e\n\u003c/Page\u003e\n```\n\n```typescript\nimport { Menu } from \"nativescript-menu\";\n\nexport class HelloWorldModel extends Observable {\n  public message: string;\n  private menu: Menu;\n\n  constructor(public page: Page) {\n    super();\n  }\n\n  buttonTap() {\n    Menu.popup({\n      view: this.page.getViewById(\"menuBtn\"),\n      actions: [\"Example\", \"NativeScript\", \"Menu\"]\n    })\n      .then(action =\u003e {\n        alert(action.id + \" - \" + action.title);\n      })\n      .catch(console.log);\n  }\n}\n```\n\nwith custom options\n\n```typescript\nimport { Menu } from \"nativescript-menu\";\n\nexport class HelloWorldModel extends Observable {\n  public message: string;\n  private menu: Menu;\n\n  constructor(public page: Page) {\n    super();\n  }\n\n  buttonTap() {\n    Menu.popup({\n      view: this.page.getViewById(\"menuBtn\"),\n      actions: [\n        { id: \"one\", title: \"Example\" },\n        { id: \"two\", title: \"NativeScript\", customOption: \"Hello\" },\n        { id: \"three\", title: \"Menu\" }\n      ]\n    })\n      .then(action =\u003e {\n        alert(JSON.stringify(action));\n      })\n      .catch(console.log);\n  }\n}\n```\n\n## API\n\n- MenuOptions\n\n```typescript\nexport interface MenuOptions {\n  title?: string; // IOS Only\n  message?: string; // IOS Only\n  view: View;\n  actions: object[] | string[];\n  cancelButtonText?: string; // IOS Only\n}\n```\n\n| Method                                                                                           | Description                      |\n| ------------------------------------------------------------------------------------------------ | -------------------------------- |\n| **popup(options: MenuOptions)**: Promise\u003c{id: number, title: string} \\| actionObject \\| boolean\u003e | Create a pop-up menu and show it |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlmnxp%2Fnativescript-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxlmnxp%2Fnativescript-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlmnxp%2Fnativescript-menu/lists"}