javascript

Radio Button Input field in Redux Form

To add radio buttons input fields on your redux form you need to pass radio to type attribute of Field and provide the same value to name attribute.

<div>
    <label>Choose Color</label>
    <div>
        <label>
            <Field name="color_selection" component="input" type="radio" value="green" />
            <span>Green</span>
        </label>
        <label>
            <Field name="color_selection" component="input" type="radio" value="red" />
            <span>Red</span>
        </label>
        <label>
            <Field name="color_selection" component="input" type="radio" value="blue" />
            <span>blue</span>
        </label>
    </div>
</div>
Was this helpful?