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

  • 0.1.23
  • Source
  • npm
  • Socket score

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

@paprika/radio - 0.1.15

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
ariaDescribedBystringfalsenullUsed for aria-describedby 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
sizeShirtSizes.DEFAULTfalseShirtSizes.MEDIUMSize provided by parent Group component
tabIndexunionfalse0Value for tabindex attribute to override the default of 0.
valuestringfalse""Value applied to the input if needed.

Radio.Group

PropTyperequireddefaultDescription
a11yTextstringfalse""aria-labelledby prop on the containing group element
canDeselectboolfalsefalseCan deselect any radio
childrennodefalsenullThe individual radio items.
isDisabledboolfalsefalseAre all radios disabled
onChangefunctrue-On change of radio selection.
sizeShirtSizes.DEFAULTfalseShirtSizes.MEDIUMThe size for all radio components.

Usage

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>;
more:
  • Storybook showcase
  • Github source code
  • Github create issue
  • ChangeLog

FAQs

Package last updated on 22 Jun 2020

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