🎨 UI Patterns Learning App

Interactive examples for mastering UI design patterns

←Back to Patterns
UI Patterns Learning App

👆 Long Press Pattern

Trigger actions by pressing and holding on elements, providing contextual menus and secondary interactions.

🎯 Interactive Example

Long press (hold for 500ms) on any item to reveal a context menu with actions.

📄

Document 1

PDF • 2.3 MB

Long press for options
🖼️

Image 1

JPG • 1.8 MB

Long press for options
🎥

Video 1

MP4 • 15.2 MB

Long press for options
🎵

Audio 1

MP3 • 3.7 MB

Long press for options

How to Use

• Press and hold any item for 500ms
• A context menu will appear with actions
• Click outside to dismiss the menu
• Works on both touch and mouse devices

💻 Code Example

JSX
Loading source code...

✨ Key Features

✓

Touch & Mouse Support

Works on both mobile and desktop devices

✓

Configurable Duration

Customizable long press timing

✓

Context Menus

Dynamic context menus with actions

✓

Visual Feedback

Clear indication of long press state

✓

Click Outside Dismiss

Auto-dismiss context menus

✓

Accessibility

Keyboard navigation and screen reader support

🎯 Use Cases

📱

Mobile Apps

Context menus and secondary actions

📁

File Managers

File operations and context menus

🎮

Games

Secondary actions and power-ups