Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@gluestack-ui/radio
Advanced tools
A universal headless Radio component for React Native, Next.js & React
To use @gluestack-ui/radio
, all you need to do is install the
@gluestack-ui/radio
package:
$ yarn add @gluestack-ui/radio
# or
$ npm i @gluestack-ui/radio
The Radio component presents users with predefined choices and enables them to select only one option. It is commonly used for providing a single-choice selection in forms or surveys. Here's an example how to use this package to create one:
import { Root, Group, Icon, Indicator, Label } from './styled-components';
import { createRadio } from '@gluestack-ui/radio';
export const Radio = createRadio({
Root,
Group,
Icon,
Indicator,
Label,
});
Default styling of all these components can be found in the components/core/radio file. For reference, you can view the source code of the styled Radio
components.
// import the styles
import {
Root,
Indicator,
Icon,
Label,
Group,
} from '../components/core/radio/styled-components';
// import the createRadio function
import { createRadio } from '@gluestack-ui/radio';
// Understanding the API
const Radio = createRadio({
Root,
Indicator,
Icon,
Label,
Group,
});
// Using the radio component
export default () => (
<RadioGroup>
<Radio>
<RadioIndicator>
<RadioIcon as={CircleIcon} />
</RadioIndicator>
<RadioLabel />
</Radio>
</RadioGroup>
);
More guides on how to get started are available here.
FAQs
A universal headless Radio component for React Native, Next.js & React
We found that @gluestack-ui/radio demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 16 open source maintainers 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.