Arihant jain

Base Button

Buttons 1

About

Here is Button component

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

Code

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

Usage.tsx

"use client";

import { useState } from "react";
import { LoaderCircleIcon } from "lucide-react";

import { Button } from "@/components/ui/button-1";

export default function Component() {
  const [isLoading, setIsLoading] = useState<boolean>(false);

  const handleClick = () => {
    setIsLoading(true);
    setTimeout(() => {
      setIsLoading(false);
    }, 1000);
  };

  return (
    <Button
      onClick={handleClick}
      disabled={isLoading}
      data-loading={isLoading || undefined}
      className="group relative">
      <span className="group-data-loading:text-transparent">Click me</span>
      {isLoading && (
        <div className="absolute inset-0 flex items-center justify-center">
          <LoaderCircleIcon className="animate-spin" size={16} aria-hidden="true" />
        </div>
      )}
    </Button>
  );
}

Dependencies

More by Arihant jain

View all
  • Footer section

    Footer section

    1.9K
  • Multistep Form

    Multistep Form

    710
  • Animated Drawer

    Animated Drawer

    694
  • Status Badge

    Status Badge

    514
  • Stacked Circular Footer

    Stacked Circular Footer

    427
  • Input Modal

    Input Modal

    330
  • Large Name Footer

    Large Name Footer

    199
  • Profile Dropdown

    Profile Dropdown

    196

More in Buttons

View all
  • Button

    Button

    1
  • Texture Button

    Texture Button

    97
  • Eclipse Button

    Eclipse Button

    39
  • App Store Button

    App Store Button

    458
  • HeroUI Button Group

    HeroUI Button Group

    2
  • Button

    Button

    4
  • Button

    Button

    65
  • Button

    Button

    68