react-set-timer
v2.0.4
Published
A lightweight React countdown timer component with clean UI and error handling
Maintainers
Readme
React SetTimer
A lightweight React countdown timer component with modern glass-morphism design and smart features.
✨ Features
- 🎨 Beautiful glass-morphism UI with gradient background
- ⏰ Real-time countdown with HH:MM:SS format
- 📊 Smart tooltip showing time per question/task
- 🎯 Fullscreen overlay design
- 📱 Responsive mobile-friendly interface
- ⚠️ Built-in error handling (max 300 minutes)
Install
npm install react-set-timerUsage
import React from 'react';
import Timer from 'react-set-timer';
function App() {
return (
<div>
<Timer
time={0.25}
start={true}
stop={false}
questionsRemaining={5}
/>
</div>
);
}
export default App;Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| time | number | 1 | Timer duration in minutes (max 300) |
| start | boolean | false | Start the timer |
| stop | boolean | false | Stop the timer |
| questionsRemaining | number | 1 | Number of questions/tasks remaining (for tooltip) |
Styling
The timer uses a fixed fullscreen overlay with beautiful animations. Perfect for:
- Exam/quiz timers
- Pomodoro sessions
- Timed activities
- Focus sessions
License
MIT
