Skip to main content

fast-radio

An implementation of a radio as a form-connected web-component.

Setup#

Basic Setup#

import {    provideFASTDesignSystem,    fastRadio} from "@microsoft/fast-components";
provideFASTDesignSystem()    .register(        fastRadio()    );

Customizing the indicator#

import {    provideFASTDesignSystem,    fastRadio} from "@microsoft/fast-components";
provideFASTDesignSystem()    .register(        fastRadio({            checkedIndicator: `...your checked indicator...`        })    );

Usage#

Live Editor
Result
SyntaxError: Unexpected token (1:8)
1 : return ()
            ^
note

For a more ergonomic usage of radios in groups, see the fast-radio-group documentation.

Create your own design#

import {    Radio,    RadioOptions,    radioTemplate as template,} from "@microsoft/fast-foundation";import { radioStyles as styles } from "./my-radio.styles";
export const myRadio = Radio.compose<RadioOptions>({    baseName: "radio",    template,    styles,    checkedIndicator: `...default checked indicator...`,});

Additional resources#