BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shipbase/ui/button

button

shipbase-ui/button
FreeComponent

shipbase/ui publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/shipbase/ui/next/apps/www/public/r/react/button.json

Source

./src/components/ui/button.tsxraw.githubusercontent.com/shipbase/ui/next/apps/www/public/r/react/button.json
1"use client"
2
3import * as React from "react"
4
5import { createAnatomy } from "@ark-ui/react/anatomy"
6import { type HTMLArkProps, ark } from "@ark-ui/react/factory"
7import { type VariantProps, cva } from "class-variance-authority"
8
9import { cn } from "@/lib/utils"
10
11const anatomy = createAnatomy("button").parts("root")
12const parts = anatomy.build()
13
14const buttonVariants = cva(
15 "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
16 {
17 variants: {
18 variant: {
19 default:
20 "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
21 destructive:
22 "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
23 outline:
24 "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
25 secondary:
26 "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
27 ghost: "hover:bg-accent hover:text-accent-foreground",
28 link: "text-primary underline-offset-4 hover:underline",
29 },
30 size: {
31 default: "h-9 px-4 py-2",
32 sm: "h-8 rounded-md px-3 text-xs",
33 lg: "h-10 rounded-md px-8",
34 icon: "size-9",
35 },
36 },
37 defaultVariants: {
38 variant: "default",
39 size: "default",
40 },
41 }
42)
43
44export interface ButtonProps
45 extends HTMLArkProps<"button">,
46 VariantProps<typeof buttonVariants> {}
47
48const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
49 ({ className, variant, size, ...props }, ref) => {
50 return (
51 <ark.button
52 ref={ref}
53 {...parts.root.attrs}
54 className={cn(buttonVariants({ variant, size, className }))}
55 {...props}
56 />
57 )
58 }
59)
60Button.displayName = "Button"
61
62export { Button, buttonVariants }

What it pulls in

npm packages

  • @ark-ui/react
  • class-variance-authority

Files it writes

  • ./src/components/ui/button.tsx

Facts

Registry
shipbase/ui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

ui.shipbase.xyz shipbase/ui on GitHub Raw registry item This item as JSON

More from shipbase/ui

All 32 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionshipbase/uiComponentsFree2 deps
avataravatarshipbase/uiComponentsFree1 dep
badgebadgeshipbase/uiComponentsFree2 deps
cardcardshipbase/uiComponentsFree1 dep
checkboxcheckboxshipbase/uiComponentsFree2 deps
collapsiblecollapsibleshipbase/uiComponentsFree1 dep
comboboxcomboboxshipbase/uiComponentsFree2 deps
dialogdialogshipbase/uiComponentsFree2 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