v148 · origin trial · pwa

Web app HTML install element

A declarative <install>-style element that lets a site prompt the user to install a web app — without JavaScript and without the bespoke beforeinstallprompt dance. Supports cross-origin install via two attributes for marketplaces and aggregator sites.

Heads up Origin trial. Exact element name and attribute set may shift before ship; see the aka.ms/installelement explainer for the canonical shape.

concepts

  1. Install Button Cookbook

    Markup recipes side by side: same-origin install, cross-origin install with manifest URL, install with custom icon and label. Each card shows the exact HTML and a rendered button.

  2. Marketplace Listing

    The explainer's democratising-distribution use case: an aggregator-style "app garden" directory where each listing carries an install element pointing to a different origin's manifest. One click to install, mediated by the UA.

  3. Cross-Origin Installer

    A simulated marketplace where each app card uses <install manifesturl="…"> to install from a different origin. Tracks install state per app and shows the generated HTML for same-origin vs cross-origin cases.

  4. Install Button Designer

    A visual designer for <install> configurations. Set button text, manifest URL, icon, theme, size, and cross-origin mode. Preview the button in before-install / installing / installed / launch states with dark/light theme toggle. Generate the HTML markup, copy to clipboard, and see the beforeinstallprompt fallback pattern for older browsers.

  5. Install State Visualizer

    An interactive state machine diagram for the <install> element lifecycle — waiting, eligible, prompting, accepted, declined — with clickable state nodes and available-transition buttons. A PWA eligibility checklist (HTTPS, service worker, manifest, name, icon, start_url) toggles each criterion and re-evaluates whether the element can enter the eligible state. Live event log shows all state transitions.

why it exists

Installing a web app today requires JavaScript wired up to beforeinstallprompt, a styled button that mimics the system UI, and platform-specific fallbacks. That keeps install rates low and the API confusing. A declarative HTML element gives every site a one-line install button, lets non-developers ship it correctly, and democratises distribution by allowing marketplaces to host install entry points for apps from other origins.

references

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗