# Button
> A button with gradient variants built on Base UI
URL: https://prototyper-ui.com/docs/components/button
Base UI reference: https://base-ui.com/react/components/button
```tsx
import { Button } from "@/components/ui/button";
export default function ButtonDemo() {
return ;
}
```
## Installation
```bash
pnpm dlx shadcn@latest add https://prototyper-ui.com/r/button.json
```
This will add the following files to your project:
- `components/ui/button.tsx`
## Usage
```tsx
import { Button } from "@/components/ui/button";
;
```
## Examples
### Destructive
```tsx
import { Button } from "@/components/ui/button";
export default function ButtonDestructive() {
return ;
}
```
### Outline
```tsx
import { Button } from "@/components/ui/button";
export default function ButtonOutline() {
return ;
}
```
### Secondary
```tsx
import { Button } from "@/components/ui/button";
export default function ButtonSecondary() {
return ;
}
```
### Ghost
```tsx
import { Button } from "@/components/ui/button";
export default function ButtonGhost() {
return ;
}
```
### Primary Soft
```tsx
import { Button } from "@/components/ui/button";
export default function ButtonPrimarySoft() {
return ;
}
```
### Destructive Soft
```tsx
import { Button } from "@/components/ui/button";
export default function ButtonDestructiveSoft() {
return ;
}
```
### Success
```tsx
import { Button } from "@/components/ui/button";
export default function ButtonSuccess() {
return ;
}
```
### Warning
```tsx
import { Button } from "@/components/ui/button";
export default function ButtonWarning() {
return ;
}
```
### Link
```tsx
import { buttonVariants } from "@/components/ui/button";
export default function ButtonLink() {
return Link;
}
```
### Icon
```tsx
import { ChevronRight } from "lucide-react";
import { Button } from "@/components/ui/button";
export default function ButtonIcon() {
return (
);
}
```
### With Icon
```tsx
import { Mail } from "lucide-react";
import { Button } from "@/components/ui/button";
export default function ButtonWithIcon() {
return (
);
}
```
### Loading
```tsx
import { Loader2 } from "lucide-react";
import { Button } from "@/components/ui/button";
export default function ButtonLoading() {
return (
);
}
```
### Press
```tsx
import { Button } from "@/components/ui/button";
export default function ButtonPress() {
return ;
}
```
## Styling
### Data Slots
Use `data-slot` attributes to target the button in CSS:
| Slot name | Element |
| --------- | ------------------- |
| `button` | The `