Radio

<wa-radio> Stable Since 2.0

Radios represent a single option within a mutually exclusive set. Use them inside a radio group when users must pick exactly one choice from a small list.

This component must be used as a child of <wa-radio-group>. Please see the Radio Group docs to see examples of this component in action.

Importing

Link to This Section

If you're using the autoloader or a hosted project, components load on demand — no manual import needed. To cherry-pick a component manually, use one of the following snippets.

CDN npm Self-Hosted React

Import this component directly from the CDN:

import 'https://ka-f.webawesome.com/[email protected]/components/radio/radio.js';

After installing Web Awesome via npm, import this component:

import '@awesome.me/webawesome/dist/components/radio/radio.js';

If you're self-hosting Web Awesome, import this component from your server:

import './webawesome/dist/components/radio/radio.js';

To import this component for React 18 or below, use the following code:

import WaRadio from '@awesome.me/webawesome/dist/react/radio/index.js';

Slots

Link to This Section

Learn more about using slots.

Attributes & Properties

Link to This Section

Learn more about attributes and properties.

Methods

Link to This Section

Learn more about methods.

Events

Link to This Section

Learn more about events.

CSS custom properties

Link to This Section

Learn more about CSS custom properties.

Custom States

Link to This Section

Learn more about custom states.

CSS parts

Link to This Section

Learn more about CSS parts.

Dependencies

Link to This Section

This component automatically imports the following elements. Sub-dependencies, if any exist, will also be included in this list.

Need a hand? Report a bug Ask for help
    No results