UiBibz::Ui::Core::Forms::Numbers::RangeField
# by variable
ui_range_field name, options, html_options
# or by block
ui_range_field options, html_options do
name
end
ui_text_field "range"
<input type="range" name="range" id="range" class="custom-range">
ui_range_field 'range', min: -3, max: 3, step: 0.2, value: 0.40
<input type="range" name="range" id="range" value="0.4" class="custom-range" min="-3" max="3" step="0.2">
ui_range_field 'range', in: 0..100, value: 8
ui_range_field 'range', within: 5..10, step: 0.2, value: 6
<input type="range" name="range" id="range" value="8" class="custom-range" min="0" max="100">
<input type="range" name="range" id="range" value="6" class="custom-range" min="5" max="10" step="0.2">
Ui Bibz is compatible with simple form.
You can use defaults inputs of Simple Form and defaults inputs of Ui Bibz like ui_range_field
. You can use Simple Form input options and Ui Bibz ui_range_field options.
ui_form_for(@search) do |f|
...
f.input :age, as: :ui_range_field
...
end