Pre-Release — API subject to change

Menus

Part of the ProControls for p5.js documentation.

New here? See the Getting Started page for HTML setup, script tags, a minimal sketch, and the common options table.

Menu PopupMenu

PopupMenu Input

A convenience wrapper around Menu pre-configured with orientation: 'popup'. Positions a floating vertical menu at the given x, y coordinate. Submenus and their arrow indicators automatically flip left or right depending on which half of the canvas the menu sits in. Accepts all the same options as Menu.

new PopupMenu(opts)
Inherits all Menu options. orientation is fixed to 'popup'.

Example

editable — changes update the preview

Right-click context menu

editable — changes update the preview