Dojo NG is being built in the open, one section at a time — follow along on Heptapod.

API REFERENCE · FORM CONTROLS

<dj-radio-group>

Coordinates a set of <dj-radio> into a single-choice control. Provide choices either with the options array (rendered for you) or by slotting <dj-radio> children. The group owns selection (exclusivity), roving-arrow keyboard navigation, and form participation: it is the one form-associated element, submitting the selected value under name. Child radios should not carry their own name.

This is local parent-child coordination, so it uses DOM, properties, and events — no external store needed.

Try it in the playground

@dojo-ng/radio-group · v0.1.2

npm install @dojo-ng/radio-group

import "@dojo-ng/radio-group";

Properties

PropertyAttributeTypeDefault
name name reflected string None
value value string ""
options options RadioOption[] None
label label string None
orientation orientation reflected "vertical""horizontal" "vertical"
disabled disabled reflected boolean false
required required reflected boolean false

Events

change

Slots

Default slot

CSS parts

Style these with dj-radio-group::part(name).

grouplabel

Methods

checkValidity(): booleanreportValidity(): boolean

Types

The types that the properties above use, as they are declared in the source.

RadioOption

export interface RadioOption { value: string; label?: string; disabled?: boolean; }