micka_design

Button

Buttons 17

About

A fluid button with primary, secondary, tertiary, and ghost variants. Supports sizes, leading/trailing icons, icon-only mode, and animated loading state.

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

Code

How 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 { Button } from "@/components/ui/button";

export function ButtonLoadingDemo() {
  const [loading, setLoading] = useState(false);

  const handleClick = () => {
    setLoading(true);
    setTimeout(() => setLoading(false), 2500);
  };

  return (
    <div className="flex items-center justify-center min-h-screen bg-background">
      <div className="flex gap-3">
        <Button loading={loading} onClick={handleClick}>
          {loading ? "Saving..." : "Save changes"}
        </Button>
        <Button loading variant="secondary">Loading</Button>
        <Button loading variant="tertiary">Loading</Button>
      </div>
    </div>
  );
}

export default { ButtonLoadingDemo };

Dependencies

More by micka_design

View all
  • Switch

    Switch

    87
  • Select

    Select

    84
  • Checkbox Group

    Checkbox Group

    77
  • Table

    Table

    38
  • Accordion

    Accordion

    38
  • Segmented Tabs

    Segmented Tabs

    37
  • Slider

    Slider

    24
  • Tabs Subtle

    Tabs Subtle

    22

More in Buttons

View all
  • Button Save

    Button Save

    46
  • Button

    Button

    20
  • Eclipse Button

    Eclipse Button

    5
  • Button

    Button

    6
  • Button

    Button

    14
  • Button Group

    Button Group

    37
  • Button

    Button

    32
  • Split Button

    Split Button

    32