Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

@asphalt-react/radio

Package Overview
Dependencies
Maintainers
3
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asphalt-react/radio

Radio

npmnpm
Version
1.17.0
Version published
Weekly downloads
219
-6.41%
Maintainers
3
Weekly downloads
 
Created
Source

Radio

Radio buttons are used when options are mutually exclusive, that is only one option can be selected. Radio button can be rendered in various sizes bases on the size prop. Radio uses its own <label> element. To add text for the label, use the label prop. Label can be hidden optionally to show only the Radio input.

Most of the input="radio" attributes are supported. If you need to get hold of the underlying DOM element, use React's refs as usual.

Usage

import Radio from "@asphalt-react/radio"
;<div>
  <Radio label="option 1" />
  <Radio label="option 2" />
</div>

Accessibility

  • Use tab to move focus between radio groups
  • Press space to make a selection
  • Use or arrow keys to change the selection
  • Additional aria attributes like aria-labelledby, aria-checked can be applied too.

Props

label

Label for the radio

typerequireddefault
stringfalse""

size

Size of the radio. accepts s, m, l for small, medium & large

typerequireddefault
enumfalse"m"

Keywords

asphalt

FAQs

Package last updated on 05 Sep 2022

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