Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@paprika/radio

Package Overview
Dependencies
Maintainers
4
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paprika/radio

Radio component displays a radio input and label text beside it. When clicked it selects the input and deselects any other radio input in its group

  • 1.0.18-next.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
704
decreased by-12.55%
Maintainers
4
Weekly downloads
 
Created
Source

@paprika/radio

Description

Radio component displays a radio input and label text beside it. When clicked it selects the input and deselects any other radio input in its group

Installation

yarn add @paprika/radio

or with npm:

npm install @paprika/radio

Props

Radio

PropTyperequireddefaultDescription
a11yTextstringfalsenullUsed for aria-label on the radio input
canDeselectboolfalsefalseDescribe if the radio started as selected or not
childrennodefalsenullUsed for label contents
isCheckedboolfalsefalse
isDisabledboolfalsefalseDescribe if the radio is disabled or not
defaultIsCheckedboolfalsefalseDescribe if the radio started as checked or not
namestringfalse""Name provided for accessibility
onClickcustomfalse() => {}onClick provided by parent Group component
size[ Radio.types.size.SMALL, Radio.types.size.MEDIUM, Radio.types.size.LARGE]falseRadio.types.size.MEDIUMSize provided by parent Group component
tabIndex[number,string]false0Value for tabindex attribute to override the default of 0.
valuestringfalse""Value applied to the input if needed.

Radio.Group

PropTyperequireddefaultDescription
canDeselectboolfalsefalseCan deselect any radio
childrennodefalsenullThe individual radio items.
isDisabledboolfalsefalseAre all radios disabled
onChangefunctrue-On change of radio selection.
size[ Radio.types.size.SMALL, Radio.types.size.MEDIUM, Radio.types.size.LARGE]falseRadio.types.size.MEDIUMThe size for all radio components.

Usage

import Radio from "@paprika/radio";

<Radio.Group
  onChange={activeIndex => {
    // get values from the data using index
  }}
>
  <Radio>Radio 1</Radio>
  <Radio>Radio 2</Radio>
  <Radio>Radio 3</Radio>
  <Radio>Radio 4</Radio>
</Radio.Group>;
  • Storybook Showcase
  • GitHub source code
  • Create GitHub issue
  • CHANGELOG

FAQs

Package last updated on 05 Nov 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc