A beautiful, modern React application featuring time-based greetings with an outstanding white and black theme system. This enhanced version transforms the classic greeting app into a premium user experience with sophisticated animations, glassmorphism design, and seamless theme switching.
- Modern Glassmorphism: Semi-transparent cards with backdrop blur effects
- Dynamic Gradients: Beautiful gradient backgrounds that change with theme
- Floating Animations: Smooth particle effects and micro-interactions
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- White & Black Themes: Elegant light and dark mode options
- Smart Toggle: Beautiful animated theme switcher
- Theme Persistence: Remembers user preference with localStorage
- Smooth Transitions: Seamless theme switching with elegant animations
- Smart Greetings: Automatically changes based on time of day
- Good Morning (12 AM - 12 PM)
- Good Afternoon (12 PM - 6 PM)
- Good Evening (6 PM - 8 PM)
- Good Night (8 PM - 12 AM)
- Live Clock: Real-time time display with smooth updates
- Dynamic Styling: Greeting colors change with time periods
- Clean Architecture: Modular component structure
- Performance Optimized: Efficient CSS animations and React hooks
- Accessibility Ready: Reduced motion support and ARIA labels
- Error-Free: TypeScript-compatible and lint-free code
- Node.js (v14.0.0 or later)
- npm (v6.0.0 or later)
-
Clone the repository
git clone <repository-url> cd react-greetings-website
-
Install dependencies
npm install
-
Start the development server
npm start
-
Open in browser Navigate to
http://localhost:3000
- Click the theme toggle button in the top-right corner
- Switch between elegant light and dark themes
- Your preference is automatically saved
- View the current time with live updates every second
- Time display includes a rotating clock icon
- Greeting text animates with time updates
- The greeting automatically updates based on the current time
- Text styling and colors change throughout the day
- Smooth animations enhance the user experience
react-greetings-website/
โโโ public/
โ โโโ index.html
โ โโโ favicon.ico
โ โโโ manifest.json
โโโ src/
โ โโโ components/
โ โ โโโ ThemeContext.js # Theme management system
โ โ โโโ ThemeToggle.js # Theme toggle component
โ โ โโโ ThemeToggle.css # Theme toggle styling
โ โโโ App.js # Main application component
โ โโโ App.css # Original styles (legacy)
โ โโโ EnhancedApp.css # Enhanced UI styling
โ โโโ index.js # Application entry point
โ โโโ index.css # Global styles
โโโ package.json
โโโ README.md
src/ThemeContext.js: React Context for theme managementsrc/ThemeToggle.js: Beautiful theme toggle componentsrc/EnhancedApp.css: Main styling with theme supportsrc/App.js: Core application logic and component structure
- Primary Background: Gradient (Purple to Blue)
- Card Background: rgba(255, 255, 255, 0.95)
- Text Color: #2d3748
- Accent Colors: #667eea, #764ba2
- Primary Background: Gradient (Dark Gray to Darker Gray)
- Card Background: rgba(0, 0, 0, 0.8)
- Text Color: #f7fafc
- Accent Colors: #f093fb, #f5576c
- Font Family: Inter, system fonts
- Heading Size: clamp(2rem, 5vw, 3.5rem)
- Body Size: clamp(1.2rem, 3vw, 1.8rem)
- Weight: 700 (headings), 500 (body)
Runs the app in development mode.
npm startOpen http://localhost:3000 to view it in your browser.
Launches the test runner in interactive watch mode.
npm testBuilds the app for production to the build folder.
npm run buildNote: this is a one-way operation. Once you eject, you can't go back!
npm run eject- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Reduced Motion: Respects
prefers-reduced-motionsetting - Keyboard Navigation: Full keyboard accessibility
- Screen Readers: Proper ARIA labels and semantic HTML
- High Contrast: Excellent color contrast ratios
- Update
ThemeContext.jsto include new theme options - Add corresponding CSS variables in
EnhancedApp.css - Update the theme toggle component
Edit the greeting logic in src/App.js:
if (currDate >= 0 && currDate < 12) {
greeting = "Good Morning";
} else if (currDate >= 12 && currDate < 18) {
greeting = "Good Afternoon";
} // ... add more conditions- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- React Team - For the amazing framework
- Create React App - For the excellent development environment
- Inter Font - For beautiful typography
- CSS Gradient - For inspiration on gradient effects
If you encounter any issues or have questions, please feel free to open an issue in the repository.
Enjoy your enhanced greetings experience! ๐