> For the complete documentation index, see [llms.txt](https://docs.klai.studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.klai.studio/reference/actions-processor/actions_overview/pwacustominstall.md).

# pwaCustomInstall

`pwaCustomInstall` listens for the browser's `beforeinstallprompt` event, prevents the browser from auto-showing the install prompt, and stores the deferred prompt so your app can trigger it later.

## Action Object

| Key                           | Type       | Description                                                              |
| ----------------------------- | ---------- | ------------------------------------------------------------------------ |
| `action`                      | `string`   | Must be `"pwaCustomInstall"`                                             |
| `options.beforeinstallprompt` | `function` | Optional callback to run when the browser fires the install prompt event |

## Example

```json
{
  "action": "pwaCustomInstall",
  "options": {
    "beforeinstallprompt": "callback that updates install UI state"
  }
}
```

## Behavior Notes

* BetterForms prevents the default browser install prompt.
* The deferred prompt is stored on `window.deferredPrompt`.
* This action is usually paired with `pwaPromptInstall`, which triggers the saved prompt later.
* Use this when you want a custom install button or install banner instead of the browser's default timing.

## Related Pages

* [pwaPromptInstall](/reference/actions-processor/actions_overview/pwapromptinstall.md)
* [Creating a PWA](/reference/apis-and-services/integrations/creating-a-pwa.md)
