← スキル一覧に戻る

gaming-ui-state-management
by TheOrcDev
gaming-ui-state-managementは、コンテンツ作成と管理を支援するスキルです。高品質なコンテンツ生成と最適化により、SEO対応と利用者満足度の向上を実現します。
⭐ 1,530🍴 94📅 2026年1月22日
ユースケース
📝
ドキュメント生成
コードからドキュメントを自動生成。
✍️
コンテンツ作成支援
ブログ記事やマーケティングコンテンツの作成を支援。
🎨
UIコンポーネント生成
デザインからUIコンポーネントを生成。
SKILL.md
name: gaming-ui-state-management description: Patterns for game-like interfaces - health bars, XP bars, mana bars. Apply when building RPG/retro gaming UI components with state-driven visuals.
Gaming UI State Management
Create game-like interfaces with state-driven visuals for health, XP, mana, and other game metrics.
Progress Bar Pattern
Build on the Progress component with game-specific variants:
import { Progress } from "@/components/ui/8bit/progress";
function HealthBar({ value = 100, ...props }: BitProgressProps) {
return (
<Progress
{...props}
value={value}
variant="retro"
progressBg="bg-red-500"
/>
);
}
function ManaBar({ value = 100, ...props }: BitProgressProps) {
return (
<Progress
{...props}
value={value}
variant="retro"
progressBg="bg-blue-500"
/>
);
}
function XpBar({ value = 0, ...props }: BitProgressProps) {
return (
<Progress
{...props}
value={value}
variant="retro"
progressBg="bg-yellow-500"
/>
);
}
Level Up Notification
Show animated messages when thresholds are reached:
function XpBar({
value,
levelUpMessage = "LEVEL UP!",
...props
}: XpBarProps) {
const isLevelUp = value === 100;
return (
<div className="relative">
<Progress
{...props}
value={value}
progressBg="bg-yellow-500"
className={cn(isLevelUp && "animate-pulse")}
/>
{isLevelUp && (
<div
className={cn(
"retro",
"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
"text-[0.625rem] text-black",
"pointer-events-none whitespace-nowrap z-10",
"drop-shadow-[1px_1px_0_#fff] [text-shadow:1px_1px_0_#fff,-1px_-1px_0_#fff,1px_-1px_0_#fff,-1px_1px_0_#fff]",
"animate-[blink_0.5s_step-end_infinite]"
)}
>
{levelUpMessage}
</div>
)}
</div>
);
}
Conditional Animations
Use conditional classes for game state feedback:
<div
className={cn(
"transition-colors duration-300",
health <= 25 ? "animate-pulse bg-red-500/20" : "bg-green-500",
health > 25 && health <= 50 && "bg-yellow-500/20"
)}
/>
Enemy Health Display
Compact display for combat scenarios:
function EnemyHealth({ health, maxHealth }: EnemyHealthProps) {
const percentage = (health / maxHealth) * 100;
return (
<div className="retro text-xs">
<div className="flex justify-between mb-1">
<span>ENEMY</span>
<span>{health}/{maxHealth}</span>
</div>
<HealthBar value={percentage} className="h-2" />
</div>
);
}
Key Principles
- Base component - Extend Progress, don't reimplement
- Color coding - Red (health), Blue (mana), Yellow (XP), Green (stamina)
- Retro text - Use
.retroclass for pixel font numbers - State animations - Use
animate-pulse,animate-blinkfor feedback - Text shadows - White text-shadow for legibility on colored backgrounds
- Compact sizing - Smaller text (text-xs, text-[0.625rem]) for game UIs
Reference Components
components/ui/8bit/health-bar.tsx- Health bar implementationcomponents/ui/8bit/xp-bar.tsx- XP bar with level up notificationcomponents/ui/8bit/mana-bar.tsx- Mana bar implementation
スコア
総合スコア
95/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
✓説明文
100文字以上の説明がある
+10
✓人気
GitHub Stars 1000以上
+15
✓最近の活動
1ヶ月以内に更新
+10
✓フォーク
10回以上フォークされている
+5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
レビュー
💬
レビュー機能は近日公開予定です
