f0rextasy

Action Buttons

Buttons

About

A diamond-arranged cluster of large circular touch buttons for primary on-screen game actions (attack, block, interact, jump), reporting presses via an onAction callback.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Action Buttons to your project and fits it to your theme.

Code

How Action Buttons is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import * as React from "react";
import { ActionButtons } from "@/components/ui/action-buttons";

export default function ActionButtonsDemo() {
  const [lastAction, setLastAction] = React.useState<string | null>(null);

  return (
    <div className="flex min-h-[300px] w-full flex-col items-center justify-center gap-6 bg-background p-10 text-foreground">
      <ActionButtons onAction={(id) => setLastAction(id)} />
      <p className="text-sm text-muted-foreground">
        Last action:{" "}
        <span className="font-mono font-semibold text-foreground">
          {lastAction ?? "none"}
        </span>
      </p>
    </div>
  );
}

More by f0rextasy

View all
  • Newsletter Signup Card

    Newsletter Signup Card

    22
  • Network Graph

    Network Graph

    20
  • Stamp Seal

    Stamp Seal

    19
  • Board Checklist

    Board Checklist

    17
  • Navbar

    Navbar

    17
  • Running Order Timeline

    Running Order Timeline

    14
  • Milestone Chart

    Milestone Chart

    13
  • Hero

    Hero

    9

More in Buttons

View all
  • Button

    Button

    169
  • Texture Button

    Texture Button

    122
  • HeroUI Button Group

    HeroUI Button Group

    1
  • Button

    Button

    88
  • Native Button

    Native Button

    7
  • Button

    Button

    74
  • Button Group

    Button Group

    1
  • Button Group

    Button Group

    5