Rendyn

Component library

189 components

Interaction

Radio Group

Radio Group coordinates item values and an optional controlled selection.

Interactive exampleReact Tailwind CSS

Practical React example

Choose one billing interval from a small group of mutually exclusive options.

Before you copy and paste

Keep the example in the React rendering environment required by the imported component. Copy components/motion/radio.tsx and its returned support files from the Code tab; preserve the project-relative paths.

Listed package dependencies: clsx, motion, react, tailwind-merge.

Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.

Choose one billing interval from a small group of mutually exclusive options

// Usage adapted from beUI's pinned MIT source.
// Copyright (c) 2026 Saurabh Chauhan. See ./LICENSES.md.
"use client";

import { useState } from "react";
import { RadioGroup, RadioGroupItem } from "@/components/motion/radio";

export function RadioPreview() {
  const [plan, setPlan] = useState("pro");

  return (
    <RadioGroup value={plan} onValueChange={setPlan} className="min-w-48">
      <RadioGroupItem value="starter" label="Starter — free" />
      <RadioGroupItem value="pro" label="Pro — $12/mo" />
      <RadioGroupItem value="team" label="Team — $29/mo" />
      <RadioGroupItem value="legacy" label="Legacy plan" disabled />
    </RadioGroup>
  );
}

Usage example adapted from beUI's pinned MIT source. Retain the source licence notices when copying.

Use stable item values and provide the group’s question in nearby text or a fieldset. Persist the chosen interval only through your application’s confirmed operation.

Customization

RadioGroupProps.value
Optional; string.
RadioGroupProps.defaultValue
Optional; string.
RadioGroupProps.onValueChange
Optional; (value: string) => void.
RadioGroupProps.children
Required; ReactNode.
RadioGroupProps.className
Optional; string.
RadioGroupProps.orientation
Optional; "vertical" | "horizontal".
RadioGroupItemProps.value
Required; string.
RadioGroupItemProps.label
Optional; string.
RadioGroupItemProps.disabled
Optional; boolean.
RadioGroupItemProps.className
Optional; string.
RadioGroupItemProps.id
Optional; string.

Integration notes

  • Use a checkbox for independent choices and radios for one choice within a group.
  • Check focus order, disabled options and how the selected value reaches form submission.

Component source: beUI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.

Better with your agent

Give your agent taste.

The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.

All components are free. Sign up only to connect MCP.

Connect to MCP