Component
Install Prompt
A PWA install banner prompting users to install the app. Dismissible with install callback. Uses the headless @refraction-ui/install-prompt core.
Examples
PWA install banner with install and dismiss actions.
Installation
$
pnpm add @refraction-ui/react-install-promptUsage
tsx
import { InstallPrompt } from '@refraction-ui/react-install-prompt'
export function MyComponent() {
return (
<InstallPrompt
appName="My PWA"
description="Install for offline access"
onInstall={() => {}}
onDismiss={() => {}}
/>
)
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
appName | string | -- | Application name to display. |
description | string | -- | Description text. |
onInstall | () => void | -- | Callback when install is clicked. |
onDismiss | () => void | -- | Callback when dismissed. |
className | string | -- | Additional CSS classes. |