Add app shortcuts
Published Updated
The manifest shortcuts member declares quick actions that open screens inside an installed
app. The operating system draws the menu: right-click the app’s taskbar icon on Windows,
or touch and hold its launcher icon on Android to open it.
You need an installable PWA (see Make it installable) because the menu is shown only for installed apps, and a list of two to four destinations users reach often. Support is a Chromium feature (Chrome and Edge on Windows, macOS, ChromeOS, and Android); the table in step 4 has the versions.
1. Declare shortcuts in the manifest
Section titled “1. Declare shortcuts in the manifest”Each entry needs name and url; short_name, description, and icons are optional.
Order the array by importance. The manifest specification says browsers should show entries
in manifest order and may truncate the list to fit the host operating system’s limits.
{ "name": "Ledger", "start_url": "/app/", "scope": "/app/", "display": "standalone", "icons": [{ "src": "/icons/icon-512.png", "sizes": "512x512", "type": "image/png" }], "shortcuts": [ { "name": "New invoice", "short_name": "New", "description": "Create a new invoice", "url": "/app/invoice/new?source=shortcut", "icons": [{ "src": "/icons/shortcut-new-192.png", "sizes": "192x192", "type": "image/png" }] }, { "name": "Dashboard", "url": "/app/dashboard?source=shortcut", "icons": [{ "src": "/icons/shortcut-dashboard-192.png", "sizes": "192x192", "type": "image/png" }] } ]}Use a single 192×192 PNG per shortcut, or the 48 dp series (36, 48, 72, 96, 144, 192) for
pixel-exact rendering; SVG shortcut icons are not supported by Chromium, and macOS shows
no icons in the Dock menu at all, so names must stand on their own. A ?source=shortcut
parameter lets analytics count launches from the menu.
2. Keep every shortcut URL in scope
Section titled “2. Keep every shortcut URL in scope”A shortcut url must sit inside the manifest scope; an out-of-scope URL is dropped.
Relative URLs resolve against the manifest file’s location, not the page, so a manifest at
/app/manifest.webmanifest with "url": "../projects" opens /projects, which is outside
/app/ and will be ignored. The destination does not have to be reachable from in-app
navigation; a shortcut-only entry point is fine as long as it stays in scope.
3. Mirror the menu inside the app
Section titled “3. Mirror the menu inside the app”No JavaScript API reports whether the current browser and operating system will draw a shortcuts menu, and the W3C specification leaves presentation and count to the user agent. Render the same actions as an in-app menu too. This unconditional fallback is the only reliable way to give users an equivalent path in browsers without shortcuts. You can check the manifest to keep the two menus in sync.
async function shortcutsFromManifest() { const link = document.querySelector('link[rel="manifest"]'); if (!link) return []; try { const manifest = await fetch(link.href).then((response) => response.json()); return Array.isArray(manifest.shortcuts) ? manifest.shortcuts : []; } catch { return []; }}
shortcutsFromManifest().then((shortcuts) => { const menu = document.querySelector('#quick-actions'); menu.replaceChildren( ...shortcuts.map((shortcut) => { const link = document.createElement('a'); link.href = shortcut.url; link.textContent = shortcut.name; return link; }), );});4. Install and open the shortcut menu
Section titled “4. Install and open the shortcut menu”Install the app, then on Windows right-click its taskbar icon, on macOS right-click the Dock icon, and on Android touch and hold the launcher icon. The entries from step 1 appear in order; choosing one opens the app at that URL. Chrome DevTools shows the parsed entries as Shortcut #1, Shortcut #2, and so on under Application > Manifest, which is the quickest check that icons resolve. Changes reach existing installs on the browser’s manifest update check, which Chrome caps at once a day.
- Legend
- Yes
- Partial
- Flag
- No
- Unknown
| Browser / Platform | Support | Versions | Confidence | Source | Notes |
|---|---|---|---|---|---|
| Chrome (Android)# | Yes | 85 | low | source | — |
| Chrome (Desktop)# | Yes | 96 | low | source | — |
| Edge (Desktop)# | Yes | 96 | low | source | — |
| Samsung Internet# | Yes | 14.0 | low | source | — |
| Firefox (Desktop)# | No | — | low | source | 1 |
| Safari (iOS)# | No | — | low | source | 2 |
| Safari (macOS)# | Yes | 17.4 | low | source | — |
- Firefox desktop does not support `shortcuts`. Its taskbar web apps (Windows, Firefox 143 and later) are pinned from the address bar rather than installed from the manifest.
- Not supported on iOS.
See also
Section titled “See also”- Manifest shortcuts
- App shortcuts after install
- manifest: shortcuts support
- Get things done quickly with app shortcuts (web.dev)
- Web Application Manifest: shortcuts member (w3.org)
← Back to the Guides overview.