Overview
ThePokemonDetailView component displays comprehensive Pokemon information including varieties, stats, evolution chains, and abilities. It manages state for variety selection and shiny form toggling.
Import
Props
Complete Pokemon detail data including varieties, stats, evolution, and assets
Usage Example
State Management
The component manages two pieces of local state:Shiny Toggle
Variety Selection
Features
Dynamic Type-Based Theming
The component calculates the theme based on the current variety’s types:Variety Support
Automatically detects and displays the default variety, with support for:- Regional forms (Alolan, Galarian, Hisuian, Paldean)
- Mega evolutions
- Gigantamax forms
- Other special varieties
Component Composition
The view is composed of three main sections:- DetailHero - Header with sprite, name, types, and variety controls
- DetailBento - Grid layout with evolution, abilities, and physical data
- DetailStats - Radar chart displaying base stats
Component Structure
Type Definitions
PokeVariety
PokeStat
PokeType
Child Components
DetailHero
Displays the Pokemon’s primary information:- Large sprite/artwork (with shiny toggle)
- Name and Pokedex number
- Type badges
- Variety selector dropdown
- Height, weight, and genus
- Flavor text description
DetailBento
Bento-box style grid showing:- Evolution chain
- Abilities (with hidden ability indicator)
- Physical characteristics
- Additional metadata
DetailStats
Radar chart visualization of base stats:- HP, Attack, Defense
- Special Attack, Special Defense
- Speed
hue from the current type theme.
Variety Fallback Logic
If a variety has no types defined, the component falls back to the base Pokemon’s types:Related Components
- EvolutionChain - Evolution chain display
- DetailHero - Hero section
- DetailBento - Info grid
- DetailStats - Stats chart
Source Location
/src/components/pokemon/PokemonDetailView.tsx:1-43