ractive-ez-radio
v2.0.0
Published
Ractive Ez UI Radio
Downloads
3
Maintainers
Readme
Ractive Ez Radio
Radio button component for ractive.js
Install
npm i ractive-ez-radio
import 'ractive-ez-radio';
import 'ractive-ez-radio/themes/blue.less';
Theming requires less-loader. Icons require ractive-ez-icon
Usage
<EzRadioGroup value="{{ value }}" align="horizontal">
<EzRadioIcon value="1" />
<EzRadioIcon value="2" />
<EzRadioIcon value="3" />
</EzRadioGroup>
EzRadioGroup
align
: horizontal or verticalvalue
: the value to bind to the selected radio buttonbutton
: Passed to contained radio buttonsdisabled
: Passed to contained radio buttonsiconChecked
: Passed to contained radio buttonsiconUnchecked
: Passed to contained radio buttons
EzRadio
value
: The value this radio button assumesdisabled
: True if the component is disabledbutton
: Render as buttoniconChecked
: When using ractive-ez-icon, can set an icon for the "checked" stateiconUnchecked
: When using ractive-ez-icon, can set an icon for the "unchecked" state
Custom label format
If a text label is not sufficient for your radio button, you can override the label
partial:
<EzRadio value="{{ value }}" label>
<b>Bold label</b>
</EzRadio>
Shorthand subcomponents
EzRadio
: The base componentEzRadioButton
: Implied buttonEzRadioIcon
: Implied radio icons (defaulting to radio-checked and radio-unchecked)EzRadioIconButton
: Implied icon button