Syed Hasnain

Tool Approval

Component

About

Approval card that asks the user to allow or deny an AI agent tool call, showing the command and its scope.

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

Code

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

Usage.tsx

import ToolApproval from '@/components/ui/tool-approval'

export default function Demo() {
  return (
    <div className="flex min-h-[320px] w-full items-center justify-center p-6">
      <ToolApproval
        className="w-full max-w-lg"
        command="pnpm build"
        description="Run the production build to validate the newly generated component routes."
        scope="This command only"
        tool="Terminal"
      />
    </div>
  )
}

Dependencies

More by Syed Hasnain

View all
  • Color Picker

    Color Picker

    92
  • Cost Meter

    Cost Meter

    31
  • Message Scroller

    Message Scroller

    26
  • Quota Banner

    Quota Banner

    21
  • Background Inbox

    Background Inbox

    20
  • Commit

    Commit

    19
  • Image Generation Loader

    Image Generation Loader

    18
  • Attachments

    Attachments

    17

Explore more

Part of Pasta UI — browse the full library on 21st.dev.