BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/Neobrutalism Components/button

Button

neobrutalism-components/button
FreeComponent

Neobrutalism Components publishes no description for this item.

Live preview

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

Install it

npx shadcn@latest add https://www.neobrutalism.dev/r/button.json

Source

src/components/ui/button.tsxwww.neobrutalism.dev/r/button.json
1import { Slot } from "@radix-ui/react-slot"
2import { cva, type VariantProps } from "class-variance-authority"
3
4import * as React from "react"
5
6import { cn } from "@/lib/utils"
7
8const buttonVariants = cva(
9 "inline-flex items-center justify-center whitespace-nowrap rounded-base text-sm font-base ring-offset-white transition-all gap-2 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-black focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
10 {
11 variants: {
12 variant: {
13 default:
14 "text-main-foreground bg-main border-2 border-border shadow-shadow hover:translate-x-boxShadowX hover:translate-y-boxShadowY hover:shadow-none",
15 noShadow: "text-main-foreground bg-main border-2 border-border",
16 neutral:
17 "bg-secondary-background text-foreground border-2 border-border shadow-shadow hover:translate-x-boxShadowX hover:translate-y-boxShadowY hover:shadow-none",
18 reverse:
19 "text-main-foreground bg-main border-2 border-border hover:translate-x-reverseBoxShadowX hover:translate-y-reverseBoxShadowY hover:shadow-shadow",
20 },
21 size: {
22 default: "h-10 px-4 py-2",
23 sm: "h-9 px-3",
24 lg: "h-11 px-8",
25 icon: "size-10",
26 },
27 },
28 defaultVariants: {
29 variant: "default",
30 size: "default",
31 },
32 },
33)
34
35function Button({
36 className,
37 variant,
38 size,
39 asChild = false,
40 ...props
41}: React.ComponentProps<"button"> &
42 VariantProps<typeof buttonVariants> & {
43 asChild?: boolean
44 }) {
45 const Comp = asChild ? Slot : "button"
46
47 return (
48 <Comp
49 data-slot="button"
50 className={cn(buttonVariants({ variant, size, className }))}
51 {...props}
52 />
53 )
54}
55
56export { Button, buttonVariants }

What it pulls in

npm packages

  • @radix-ui/react-slot

Files it writes

  • src/components/ui/button.tsx

Facts

Registry
Neobrutalism Components
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-01
Last confirmed
yesterday

Go to the source

Docs on Neobrutalism Components www.neobrutalism.dev ekmas/neobrutalism-components on GitHub Raw registry item This item as JSON

More from Neobrutalism Components

All 92 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionNeobrutalism ComponentsComponentsFree1 dep
AlertalertNeobrutalism ComponentsComponentsFreeno deps
Alert dialogalert-dialogNeobrutalism ComponentsComponentsFree1 dep
AvataravatarNeobrutalism ComponentsComponentsFree1 dep
BadgebadgeNeobrutalism ComponentsComponentsFreeno deps
BreadcrumbbreadcrumbNeobrutalism ComponentsComponentsFree1 dep
CalendarcalendarNeobrutalism ComponentsComponentsFree2 deps
CardcardNeobrutalism ComponentsComponentsFreeno deps
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