logo

Lumina Design

ComponentsIcons
Installation
AccordionAppHeaderAutoCompleteAvatarBottomNavigationBreadcrumbButtonCarouselCheckboxChipColumnDataTableDatePickerDialogFloatingButtonFloatingMenuInputFieldLinkMenuDropdownNextToastProviderProgressRadioButtonRangeSliderResizablePanelSelectDropDownSideBarTabSelectTabsTagTextTextAreaThemeProviderToastProviderToggleInputToggleSwitchTooltip

RadioButton

The RadioButton component is a form element that allows users to select a single option from a set of mutually exclusive choices. Unlike checkboxes, radio buttons enforce a single selection, making them ideal for scenarios like choosing a payment method, selecting a gender, or picking a preferred shipping option. Radio buttons are essential in forms where a clear and definitive choice is required from the user.

Code

import RadioButton from "@lumina-design/core/RadioButton";
    
<RadioButton
  name="fruit"
  value="Apple"
  label="Apple"
  onChange={(val) => setRadioFlag(val)}
  checked={radioFlag === "Apple"}
/>