Button

Reusable button component with multiple variants and sizes.

Installation

npx scrollx-ui@latest add button

Usage

import { Button } from "@/components/ui/button";
<Button>Default</Button>
<Button variant="link">Link</Button>
<Button variant="success">Success</Button>
<Button variant="gradient" size="lg">
  Get Started
</Button>

API Reference

Button

Button is the main component used to render a customizable button.

Props

PropertyTypeDefaultDescription
variant"default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "success" | "warning" | "info" | "dark" | "light" | "gradient" | "glass""default"
Controls the visual style of the button.
size"sm" | "default" | "lg" | "icon""default"
Adjusts the button size.
asChildbooleanfalse
Renders the button as its child using Slot.
classNamestring
Additional custom class names.
...propsHTMLButtonElement attributes
Inherits all standard button attributes and events.

Built withby Ahdeetai.