This component no longer exists. It was in ondo-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-09 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
button-group
ondo-ui/button-groupRemovedComponent
A container that groups related buttons together with consistent styling.
Install it
npx shadcn@latest add https://ui.ondo.dou.so/r/button-group.jsonSource
1import { mergeProps } from "@base-ui/react/merge-props"2import { useRender } from "@base-ui/react/use-render"3import { cva, type VariantProps } from "class-variance-authority"45import { cn } from "@/lib/utils"6import { Separator } from "@/components/ui/separator"78const 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-md [&>[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-md! [&>[data-slot][data-size=xl]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot][data-size='2xl']:not(:has(~[data-slot]))]:rounded-r-xl! [&>[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-md! [&>[data-slot][data-size=xl]:not(:has(~[data-slot]))]:rounded-b-lg! [&>[data-slot][data-size='2xl']:not(:has(~[data-slot]))]:rounded-b-xl! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0",17 },18 },19 defaultVariants: {20 orientation: "horizontal",21 },22 }23)2425function ButtonGroup({26 className,27 orientation,28 ...props29}: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>) {30 return (31 <div32 role="group"33 data-slot="button-group"34 data-orientation={orientation}35 className={cn(buttonGroupVariants({ orientation }), className)}36 {...props}37 />38 )39}4041function ButtonGroupText({42 className,43 render,44 ...props45}: useRender.ComponentProps<"div">) {46 return useRender({47 defaultTagName: "div",48 props: mergeProps<"div">(49 {50 className: cn(51 "flex items-center gap-2 rounded-md border bg-muted px-2.5 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",52 className53 ),54 },55 props56 ),57 render,58 state: {59 slot: "button-group-text",60 },61 })62}6364function ButtonGroupSeparator({65 className,66 orientation = "vertical",67 ...props68}: React.ComponentProps<typeof Separator>) {69 return (70 <Separator71 data-slot="button-group-separator"72 orientation={orientation}73 className={cn(74// … truncated
What it pulls in
npm packages
Other registry items
