Smart App Banner for React
npm install smartbanner-tsxSmart App Banner for React v18+ (TypeScript) โ a customizable React component for promoting iOS and Android apps on mobile websites. Lightweight, flexible, and easy to integrate with your own styles or use the default native-like appearance.
> ๐ฏ Live Demo: madiyar.github.io/smartbanner-tsx
> ๐ Based on: react-smartbanner
  
* ๐ฑ Device detection using ua-parser-js to target iOS and Android only
* ๐ง Built-in cookie logic (via js-cookie) to hide banner for a period after user action
* ๐งฉ Customizable behavior โ pass custom app links, metadata, and localization strings
* ๐จ Styling flexibility โ use default styles or override with your own CSS
* ๐ React Portal support โ render banner outside normal DOM flow
* โ
Written in TypeScript โ includes full typings for a smooth developer experience
* ๐งช Works with React v18+
``bash`
npm install smartbanner-tsxor
yarn add smartbanner-tsxor
pnpm add smartbanner-tsx
1. Add meta tags to
`html
`2. Import and use the component
`tsx
import { SmartBanner } from "smartbanner-tsx";
import "smartbanner-tsx/dist/style.css"; // or use your own CSS file// ...
export default function App() {
return ;
}
`๐งฉ Props
See full list with descriptions and defaults on the Demo Page.
๐ License
MIT โ madiyar
$3
react smart app banner, smartbanner react, custom smart banner react, react app store banner, ios smart banner, react component app banner, app promotion banner`