A clean, nostalgic Pokédex built with React + Vite and styled with Tailwind CSS v4.
It consumes data from PokeAPI and provides a fast, ad‑free way to browse, search, and filter Pokémon—styled with a tasteful nod to the OG games.
Live behavior
- Populates automatically on load with the original 151 (Kanto).
- Updates results as you type (debounced).
- Supports name or #dex number search (e.g.,
25→ Pikachu).- Filter by Type and Region (Region maps to the corresponding PokeAPI generation).
- Progressive loading with a Load more button for large result sets.
- 🎯 Instant search (300ms debounce) across name / number
- 🧩 Filters by Type & Region (Region → Generation I–IX)
- 🖼️ Official artwork + sprites, flavor text, base stats, height/weight, abilities
- 📦 Caching (in‑memory) + request cancellation via
AbortController - 📱 Responsive layout, keyboard‑and‑screen‑reader friendly
- ⚡ Vite dev server & Tailwind v4 modern design tokens
- React (Vite)
- Tailwind CSS v4 using the
@tailwindcss/postcssplugin - PokeAPI endpoints:
GET /api/v2/pokemon?limit=151– initial listGET /api/v2/pokemon/{name or id}– details & spritesGET /api/v2/type/{type}– names by typeGET /api/v2/generation/{generation-id}– names by region (via generation)GET /api/v2/pokemon-species/{id}– flavor text, genus, generation
- Node.js 18+ and npm
Clone and install dependencies:
git clone https://github.com/nottoezz/Pok-dex pokedex
cd pokedex
npm iRun the dev server:
npm run devOpen the app at the URL printed in your terminal (usually http://localhost:5173).
pokedex/
├─ postcss.config.mjs # PostCSS with @tailwindcss/postcss
├─ index.html
├─ src/
│ ├─ App.jsx # Main Pokédex component & UI
│ ├─ index.css # Tailwind v4 import + design tokens
│ └─ main.jsx # React bootstrap (imports index.css)
└─ package.json
- On mount, the app fetches and caches the original 151 names.
- When users type or change filters, a debounced search runs:
- Build a candidate list from Type and/or Region (via Generation).
- If no filters are active, fall back to the first 151.
- Filter by the typed name (case‑insensitive). If the query is numeric and no filters are set, fetch that exact Pokémon.
- Fetch details in batches (8 at a time) to keep the UI snappy.
- All detail requests are cached; inflight requests are aborted when new searches start.
- Logical heading order and focus rings for keyboard navigation
- Sufficient color contrast in both light/dark
aria-hiddenon purely decorative SVG- Graceful “Loading…” and error states
- PokeAPI rate limits apply; batching and debouncing reduce request pressure.
- Species flavor text can include special characters—cleaning is handled in code.
- This is a fan project and is not affiliated with Nintendo, Game Freak, or The Pokémon Company.
- Data from the amazing PokeAPI community project.
- Pokémon and Pokémon character names are trademarks of Nintendo, Game Freak, and The Pokémon Company.
MIT © liam
{ "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview", "predeploy": "npm run build", "deploy": "gh-pages -d dist" } }