A modern Random Number Generator built with React.js to demonstrate the use of the useState Hook, event handling, and conditional rendering. The application generates a random number between 1 and 100 with a single button click and updates the user interface instantly.
This project was developed to strengthen my understanding of React fundamentals, especially state management using the useState Hook. It also focuses on creating an attractive and responsive user interface with a colorful gradient background and glassmorphism design.
- π² Generate a random number between 1 and 100
- βοΈ State management using the useState Hook
- π Dynamic UI updates
- π¬ Conditional rendering
- π±οΈ Interactive button with hover animation
- π Beautiful gradient background
- πͺ Glassmorphism card using
rgba() - π Rounded gradient button
- π± Fully responsive layout
- React.js
- JavaScript (ES6+)
- HTML5
- CSS3
- React Hooks (
useState)
src/
βββ App.js
βββ App.css
βββ index.js
βββ index.css
This project helped me understand:
- React Functional Components
- React Hooks (
useState) - Event Handling with
onClick - State Management
- Conditional Rendering
- JavaScript
Math.random() - Responsive UI Design
- Glassmorphism and Gradient Styling
-
The application starts with a placeholder message:
- "No number generated yet"
-
Clicking the Generate Random Number button creates a random number between 1 and 100.
-
React updates the state using the
useStateHook. -
The generated number is displayed instantly without refreshing the page.
Mukesh Kanna
Aspiring Full Stack Developer passionate about building responsive, interactive, and modern web applications using React.js, JavaScript, HTML, and CSS.
If you like this project, consider β starring the repository and sharing your feedback.