Button

Reusable button component with multiple variants and sizes.

Loading...

Installation

npx shadcn@latest add @scrollxui/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-solid" | "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.