Radio button

The b.Radio constructor creates a radio input, together with its label container.

ModifierAction
b.DisabledDisable the radio button
ChildAction
b.OnInput(...any)Apply children to the <input> element
b.OnLabel(...any)Apply children to the <label> element
stringAdd to the <label> element
gomponents.Nodeof type gomponents.AttributeTypeApply attribute to the <input> element
gomponents.Nodeof type gomponents.ElementTypeAdd element to the <label> element
e.ElementAdd element to the <label> element
Anything elseApply child to the <input> element

Bulma examples

Example
Code
b.Control(
	b.Radio(e.Name("answer"), "Yes"),
	b.Radio(e.Name("answer"), "No"),
)
ResultHTML
Example
Code
b.Control(
	b.Radio(e.Name("foobar"), "Foo"),
	b.Radio(e.Name("foobar"), "Bar", b.Checked),
)
ResultHTML
Example
Code
b.Control(
	b.Radio(e.Name("rsvp"), "Going"),
	b.Radio(e.Name("rsvp"), "Not going"),
	b.Radio(b.Disabled, e.Name("rsvp"), "Maybe"),
)
ResultHTML

List of Radio Buttons

Example
Code
b.Radios(
	b.Radio(e.Name("rsvp"), "Going"),
	b.Radio(e.Name("rsvp"), "Not going"),
	b.Radio(b.Disabled, e.Name("rsvp"), "Maybe"),
)
ResultHTML