Cnippet

Button

Buttons 1

About

A polymorphic button built on Base UI's useRender. Ships 8 visual variants (default, secondary, outline, ghost, link, destructive, destructive-outline) and a full set of sizes including icon sizes (xs–xl). Has a built-in loading state that overlays an inline spinner and hides the label, a render prop for rendering as any element or as a child, and focus-visible / pressed styling out of the box.

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

import { ArrowRightIcon } from "lucide-react";
import { Button } from "@/components/ui/cnippet-button";

export default function ButtonWithIcon() {
  return (
    <Button>
      Get Started
      <ArrowRightIcon aria-hidden="true" />
    </Button>
  );
}

Dependencies

More by Cnippet

View all
  • Team

    Team

    1.4K
  • Davincho Hero-1

    Davincho Hero-1

    717
  • Aero Hero-3

    Aero Hero-3

    636
  • Random Letter Swap Navigation

    Random Letter Swap Navigation

    591
  • Features

    Features

    541
  • Services with Animated Hover Modal

    Services with Animated Hover Modal

    494
  • Blogs

    Blogs

    406
  • Text Reveal

    Text Reveal

    394

More in Buttons

View all
  • Texture Button

    Texture Button

    115
  • Button

    Button

    157
  • Random Letter Swap CTA Buttons

    Random Letter Swap CTA Buttons

    67
  • Icon Label Subtext Button

    Icon Label Subtext Button

    71
  • Icon Button

    Icon Button

    8
  • Button

    Button

    2
  • Hero Button

    Hero Button

    25
  • Button

    Button

    54