5.0.11 • Published 2 years ago

@axa-ch/radio v5.0.11

Weekly downloads
323
License
Copyright 2019 AX...
Repository
github
Last release
2 years ago

Radio

Radio buttons provide a UI element for selecting one out of several visible choices. One may label them with text to explain the semantics of the selected choice to users.

Radio buttons can be used in HTML forms as well as React controlled components.

For grouping multiple related radio buttons in a style-guide-conformant fashion see <axa-fieldset>.

Properties

button

The Boolean attribute button, when true, changes the radio button UI to a button-like appearance (default: false).

checked

The Boolean attribute checked controls whether the radio button is selected (true) or not (false).

If checked is defined when first set under React, controlled-component mode is activated.

disabled

The Boolean attribute disabled controls whether the radio button can be user-modified (false) or not (true).

A disabled radio button will not be submitted in a form.

refId

The string-valued refId sets the id attribute of the component's hidden <input>.

value

The string-valued value sets the value attribute of underlying <input type="radio">.

It is especially useful in combination with form submission of the component.

name

The string-valued name sets the name attribute of underlying <input type="radio">.

It serves as the group identifier of all N same-named radio buttons that collectively exhibit one-out-N-choice behaviour.

It is a necessary attribute for form submission of the component.

label

The string-valued label sets the visible text of this radio button (default: '').

nogap

The Boolean nogap attribute, when true, suppresses the horizontal gap between this radio button and its left neighbour in conjunction with an enclosing <axa-fieldset horizontal>.

It is intended for two-radio-button choices.

noAutoWidth

The Boolean noAutoWidth attribute, when true, suppresses the auto-width calculation for button-type radio buttons.

icon

The string-valued icon attribute receives a valid SVG icon with working dimensions 48×48 pixels.

Callbacks

onChange

The function-valued onChange can be used as a callback prop for React and other frameworks. Its only parameter is the native change event object from the underlying <input type="radio">.

The callback is invoked whenever the change event from the underlying <input type="radio"> fires.

It is especially important in controlled-component mode.

onFocus, onBlur

The function-valued onFocus, onBlur can be used as a callback prop for React and other frameworks. Its only parameter in each case is the native focus, blur event object from the underlying <input type="radio">.

The respective callbacks are invoked whenever the underlying <input type="radio"> receives or loses focus.

5.0.10

2 years ago

5.0.11

2 years ago

5.0.9

2 years ago

5.0.8

2 years ago

5.0.7

2 years ago

5.0.6

2 years ago

5.0.5

2 years ago

5.0.4

2 years ago

4.0.1

3 years ago

4.0.2

3 years ago

5.0.3

2 years ago

5.0.2

2 years ago

5.0.1

2 years ago

5.0.0

3 years ago

4.0.0

3 years ago

3.1.12

4 years ago

3.1.11

4 years ago

3.1.10

4 years ago

3.1.9

4 years ago

3.1.8

4 years ago

3.1.7

4 years ago

3.1.6

4 years ago

3.1.5

4 years ago

3.1.4

4 years ago

3.1.2

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.1.10

5 years ago

2.1.8

5 years ago

2.1.9

5 years ago

2.1.7

5 years ago

2.1.6

5 years ago

2.1.5

5 years ago

2.1.4

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago