Components/Button

Button

Displays a button or a component that looks like a button.


Installation

npx ajaxui add button

Usage

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

export default function App() {
  return <Button>Click me</Button>
}

Variants

Sizes

Props

PropTypeDefaultDescription
variant"solid" | "outline" | "ghost" | "link" | "secondary" | "danger" | "danger-outline""solid"The visual style of the button.
size"xs" | "sm" | "md" | "lg" | "xl" | "icon""md"Controls the padding and font size.
asChildbooleanfalseMerges props onto the immediate child element.
disabledbooleanfalsePrevents interaction and applies visual feedback.