Button

The Button is the current baseline x00.ai component. It is source-owned and implemented in `components/ui/button.tsx`.

Import

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

Basic usage

<Button>Save</Button>

Variants

<Button variant="default">Default</Button>
<Button variant="outline">Outline</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="destructive">Destructive</Button>
<Button variant="link">Link</Button>

Sizes

<Button size="xs">XS</Button>
<Button size="sm">SM</Button>
<Button size="default">Default</Button>
<Button size="lg">LG</Button>

asChild

<Button asChild variant="outline">
  <Link href="/components">Back to Components</Link>
</Button>
Back to Components

Stability

Status: adopted baseline component.