A lightweight React package for real-time internet connectivity notifications.
npm install react-internet-notifier
# or
yarn add react-internet-notifier
import React from 'react';
import { ReactInternetNotifier } from "react-internet-notifier";
function App() {
return (
<div>
<ReactInternetNotifier />
{/* Your app components */}
</div>
);
}
- 🌐 Real-time internet connection monitoring
- 🔔 Non-intrusive pop-up notifications
- 🚀 Easy one-line integration
- 🌍 Cross-browser compatibility
Prop | Type | Default | Description |
---|---|---|---|
duration | number | 10000 | Duration (in milliseconds) for which the notification is displayed. It's an optional prop. |
position | "top" | "bottom" | "top-center" | "bottom-center" | "bottom" | Position of the notification on the screen. It's an optional prop. |
<ReactInternetNotifier duration={3000} position="top-right" />
- Fork the repository
- Create feature branch (git checkout -b feature/amazing-feature)
- Commit changes (git commit -m 'Add amazing feature')
- Push to branch (git push origin feature/amazing-feature)
- Open Pull Request