Character Selector is a gacha game style deploy scene: three equip slots sit on stage, and clicking one opens a blurred roster overlay where star tier cards can be selected, swapped between slots, or deselected. The whole flow is choreographed with GSAP timelines, from the backdrop blur to the staggered roster grid, and hover and click sounds play throughout. Feed it your own roster through the characters prop. Built with React and Tailwind CSS for game landing pages and interactive showcases.
Installation
Install dependencies.
Copy and paste the following code into your project.
Unlock the full library
Get all pro blocks, components & illustrations, and production-ready Next.js + Tailwind templates.
Update the import paths to match your project setup.
Usage
import CharacterSelector from "@/components/pro/blocks/character-selector";<CharacterSelector characters={characters} slots={3} />Data shape
type Character = {
id: string;
name: string;
image: string; // full art shown in the equip slots
icon: string; // portrait shown in the roster grid
star: 4 | 5; // tier, drives the level-box border + glow
level: number;
};Behavior
- Clicking a slot opens the roster overlay with a GSAP timeline: gradient fade-in, backdrop blur, navbar slide-down, staggered roster boxes, footer button fade-in.
- Picking an empty slot sets the footer to Deploy; picking a character already in another slot swaps the two; picking the character already in the active slot unselects it.
- Hover and click sounds play on slots, roster boxes, and the deploy button.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
characters | Character[] | required | The roster to pick from. |
slots | number | 3 | Number of equip slots rendered. |
title | string | "Select Resonator" | Title of the roster overlay navbar. |
onDeploy | (selected: (Character | null)[]) => void | — | Fired when the deploy button is used. |
Related blocks
- Card Scanner
An infinite card stream that flows through a central light beam — cards crossing it are clipped away and revealed as glitching binary digits, with Three.js ambient particles and a scanner burst that intensifies during a scan. The beam and particles glow green.
- Feature Section 01
A three-card feature section with animated assets — a typewriter prompt, a browser design mock with a draw-in frame, and an infrastructure sidebar with a looping highlight.
- Feature Section 02
A security feature section arranging the auth mockups — security dial, fraud feed, MFA code, session list, and bot radar — in an asymmetric grid.
- Feature Section 03
A developer-experience feature section with code diff, pipeline run, merge flow, and CLI mockups woven into a bento of narrative cards.
