A fun and interactive React-based meme generator that lets you create custom memes with top and bottom text overlays.
- Custom Text Input: Add your own top and bottom text to memes
- Meme Library: Fetches a collection of popular meme templates from the Imgflip API
- Real-time Preview: See your text changes instantly on the meme image
- Responsive Design: Works on desktop and mobile devices
- Text Input: Enter your desired top and bottom text in the input fields
- Meme Selection: Click "Get a new meme image" to randomly select from hundreds of popular meme templates
- Preview: Your custom text appears overlaid on the selected meme image
- Customization: Edit the text as needed and watch the preview update in real-time
The app fetches meme templates from the Imgflip API and stores them locally for quick access. Each time you click the button, a random meme template is selected and displayed with your custom text.
- React 19: Modern React with hooks for state management
- Vite: Fast build tool and development server
- Imgflip API: Provides access to a large collection of meme templates
- CSS: Custom styling for the meme generator interface
- Node.js (version 16 or higher)
- npm or yarn package manager
-
Clone the repository:
git clone <repository-url> cd meme-generator
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173
npm run dev- Start the development servernpm run build- Build the project for productionnpm run preview- Preview the production build locallynpm run lint- Run ESLint for code quality checks
meme-generator/
├── public/
│ └── images/ # Static images (troll face, meme templates)
├── src/
│ ├── components/
│ │ ├── Header.jsx # App header with title and logo
│ │ └── main.jsx # Main meme generator interface
│ ├── App.jsx # Root component
│ ├── index.css # Global styles
│ └── index.jsx # App entry point
├── index.html # HTML template
├── package.json # Project dependencies and scripts
└── eslint.config.js # ESLint configuration
This app uses the Imgflip API to fetch meme templates. The API provides:
- A list of popular meme templates
- High-quality images ready for text overlay
- No API key required for basic usage
Feel free to submit issues and enhancement requests!
This project is for educational purposes.