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

    11
  • Stamp Seal

    Stamp Seal

    10
  • Network Graph

    Network Graph

    9
  • Empty State Card

    Empty State Card

    5
  • Board Checklist

    Board Checklist

    5
  • Checkbox

    Checkbox

    4
  • Payment Methods

    Payment Methods

    4
  • Milestone Chart

    Milestone Chart

    4

More in Buttons

View all
  • Texture Button

    Texture Button

    98
  • Button

    Button

    1
  • Button

    Button

    68
  • Eclipse Button

    Eclipse Button

    3
  • Button

    Button

    65
  • Base Button

    Base Button

    4
  • HeroUI Button Group

    HeroUI Button Group

    2
  • App Store Button

    App Store Button

    460