
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
react-styled-radio
Advanced tools
Radio button component for React built with styled-components < đź’…>
Radio button component for React built with styled-components < đź’…>
npm install --save react-styled-radio
yarn add react-styled-radio
import React, { Component } from 'react';
import { RadioGroup, Radio } from 'react-styled-radio';
class Example extends Component {
render () {
return (
<RadioGroup horizontal name="gender">
<Radio small value="male" label="male"/>
<Radio small value="female" label="female"/>
</RadioGroup>
)
}
}
The RadioGroup component accepts the following props.
| Prop | Type | Default | Description: Options |
|---|---|---|---|
vertical | boolean | false | Display radios vertically |
onChange | function | null | Function to run when value changes |
The Radio component accepts the following props.
| Prop | Type | Default | Description: Options |
|---|---|---|---|
small | boolean | false | Button size |
large | boolean | false | Button size |
handleChange | function | null | Function to run when value changes |
The handleChange prop is automatically passed the event object. See below example.
class Example extends Component {
onChange = e => {
console.log(e.target.value)
/*
If the first radio is clicked this will log 'male'
If the second radio is clicked this will log 'female'
*/
}
render () {
return (
<RadioGroup horizontal name="gender" onChange={this.onChange}>
<Radio small value="male" label="male"/>
<Radio small value="female" label="female"/>
</RadioGroup>
)
}
}
The theme object can be used to customize the look of the components, with the following values.
| Prop | Type | Default |
|---|---|---|
inputBg | string | #20232A |
inputBorder | string | #292C34 |
inputColor | string | #212529 |
inputPlace | string | #6B757C |
inputOutline | string | #007BFF |
inputLabel | string | #212529 |
There are two ways to use the theme object.
import { ThemeProvider } from 'styled-components';
...
return (
<ThemeProvider theme={theme}>
<RadioGroup horizontal name="gender" handleChange={this.handleChange}>
<Radio small value="male" label="male"/>
<Radio small value="female" label="female"/>
</RadioGroup>
</ThemeProvider>
);
...
...
return (
<RadioGroup horizontal name="gender" handleChange={this.handleChange}>
<Radio theme={theme} small value="male" label="male"/>
<Radio theme={theme} small value="female" label="female"/>
</RadioGroup>
);
...
| Class | Description |
|---|---|
.radio__group | Radio group wrapper |
.radio__button | Radio button wrapper |
.radio__text | Radio button label |
Follow these steps to setup a local development environment. Use yarn or npm - not both.
git clone https://github.com/alexcasche/react-styled-radio
npm install && npm start
yarn install && yarn add
cd example
npm install && npm start
yarn install && yarn start
MIT © alexcasche
FAQs
Radio button component for React built with styled-components < đź’…>
We found that react-styled-radio demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.