--- url: "https://web.dev/articles/web-apps/shortcuts" titulek: "How to create app shortcuts | Web Apps | web.dev" h1: "How to create app shortcuts Stay organized with collections Save and categorize content based on your preferences." popis: "" jazyk: "en" kanonicka: "https://web.dev/articles/web-apps/shortcuts" drobecky: ["Web Apps", "How to create app shortcuts"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 01:49:26" znaku: 4967 slov: 689 kodovani: "iso-8859-2" sha256: "67383a7ddfd194dbce3d13dde5e08f4d7ccd275e4bd1acd94ff216bc4da62aa9" --- How to create app shortcuts Stay organized with collections Save and categorize content based on your preferences. François Beaufort App shortcuts help users quickly start common or recommended tasks within your web app. Easy access to those tasks from anywhere the app icon is displayed will enhance users' productivity as well as increase their engagement with the web app. The modern way Define app shortcuts in the web app manifest The app shortcuts menu is invoked by right-clicking the app icon in the taskbar (Windows) or dock (macOS) on the user's desktop, or by touch & holding the app's launcher icon on Android. App shortcuts menu opened on Android App shortcuts menu opened on Windows The app shortcuts menu is shown only for [Progressive Web Apps](/progressive-web-apps) that are installed. Check out [Installation](/learn/pwa/installation) in our [Learn PWA](/learn/pwa) module to learn about installability requirements. Each app shortcut expresses a user intent, each of which is associated with a URL within the scope of your web app. The URL is opened when a user activates the app shortcut. App shortcuts are optionally declared in the `shortcuts` array member of the [web app manifest](/learn/pwa/web-app-manifest). Below is an example of a potential web app manifest. `{ "name": "Player FM", "start_url": "https://player.fm?utm_source=homescreen", "shortcuts": [ { "name": "Open Play Later", "short_name": "Play Later", "description": "View the list of podcasts you saved for later", "url": "/play-later?utm_source=homescreen", "icons": [{ "src": "/icons/play-later.png", "sizes": "192x192" }] }, { "name": "View Subscriptions", "short_name": "Subscriptions", "description": "View the list of podcasts you listen to", "url": "/subscriptions?utm_source=homescreen", "icons": [{ "src": "/icons/subscriptions.png", "sizes": "192x192" }] } ] }` The classic way Let user drag links to the bookmark bar If the app is not installed yet, you can suggest the user to drag some links from your web page and release them in their browser bookmark bar. That way, they can quickly start common or recommended tasks within your web app. Further reading [Get things done quickly with app shortcuts](/articles/web-apps/shortcuts/app-shortcuts) Demo HTML ` How to create app shortcuts

How to create app shortcuts

  1. You can drag these blue page or red page links to the bookmarks bar and access them later.
  2. Install the app by clicking the button below. After the installation, the button is disabled.

` JS `// The install button. const installButton = document.querySelector('button'); // Only relevant for browsers that support installation. if ('BeforeInstallPromptEvent' in window) { // Variable to stash the `BeforeInstallPromptEvent`. let installEvent = null; // Function that will be run when the app is installed. const onInstall = () => { // Disable the install button. installButton.disabled = true; // No longer needed. installEvent = null; }; window.addEventListener('beforeinstallprompt', (event) => { // Do not show the install prompt quite yet. event.preventDefault(); // Stash the `BeforeInstallPromptEvent` for later. installEvent = event; // Enable the install button. installButton.disabled = false; }); installButton.addEventListener('click', async () => { // If there is no stashed `BeforeInstallPromptEvent`, return. if (!installEvent) { return; } // Use the stashed `BeforeInstallPromptEvent` to prompt the user. installEvent.prompt(); const result = await installEvent.userChoice; // If the user installs the app, run `onInstall()`. if (result.outcome === 'accepted') { onInstall(); } }); // The user can decide to ignore the install button // and just use the browser prompt directly. In this case // likewise run `onInstall()`. window.addEventListener('appinstalled', () => { onInstall(); }); }` Except as otherwise noted, the content of this page is licensed under the [Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/), and code samples are licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0). For details, see the [Google Developers Site Policies](https://developers.google.com/site-policies). Java is a registered trademark of Oracle and/or its affiliates. Last updated 2026-09-04 UTC.