Command Palette

Search for a command to run...

Pokemon Sprite

An image element with a fallback for rendering Pokémon sprites. Built on Radix UI Avatar.

PK

Installation

Usage

PokemonSprite is built on Radix UI Avatar and inherits its image-load lifecycle: PokemonSpriteImage renders once the image loads, and PokemonSpriteFallback is shown while it loads or if it fails.

Size scale

The size prop controls the square dimensions of the sprite. Use card when placing a sprite inside a PokemonCard media slot — it is sized to fit that context precisely.

ValueSize
xs20 px
sm24 px
default32 px
md40 px
lg80 px
xl112 px
2xl144 px
card160 px

Examples

Sprite group

BCS
+9

API Reference

PokemonSprite

Root sprite container — wraps Radix UI Avatar.Root. Accepts all Avatar.Root props plus size.

PropTypeDefault
size"default"

Subcomponents

ComponentBaseDescription
PokemonSpriteImageAvatar.ImageRenders the Pokémon image. Accepts all Avatar.Image props.
PokemonSpriteFallbackAvatar.FallbackShown while the image loads or if it fails. Accepts all Avatar.Fallback props.
PokemonSpriteBadge<span>A badge positioned over the sprite (bottom-right corner). Accepts all <span> props.
PokemonSpriteGroup<div>Groups multiple sprites with overlap. Accepts all <div> props.
PokemonSpriteGroupCount<div>Displays a remaining count chip inside a group. Accepts all <div> props.