BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/edgecom/button-group

Button Group

edgecom/button-group
FreeComponent

The Edgecom Button Group component.

Live preview

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

Install it

npx shadcn@latest add https://design.edgecom.ai/r/button-group.json

Source

src/components/ui/button-group.tsxdesign.edgecom.ai/r/button-group.json
1import { mergeProps } from "@base-ui/react/merge-props"
2import { useRender } from "@base-ui/react/use-render"
3import { cva, type VariantProps } from "class-variance-authority"
4
5import { cn } from "@/lib/utils"
6import { Separator } from "@/components/ui/separator"
7
8const buttonGroupVariants = cva(
9 "flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
10 {
11 variants: {
12 orientation: {
13 horizontal:
14 "*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",
15 vertical:
16 "flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0",
17 },
18 },
19 defaultVariants: {
20 orientation: "horizontal",
21 },
22 }
23)
24
25function ButtonGroup({
26 className,
27 orientation,
28 ...props
29}: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>) {
30 return (
31 <div
32 role="group"
33 data-slot="button-group"
34 data-orientation={orientation}
35 className={cn(buttonGroupVariants({ orientation }), className)}
36 {...props}
37 />
38 )
39}
40
41function ButtonGroupText({
42 className,
43 render,
44 ...props
45}: useRender.ComponentProps<"div">) {
46 return useRender({
47 defaultTagName: "div",
48 props: mergeProps<"div">(
49 {
50 className: cn(
51 "flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
52 className
53 ),
54 },
55 props
56 ),
57 render,
58 state: {
59 slot: "button-group-text",
60 },
61 })
62}
63
64function ButtonGroupSeparator({
65 className,
66 orientation = "vertical",
67 ...props
68}: React.ComponentProps<typeof Separator>) {
69 return (
70 <Separator
71 data-slot="button-group-separator"
72 orientation={orientation}
73 className={cn(
74 "relative self-stretch bg-input data-[orientation=horizontal]:mx-px data-[orientation=horizontal]:w-auto data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto",
75 className
76 )}
77 {...props}
78 />
79 )
80}
81
82export {
83 ButtonGroup,
84 ButtonGroupSeparator,
85// … truncated

What it pulls in

npm packages

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

Other registry items

  • edgecom-ai/design-system/theme
  • edgecom-ai/design-system/separator

Files it writes

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

Facts

Registry
edgecom
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-22
Last confirmed
today

Go to the source

Docs on edgecom design.edgecom.ai edgecom-ai/design-system on GitHub Raw registry item This item as JSON

More from edgecom

All 66 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionedgecomComponentsFree2 deps
AlertalertedgecomComponentsFree1 dep
Alert Dialogalert-dialogedgecomComponentsFree1 dep
AvataravataredgecomComponentsFree1 dep
BadgebadgeedgecomComponentsFree2 deps
BannerbanneredgecomComponentsFree1 dep
BreadcrumbbreadcrumbedgecomComponentsFree2 deps
ButtonbuttonedgecomComponentsFree2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored on what can be checked

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex