Shortcuts for Quick Actions
You'll learn how to add long-press contextual shortcuts to your PWA's home screen icon for instant access to key features.
What Are App Shortcuts?
When users long-press your installed PWA icon on their home screen (Android) or right-click it (desktop), they can see a menu of quick actions—just like native apps. Think of shortcuts as express lanes: instead of opening your app and navigating three screens deep to check messages, users tap "View Messages" from the icon menu and land there instantly.
Adding Shortcuts to Your Manifest
You define shortcuts in your manifest.json using the shortcuts array:
{
"name": "TaskMaster Pro",
"short_name": "TaskMaster",
"shortcuts": [
{
"name": "New Task",
"short_name": "New",
"description": "Create a new task quickly",
"url": "/new-task",
"icons": [{ "src": "/icons/new-96.png", "sizes": "96x96" }]
},
{
"name": "My Tasks",
"url": "/tasks",
"icons": [{ "src": "/icons/list-96.png", "sizes": "96x96" }]
}
]
}
Each shortcut needs a name (required), a url where it navigates (required), and ideally icons for visual recognition. The short_name and description are optional but helpful for clarity.
Best Practices
Limit shortcuts to 4-5 maximum—only the most-used actions. Think: "What would users do 80% of the time?" Shortcuts must point to URLs within your app's scope. Use monochrome or simple icons that work on any background.
Key Takeaway: App shortcuts transform your PWA icon into a power-user tool, providing instant access to frequently-used features directly from the home screen without opening the full app first.