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-prompt

Usage

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

PropTypeDefaultDescription
appNamestring--Application name to display.
descriptionstring--Description text.
onInstall() => void--Callback when install is clicked.
onDismiss() => void--Callback when dismissed.
classNamestring--Additional CSS classes.