Skip to content

Hold To Open Menu

A button which changes it’s appearance if tapped

Installation

Terminal window
npm install @cascadeui/hold-menu

Props

PropTypeDescription
itemsmenuItem[]Array of objects containing 3 properties: id(string), label(string) and onPress(callback function).
holdDurationnumberhow much longer user should hold to open the menu.
menuStyleViewstyleStyle of the menu container.
menuItemStyleViewstyleStyle of the menu Item.
menuItemTextStyleViewstyleStyle of the menu Text.
overlayColorstringcolor of the menu overlay.
onOpencallbackfunction to be called when menu opens
onClosecallbackfunction to be called when menu closes