niceui

Button

A pill-shaped button with primary, outline and ghost variants in three sizes. Accessible focus ring, forwarded ref.

ReactTailwind CSSTypeScriptButtonsMIT · Free

Installation

01

Install with the shadcn CLI.

$ npx shadcn@latest add https://niceui.dev/r/button.json
02

Or copy the source manually into components/ui/button.tsx. No extra dependencies.

Usage

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

export default function Example() {
  return (
    <div className="flex gap-2">
      <Button>Get started</Button>
      <Button variant="outline">Learn more</Button>
      <Button variant="ghost">Cancel</Button>
    </div>
  );
}

For AI assistants

This page is also available as Markdown and as a shadcn registry item. Use Copy prompt to hand the full source to Claude, Cursor or v0.