Button

A button or a component that looks like a button.

Installation

pnpm dlx cnippet@latest add button

Usage

import { Button } from "@/components/ui/button";
<Button>Button</Button>

You can use the render prop to make another component look like a button. Here's an example of a link that looks like a button.

import Link from "next/link";
 
import { Button } from "@/components/ui/button";
 
export function LinkAsButton() {
  return <Button render={<Link href="/login" />}>Login</Button>;
}

Variants

Sizes