# RadioCell **📖 Live documentation:** https://cds.coinbase.com/components/inputs/RadioCell/ A selectable cell that pairs a radio button with a title and description for single-choice selections. ## Import ```tsx import { RadioCell } from '@coinbase/cds-web/controls/RadioCell' ``` ## Examples ### Basic usage ```tsx live function RadioCellExample() { const [value, setValue] = React.useState('one'); return ( setValue('one')} value="one" name="radio-cell-example" /> setValue('two')} value="two" name="radio-cell-example" /> {}} value="three" name="radio-cell-example" disabled /> ); } ``` ### With Custom Content and Styling ```tsx live function CustomRadioCellExample() { const [selectedPlan, setSelectedPlan] = useState('pro'); return ( Perfect for individuals getting started $9/month • Up to 5 projects • 1GB storage } onChange={(e) => setSelectedPlan(e.target.value)} title="Basic Plan" value="basic" name="subscription-plan" /> Great for growing teams and businesses $29/month • Unlimited projects • 10GB storage • Most Popular } onChange={(e) => setSelectedPlan(e.target.value)} title="Pro Plan" value="pro" name="subscription-plan" /> ); } ``` ## Props | Prop | Type | Required | Default | Description | | --- | --- | --- | --- | --- | | `title` | `ReactNode` | Yes | `-` | - | | `alignContent` | `ResponsiveProp
` | No | `-` | - | | `alignItems` | `ResponsiveProp
` | No | `-` | - | | `alignSelf` | `ResponsiveProp
` | No | `-` | - | | `as` | `label` | No | `-` | The underlying element or component the polymorphic component will render. Changing as also changes the inherited native props (e.g. href for as=a) and the expected ref type. | | `aspectRatio` | `ResponsiveProp` | No | `-` | - | | `background` | `Color` | No | `-` | Background color of the overlay (element being interacted with). | | `blendStyles` | `InteractableBlendStyles` | No | `-` | - | | `block` | `boolean` | No | `-` | Set element to block and expand to 100% width. | | `borderBottomLeftRadius` | `ResponsiveProp` | No | `-` | - | | `borderBottomRightRadius` | `ResponsiveProp` | No | `-` | - | | `borderBottomWidth` | `ResponsiveProp` | No | `-` | - | | `borderColor` | `Color` | No | `-` | Border color of the element. | | `borderEndWidth` | `ResponsiveProp` | No | `-` | - | | `borderRadius` | `ResponsiveProp` | No | `-` | - | | `borderStartWidth` | `ResponsiveProp` | No | `-` | - | | `borderTopLeftRadius` | `ResponsiveProp` | No | `-` | - | | `borderTopRightRadius` | `ResponsiveProp` | No | `-` | - | | `borderTopWidth` | `ResponsiveProp` | No | `-` | - | | `borderWidth` | `ResponsiveProp` | No | `-` | - | | `bordered` | `boolean` | No | `-` | Add a border around all sides of the box. | | `borderedBottom` | `boolean` | No | `-` | Add a border to the bottom side of the box. | | `borderedEnd` | `boolean` | No | `-` | Add a border to the trailing side of the box. | | `borderedHorizontal` | `boolean` | No | `-` | Add a border to the leading and trailing sides of the box. | | `borderedStart` | `boolean` | No | `-` | Add a border to the leading side of the box. | | `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. | | `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. | | `bottom` | `ResponsiveProp>` | No | `-` | - | | `checked` | `boolean` | No | `-` | - | | `className` | `string` | No | `-` | Apply class names to the outer container. | | `classNames` | `{ root?: string; radioContainer?: string \| undefined; title?: string \| undefined; description?: string \| undefined; contentContainer?: string \| undefined; } \| undefined` | No | `-` | - | | `color` | `ResponsiveProp` | No | `-` | - | | `columnGap` | `((Space \| { base?: Space; phone?: Space \| undefined; tablet?: Space \| undefined; desktop?: Space \| undefined; }) & ResponsiveProp) \| undefined` | No | `-` | - | | `dangerouslySetBackground` | `string` | No | `-` | - | | `description` | `ReactNode` | No | `-` | - | | `descriptionId` | `string` | No | `-` | Custom ID for the description element. If not provided, a unique ID will be generated. | | `disabled` | `boolean` | No | `-` | Is the element currently disabled. Disable user interaction. | | `display` | `ResponsiveProp` | No | `-` | - | | `elevation` | `ResponsiveProp` | No | `-` | - | | `flexBasis` | `ResponsiveProp>` | No | `-` | - | | `flexDirection` | `ResponsiveProp` | No | `-` | - | | `flexGrow` | `ResponsiveProp` | No | `-` | - | | `flexShrink` | `ResponsiveProp` | No | `-` | - | | `flexWrap` | `ResponsiveProp` | No | `-` | - | | `focusable` | `boolean` | No | `-` | - | | `font` | `ResponsiveProp` | No | `-` | - | | `fontFamily` | `ResponsiveProp` | No | `-` | - | | `fontSize` | `ResponsiveProp` | No | `-` | - | | `fontWeight` | `ResponsiveProp` | No | `-` | - | | `gap` | `ResponsiveProp` | No | `-` | - | | `grid` | `ResponsiveProp` | No | `-` | - | | `gridArea` | `ResponsiveProp` | No | `-` | - | | `gridAutoColumns` | `ResponsiveProp>` | No | `-` | - | | `gridAutoFlow` | `ResponsiveProp` | No | `-` | - | | `gridAutoRows` | `ResponsiveProp>` | No | `-` | - | | `gridColumn` | `ResponsiveProp` | No | `-` | - | | `gridColumnEnd` | `ResponsiveProp` | No | `-` | - | | `gridColumnStart` | `ResponsiveProp` | No | `-` | - | | `gridRow` | `ResponsiveProp` | No | `-` | - | | `gridRowEnd` | `ResponsiveProp` | No | `-` | - | | `gridRowStart` | `ResponsiveProp` | No | `-` | - | | `gridTemplate` | `ResponsiveProp` | No | `-` | - | | `gridTemplateAreas` | `ResponsiveProp` | No | `-` | - | | `gridTemplateColumns` | `ResponsiveProp>` | No | `-` | - | | `gridTemplateRows` | `ResponsiveProp>` | No | `-` | - | | `height` | `((Height \| { base?: Height; phone?: Height \| undefined; tablet?: Height \| undefined; desktop?: Height \| undefined; }) & (string \| number)) \| undefined` | No | `-` | - | | `indeterminate` | `boolean` | No | `-` | Enable indeterminate state. Useful when you want to indicate that sub-items of a control are partially filled. | | `justifyContent` | `ResponsiveProp` | No | `-` | - | | `key` | `Key \| null` | No | `-` | - | | `left` | `ResponsiveProp>` | No | `-` | - | | `lineHeight` | `ResponsiveProp` | No | `-` | - | | `loading` | `boolean` | No | `-` | Is the element currenty loading. When set to true, will disable element from press and keyboard events | | `margin` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - | | `marginBottom` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - | | `marginEnd` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - | | `marginStart` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - | | `marginTop` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - | | `marginX` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - | | `marginY` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - | | `maxHeight` | `ResponsiveProp>` | No | `-` | - | | `maxWidth` | `ResponsiveProp>` | No | `-` | - | | `minHeight` | `ResponsiveProp>` | No | `-` | - | | `minWidth` | `ResponsiveProp>` | No | `-` | - | | `noScaleOnPress` | `boolean` | No | `-` | Dont scale element on press. | | `onChange` | `((inputChangeEvent: ChangeEvent) => void)` | No | `-` | - | | `opacity` | `ResponsiveProp` | No | `-` | - | | `overflow` | `ResponsiveProp` | No | `-` | - | | `padding` | `ResponsiveProp` | No | `-` | - | | `paddingBottom` | `ResponsiveProp` | No | `-` | - | | `paddingEnd` | `ResponsiveProp` | No | `-` | - | | `paddingStart` | `ResponsiveProp` | No | `-` | - | | `paddingTop` | `ResponsiveProp` | No | `-` | - | | `paddingX` | `ResponsiveProp` | No | `-` | - | | `paddingY` | `ResponsiveProp` | No | `-` | - | | `pin` | `PinningDirection` | No | `-` | Direction in which to absolutely pin the box. | | `position` | `ResponsiveProp` | No | `-` | - | | `pressed` | `boolean` | No | `-` | Is the element being pressed. Primarily a mobile feature, but can be used on the web. | | `ref` | `((instance: HTMLLabelElement \| null) => void) \| RefObject \| null` | No | `-` | - | | `right` | `ResponsiveProp>` | No | `-` | - | | `rowGap` | `((Space \| { base?: Space; phone?: Space \| undefined; tablet?: Space \| undefined; desktop?: Space \| undefined; }) & ResponsiveProp) \| undefined` | No | `-` | - | | `style` | `CSSProperties` | No | `-` | - | | `styles` | `{ root?: CSSProperties; radioContainer?: CSSProperties \| undefined; title?: CSSProperties \| undefined; description?: CSSProperties \| undefined; contentContainer?: CSSProperties \| undefined; } \| undefined` | No | `-` | - | | `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID | | `textAlign` | `ResponsiveProp
` | No | `-` | - | | `textDecoration` | `ResponsiveProp` | No | `-` | - | | `textTransform` | `ResponsiveProp` | No | `-` | - | | `titleId` | `string` | No | `-` | Custom ID for the title element. If not provided, a unique ID will be generated. | | `top` | `ResponsiveProp>` | No | `-` | - | | `transform` | `ResponsiveProp` | No | `-` | - | | `transparentWhileInactive` | `boolean` | No | `-` | Mark the background and border as transparent until the element is interacted with (hovered, pressed, etc). Must be used in conjunction with the pressed prop | | `transparentWhilePressed` | `boolean` | No | `-` | Mark the background and border as transparent even while element is interacted with (elevation underlay issue). Must be used in conjunction with the pressed prop | | `type` | `button \| reset \| submit` | No | `-` | - | | `userSelect` | `ResponsiveProp` | No | `-` | - | | `value` | `string` | No | `-` | Value of the option. Useful for multiple choice. | | `visibility` | `ResponsiveProp` | No | `-` | - | | `width` | `((Width \| { base?: Width; phone?: Width \| undefined; tablet?: Width \| undefined; desktop?: Width \| undefined; }) & (string \| number)) \| undefined` | No | `-` | - | | `zIndex` | `ResponsiveProp` | No | `-` | - | ## Styles | Selector | Static class name | Description | | --- | --- | --- | | `root` | `-` | Root element | | `radioContainer` | `-` | Radio input container element | | `title` | `-` | Title text element | | `description` | `-` | Description text element | | `contentContainer` | `-` | Content container element |