Sean Hello

Base Button

Buttons 5

About

Renders a clickable button or an element styled as a button

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 { useEffect, useState } from 'react';
import { Button } from '@/components/ui/base-button';
import { LoaderCircleIcon } from 'lucide-react';

export default function Component() {
  const [isDisabled, setIsDisabled] = useState(false);

  useEffect(() => {
    // Automatically toggle button state every 4 seconds
    const interval = setInterval(() => {
      setIsDisabled((prev) => !prev);
    }, 1000);

    // Cleanup interval on component unmount
    return () => clearInterval(interval);
  }, []);

  return (
    <div className="flex items-center gap-4">
      <Button variant="primary" disabled={isDisabled}>
        {isDisabled ? <LoaderCircleIcon className="animate-spin size-4" /> : null}
        {isDisabled ? 'Submitting...' : 'Submit'}
      </Button>
    </div>
  );
}

Dependencies

More by Sean Hello

View all
  • 3D Testimonails

    3D Testimonails

    3.3K
  • Line Charts 9

    Line Charts 9

    632
  • Alert

    Alert

    492
  • Area Charts 1

    Area Charts 1

    384
  • Line Charts 6

    Line Charts 6

    382
  • Scroll Area

    Scroll Area

    376
  • Area Charts 2

    Area Charts 2

    316
  • Navigation Menu

    Navigation Menu

    305

More in Buttons

View all
  • Button

    Button

    5
  • App Store Button

    App Store Button

    453
  • Eclipse Button

    Eclipse Button

    39
  • Button

    Button

    47
  • Texture Button

    Texture Button

    92
  • Button

    Button

    4
  • Split Button

    Split Button

    14
  • Button

    Button

    32