A beautiful React application that fetches and displays random user profiles from the FreeAPI service. Browse through paginated results and view detailed information about users from around the world.
- 🌍 Fetch random users from the FreeAPI service
- 📱 Responsive grid layout displaying users in 5 columns
- 🎴 Beautiful card-based UI with hover animations
- 📄 Pagination support (Previous/Next Page)
- 🎨 Modern gradient background with smooth transitions
- 📊 Display user information including:
- Profile picture
- Full name with title
- Email and phone numbers
- Location (city, state, country)
- Age and nationality
- React - Frontend framework
- Vite - Build tool and dev server
- CSS3 - Styling with gradients, flexbox, and grid
- FreeAPI - Random user data source
- Clone the repository or navigate to the project directory
- Install dependencies:
npm installStart the development server:
npm run devThe application will open in your browser at http://localhost:5173 (or another port if 5173 is in use).
npm run buildThis creates an optimized build in the dist folder.
src/
├── App.jsx # Main application component with pagination logic
├── App.css # Global styles and grid layout
├── components/
│ ├── User.jsx # User card component
│ └── User.css # User card styling
├── index.css # Root styles
└── main.jsx # Application entry point
- App Component - Manages state for users, page number, and pagination
- API Integration - Fetches users from
https://api.freeapi.app/api/v1/public/randomusers - User Component - Displays individual user information in a card format
- Pagination - Navigate between pages with Previous/Next buttons
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build locally