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 ButtonSliding() {
return (
<Button className="group/sliding relative overflow-hidden rounded-full px-6">
<span className="inline-flex items-center transition-transform duration-300 group-hover/sliding:-translate-x-2">
Get Started
</span>
<ArrowRightIcon
aria-hidden="true"
className="absolute right-2.5 translate-x-8 opacity-0 transition-all duration-300 group-hover/sliding:translate-x-0 group-hover/sliding:opacity-100"
/>
</Button>
);
}
















