react-internet-notifier
v1.0.0
Published
A lightweight React package for real-time internet connectivity notifications.
Readme
ReactInternetNotifier
A lightweight React package for real-time internet connectivity notifications.
Installation
npm install react-internet-notifier
# or
yarn add react-internet-notifierQuick Start
import React from 'react';
import { ReactInternetNotifier } from "react-internet-notifier";
function App() {
return (
<div>
<ReactInternetNotifier />
{/* Your app components */}
</div>
);
}Features
- 🌐 Real-time internet connection monitoring
- 🔔 Non-intrusive pop-up notifications
- 🚀 Easy one-line integration
- 🌍 Cross-browser compatibility
Props
| 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. |
Example with Props
<ReactInternetNotifier duration={3000} position="top-right" />Contributing
- 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
