DEV Community

Batiar Rahmamulia
Batiar Rahmamulia

Posted on

Building a Modern Pokédex with React and TailwindCSS

Hey there, fellow developers! 👋 Today, I'm excited to share my latest project - a modern Pokédex built with React, TypeScript, and TailwindCSS. This project combines nostalgia with modern web technologies to create a sleek, responsive application for Pokémon fans.

🌟 Project Overview

The Pokédex is a comprehensive database of Generation I Pokémon (the original 151), featuring a beautiful glass-morphism design, smooth animations, and detailed information about each Pokémon.

💻 Tech Stack

  • React for UI components
  • TypeScript for type safety
  • TailwindCSS for styling
  • React Router for navigation
  • Vite for build tooling
  • PokéAPI for Pokémon data

✨ Key Features

  1. Responsive Design
  • Works seamlessly across all devices
  • Grid layout adapts to screen size
  • Touch-friendly interface

    1. Beautiful UI
  • Type-based color themes

  • Glass-morphism effects

  • Smooth animations

  • High-quality official artwork

    1. Detailed Information
  • Comprehensive stats display

  • Type badges

  • Physical characteristics

  • Ability lists

    🛠️ Getting Started

    Want to run this project locally? Here's how:

git clone <your-repo-url>
cd pokedex
npm install
npm run dev
Enter fullscreen mode Exit fullscreen mode

🎨 Implementation Highlights

Glass-morphism Cards

The glass effect on cards creates a modern, ethereal look:

.pokemon-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
Enter fullscreen mode Exit fullscreen mode

Type-Based Theming

Each Pokémon card's background color is based on its primary type:

const typeColors = {
  fire: 'bg-gradient-to-br from-red-400 to-orange-500',
  water: 'bg-gradient-to-br from-blue-400 to-blue-500',
  grass: 'bg-gradient-to-br from-green-400 to-green-500',
  // ... other types
};
Enter fullscreen mode Exit fullscreen mode

Responsive Grid Layout

TailwindCSS makes responsive design a breeze:

<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
  {pokemon.map(poke => (
    <PokemonCard key={poke.id} pokemon={poke} />
  ))}
</div>
Enter fullscreen mode Exit fullscreen mode

📱 Features in Action

  1. Home Page
  • Browse all 151 Pokémon
  • Quick search functionality
  • Smooth scroll pagination

    1. Detail View
  • Animated stat bars

  • Type effectiveness

  • Move list

  • Evolution chain

    🔧 Future Improvements

    1. Add support for more generations
    2. Implement advanced filtering
    3. Add Pokémon cries/sounds
    4. Include battle statistics
    5. Add dark/light theme toggle ## 🤝 Contributing Contributions are always welcome! Feel free to:
    6. Report bugs
    7. Suggest new features
    8. Submit pull requests

📚 Resources

🔗 Links

💭 Conclusion

Building this Pokédex was a fantastic way to combine modern web development practices with everyone's favorite pocket monsters. The project demonstrates how to create engaging user interfaces while maintaining good performance and code quality.

What features would you like to see added to this Pokédex? Let me know in the comments below! 👇

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs