Button

A clickable control that triggers an action, supporting six visual variants and three sizes.

Installation

npx @obi/ui add button

Preview

Usage

import Button from '@/src/components/Button/Button';

export default function Example() {
  return (
    <div className="flex flex-wrap gap-2">
      <Button>Primary</Button>
      <Button variant="secondary">Secondary</Button>
      <Button variant="outlined">Outlined</Button>
      <Button variant="ghost">Ghost</Button>
      <Button variant="link">Link</Button>
      <Button variant="destructive">Destructive</Button>
    </div>
  );
}

Props

NameTypeDefaultDescription
variant"primary" | "secondary" | "outlined" | "ghost" | "link" | "destructive""primary"Visual style of the button.
size"sm" | "md" | "lg""md"Height and padding of the button.
disabledbooleanfalseDisables the button and suppresses all pointer and focus interaction.
classNamestring""Additional Tailwind classes merged onto the button element.