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

API REFERENCE · FORM CONTROLS

<dj-radio>

A form-associated radio composing <dj-label>. Radios sharing a name within the same form (or document) are mutually exclusive: checking one unchecks the others. Submits value when checked. Parts: control, label. Event: change.

Try it in the playground

@dojo-ng/radio · v0.1.2

npm install @dojo-ng/radio

import "@dojo-ng/radio";

Properties

PropertyAttributeTypeDefault
checked checked reflected boolean false
value value string ""
name name reflected string None
disabled disabled reflected boolean false
required required reflected boolean false
labelHidden label-hidden boolean false
tabbableWhether this radio is in the tab order. The group sets this for roving tabindex. tabbable boolean true

Events

change

Slots

Default slot

CSS parts

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

controllabel

Methods

checkValidity(): booleanreportValidity(): booleanfocus(options: FocusOptions)restoreFormState(state: File | string | FormData | null)