Button

Renders a button or an element styled to resemble a button.

@radix-ui/react-slot

@lucide/react

Installation


1

Install the following dependencies:

npx shadcn@latest add https://sbthemes-storev2.vercel.app/r/button.json

Examples


Primary (Default)

Secondary

Outline

Error (Danger)

Success

Ghost

Size

Icon & With Icon

asChild

Loader


API Reference

This component is based on the <button> element and supports all of its props. And adds:

PropTypeDefault
variantprimary, secondary, outline, error, success, ghost,linkprimary
sizedefault, sm, lgdefault
asChildboolean-
loadingbooleanfalse