Button

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

Preview

with variants

Installation

Use the CLI to add this component to your project.

npx shadcn@latest add https://ui.nyxhora.com/r/button.json

Usage

tsx
5 lines
1
2
3
4
5
import { Button } from "@/components/ui/button"

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

Variants

Default

Secondary

Destructive

Outline

Ghost

Link

Sizes

Props

PropTypeDefaultDescription
variantstringdefaultThe visual style of the button
sizestringdefaultThe size of the button
asChildbooleanfalseRender as child element
disabledbooleanfalseDisable the button