BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/launchui/button

Button

launchui/button
FreeComponent

A customizable button component with multiple variants and sizes.

Live preview

live · rendered by the registry
Rendered by launchui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://www.launchuicomponents.com/r/button.json

Source

components/ui/button.tsxwww.launchuicomponents.com/r/button.json
1import { Slot } from "@radix-ui/react-slot";
2import { cva, type VariantProps } from "class-variance-authority";
3import * as React from "react";
4
5import { cn } from "@/lib/utils";
6
7const buttonVariants = cva(
8 "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
9 {
10 variants: {
11 variant: {
12 default:
13 "text-primary-foreground shadow-sm dark:hover:from-primary/80 hover:from-primary/70 dark:hover:to-primary/70 hover:to-primary/90 bg-linear-to-b from-primary/60 to-primary/100 dark:from-primary/100 dark:to-primary/70 border-t-primary",
14 destructive:
15 "bg-destructive/30 text-destructive-foreground shadow-xs hover:bg-destructive/90",
16 outline:
17 "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
18 glow: "glass-4 hover:glass-5 shadow-md",
19 secondary:
20 "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
21 ghost: "hover:bg-accent hover:text-accent-foreground",
22 link: "text-foreground underline-offset-4 hover:underline",
23 },
24 size: {
25 default: "h-9 px-4 py-2",
26 xs: "h-7 rounded-md px-2",
27 sm: "h-8 rounded-md px-3 text-xs",
28 lg: "h-10 rounded-md px-5",
29 icon: "size-9",
30 },
31 },
32 defaultVariants: {
33 variant: "default",
34 size: "default",
35 },
36 },
37);
38
39function Button({
40 className,
41 variant,
42 size,
43 asChild = false,
44 ...props
45}: React.ComponentProps<"button"> &
46 VariantProps<typeof buttonVariants> & {
47 asChild?: boolean;
48 }) {
49 const Comp = asChild ? Slot : "button";
50
51 return (
52 <Comp
53 data-slot="button"
54 className={cn(buttonVariants({ variant, size, className }))}
55 {...props}
56 />
57 );
58}
59
60export { Button, buttonVariants };

What it pulls in

npm packages

  • @radix-ui/react-slot
  • class-variance-authority

Files it writes

  • components/ui/button.tsx

Facts

Registry
launchui
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
today

Go to the source

Docs on launchui www.launchuicomponents.com launch-ui/launchui on GitHub Raw registry item This item as JSON

More from launchui

All 24 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
BadgebadgelaunchuiComponentsFree2 deps
CardcardlaunchuiComponentsFree1 dep
GlowglowlaunchuiComponentsFree1 dep
Launch UI BaselaunchuilaunchuiComponentsFreeno deps · 10 files
MockupmockuplaunchuiComponentsFree1 dep
Pro DependenciesprolaunchuiComponentsFree14 deps
ScreenshotscreenshotlaunchuiComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex