DocsGitHub
Getting Started
  • Overview
  • Design Tokens
Components
  • Accordion
  • Alert
  • Announcement
  • Avatar
  • Badge
  • BigCalendar
  • Breadcrumb
  • Button
  • ButtonGroup
  • Calendar
  • Card
  • Checkbox
  • Chip
  • CloseButton
  • Combobox
  • CommandPalette
  • ContextMenu
  • Currency
  • DatePicker
  • DescriptionList
  • Drawer
  • DropdownMenu
  • EmptyState
  • Field
  • FileUpload
  • FormGrid
  • Hotkey
  • Icon
  • Input
  • Metric
  • Modal
  • MultiSelect
  • NumberInput
  • Pagination
  • Popover
  • ProgressBar
  • Radio
  • Rating
  • SegmentedControl
  • Select
  • SelectionCard
  • Sidebar
  • Skeleton
  • Slider
  • Spinner
  • Stepper
  • Switch
  • Table
  • Tabs
  • Textarea
  • Timeline
  • TimePicker
  • Toast
  • Tooltip
  • TransferList
  • TreeView
  • Wizard
Charts
  • Overview
  • Area Chart
  • Bar Chart
  • Donut Chart
  • Line Chart
  • Pie Chart
  • Stacked Bar Chart

Radio

Allows the user to select a single option from a group of choices.

Installation

tsx
import { RadioGroup, RadioButton } from "madagent";

Default

Plan

With Subtitle and Description

Delivery
3-5 days
Free shipping on all orders
1-2 days
Additional $9.99 shipping fee

Disabled

Options
PropTypeDefaultDescription
name
string
-Shared name attribute for all radios in the group
value
string
-Currently selected value (controlled)
defaultValue
string
-Default selected value (uncontrolled)
disabled
boolean
falseDisables all radios in the group
legend
string
-Group label rendered as a legend
onChange
(value: string) => void
-Called when the selected value changes

RTL Support

Components automatically adapt to right-to-left languages using CSS logical properties.

Preview

الخطة

Usage

tsx
<RadioGroup legend="الخطة" defaultValue="pro">
  <RadioButton value="free" label="مجاني" />
  <RadioButton value="pro" label="احترافي" />
  <RadioButton value="enterprise" label="مؤسسي" />
</RadioGroup>