"use client";
import { InstallPrompt } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
onInstall | (outcome: InstallOutcome) => void | — | Callbacks. |
placement | "bottom" | "inline" | inline | Where it sits relative to its anchor (start/end follow the writing direction). |
remindAfterDays | number | — | Show again after this many days. |
description | ReactNode | — | Supporting text. |
dismissLabel | ReactNode | — | Content overrides. |
forcePlatform | "ios" | "prompt" | — | Show the UI for one platform regardless of the browser (previews, tests). |
icon | ReactNode | — | Content overrides. |
installLabel | ReactNode | — | Content overrides. |
iosHint | ReactNode | — | Content overrides. |
onDismiss | () => void | — | Callbacks. |
storageKey | string | false | pixxl-install-prompt | Dismissal key. |
title | ReactNode | — | Title (any content). |
onInstall(outcome: InstallOutcome) => void
Callbacks.
placementdefault inline"bottom" | "inline"
Where it sits relative to its anchor (start/end follow the writing direction).
remindAfterDaysnumber
Show again after this many days.
descriptionReactNode
Supporting text.
dismissLabelReactNode
Content overrides.
forcePlatform"ios" | "prompt"
Show the UI for one platform regardless of the browser (previews, tests).
iconReactNode
Content overrides.
installLabelReactNode
Content overrides.
iosHintReactNode
Content overrides.
onDismiss() => void
Callbacks.
storageKeydefault pixxl-install-promptstring | false
Dismissal key.
titleReactNode
Title (any content).
Other props are passed to the root element (HTMLAttributes<HTMLElement>), including className, style, id and aria-* attributes.
const track = (outcome: string) => console.log(outcome);
<InstallPrompt placement="bottom" remindAfterDays={30} onInstall={(outcome) => track(outcome)} />