This component no longer exists. It was in neobrutal-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-06 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.
Radio group
neobrutal-ui/radio-groupRemovedComponent
neobrutal-ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by neobrutal-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://neobrutal-ui.andongmin.com/r/radio-group.jsonSource
1"use client";23import { Radio as RadioPrimitive } from "@base-ui/react/radio";4import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";5import { DirectionProvider } from "@base-ui/react/direction-provider";6import { mergeProps } from "@base-ui/react/merge-props";7import * as React from "react";89import { cn } from "@/lib/utils";1011type RadioGroupProps = Omit<12 RadioGroupPrimitive.Props<string>,13 "dir" | "onValueChange" | "value"14> & {15 asChild?: boolean;16 children?: React.ReactNode;17 dir?: "ltr" | "rtl";18 loop?: boolean;19 onValueChange?: (value: string, eventDetails: RadioGroupPrimitive.ChangeEventDetails) => void;20 orientation?: "horizontal" | "vertical";21 value?: string | null;22};2324type RenderProps = React.HTMLAttributes<HTMLElement> & { ref?: React.Ref<HTMLElement> };2526function mergeRefs(...refs: (React.Ref<HTMLElement> | undefined)[]) {27 return (element: HTMLElement | null) => {28 refs.forEach((ref) => {29 if (typeof ref === "function") {30 ref(element);31 } else if (ref) {32 ref.current = element;33 }34 });35 };36}3738function preserveRadixEventCancellation(39 child: React.ReactElement<{ [key: string]: unknown; children?: React.ReactNode }>,40) {41 const eventProps: Record<string, unknown> = {};4243 for (const [name, handler] of Object.entries(child.props)) {44 if (/^on[A-Z]/.test(name) && typeof handler === "function") {45 eventProps[name] = (...args: unknown[]) => {46 (handler as (...handlerArgs: unknown[]) => void)(...args);47 const event = args[0] as48 | { defaultPrevented?: boolean; preventBaseUIHandler?: () => void }49 | undefined;50 if (event?.defaultPrevented) event.preventBaseUIHandler?.();51 };52 }53 }5455 return React.cloneElement(child, eventProps);56}5758function renderWithAliases<State>(59 render:60 | React.ReactElement61 | ((props: RenderProps, state: State) => React.ReactElement)62 | undefined,63 fallback: React.ReactElement,64 getAliases: (state: State) => Record<string, string | undefined>,65) {66 return (elementProps: RenderProps, state: State) => {67 const aliasedProps = mergeProps(68 elementProps as React.ComponentPropsWithRef<"button">,69 getAliases(state) as React.ComponentPropsWithRef<"button">,70 ) as RenderProps;7172 if (typeof render === "function") {73 return render(aliasedProps, state);74 }7576 const element = (render ?? fallback) as React.ReactElement<RenderProps>;77 const mergedProps = mergeProps(78// … truncated
What it pulls in
npm packages
