A simple and elegant Random Quote Generator built with React, Vite, and Tailwind CSS.
It fetches a random quote from the Hashnode Free API and displays it beautifully.
- Fetches random quotes with author and tags.
- Beautiful gradient background with a modern UI.
- Loading state while fetching quotes.
- Built with React (Vite) and styled using Tailwind CSS.
- React 18 (via Vite)
- Axios (for API calls)
- Tailwind CSS (for styling)
Clone this repository:
git clone https://github.com/your-username/quote-app.git
cd quote-appInstall dependencies:
npm installRun the development server:
npm run dev
API used:
https://api.freeapi.app/api/v1/public/quotes/quote/random
Example Response:
{
"statusCode": 200,
"data": {
"author": "Alan Watts",
"content": "No work or love will flourish out of guilt, fear...",
"tags": ["Future", "Life"],
"authorSlug": "alan-watts",
"length": 169,
"dateAdded": "2022-03-12",
"dateModified": "2023-04-14",
"id": 246
},
"message": "Quote fetched successfully",
"success": true
}- Start the app.
- Click "Get a Quote" button.
- Enjoy inspirational quotes!