Button Group
boldkit/button-groupFreeComponent
Visually joins a row or column of buttons into one bordered unit
Live preview
live · rendered by the registry
Rendered by boldkit on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://boldkit.dev/r/button-group.jsonSource
1import * as React from 'react'2import { cn } from '@/lib/utils'34export interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {5 orientation?: 'horizontal' | 'vertical'6}78/**9 * Visually joins a row (or column) of Buttons into a single bordered unit:10 * shared borders collapse, individual shadows/press animations are neutralized,11 * and the group carries one hard neubrutalism shadow.12 */13const ButtonGroup = React.forwardRef<HTMLDivElement, ButtonGroupProps>(14 ({ className, orientation = 'horizontal', ...props }, ref) => (15 <div16 ref={ref}17 role="group"18 className={cn(19 'inline-flex shadow-[4px_4px_0px_hsl(var(--shadow-color))]',20 // neutralize each child's own shadow + press-translate so the group reads as one block21 '[&>*]:shadow-none [&>*]:hover:translate-x-0 [&>*]:hover:translate-y-0 [&>*]:active:translate-x-0 [&>*]:active:translate-y-0',22 orientation === 'horizontal'23 ? '[&>*:not(:first-child)]:ml-[-3px]'24 : 'flex-col [&>*:not(:first-child)]:mt-[-3px]',25 className26 )}27 {...props}28 />29 )30)31ButtonGroup.displayName = 'ButtonGroup'3233export { ButtonGroup }
What it pulls in
Other registry items
Files it writes
More from boldkit
All 94 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | boldkit | Components | Free | 2 deps | |
| Alertalert | boldkit | Components | Free | 2 deps | |
| Alert Dialogalert-dialog | boldkit | Components | Free | 1 dep | |
| ASCII Shapesascii-shapes | boldkit | Components | Free | no deps | |
| Aspect Ratioaspect-ratio | boldkit | Components | Free | 1 dep | |
| Avataravatar | boldkit | Components | Free | 1 dep | |
| Badgebadge | boldkit | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | boldkit | Components | Free | 2 deps |
