GameCN
Components

Ammo Counter

A high-readability ammo and reserve counter with critical state styling.

Ammo Counter

ammo-counter

HUDReadycomponent

High-readability ammo and reserve counter with critical styling.

npx shadcn@latest add @gamecn/ammo-counter
Live Preview
Rendered with the component style selected in the top-right selector.
Frame
Scale100%

Ammo

18

/ 72

Ammo

3

/ 21
Examples
Basic setup, game-state usage, and customization paths.

Basic

Install Ammo Counter and render it with the default GameCN treatment.

npx shadcn@latest add @gamecn/ammo-counter
import { AmmoCounter } from '@/components/ui/ammo-counter'

Advanced

Use Ammo Counter with richer game-state data such as variants, empty states, compact density, or critical states.

<AmmoCounter
  className="max-w-md"
/>

Customization

Swap artwork, tune tokens, and wire the installed copy to your live game state.

<AmmoCounter
  iconSrc="/game-assets/ammo-counter.png"
/>