x
1
2
3
4
5
6
<input type="range" name="range_with_tick_marks" id="range_with_tick_marks" value="25" step="25" list="tickmarks" class="range i-full" /><datalist id="tickmarks"><option value="0">0</option> <option value="25">25</option> <option value="50">50</option> <option value="75">75</option> <option value="100">100</option></datalist>
1
2
<%= range_field_tag "range_with_tick_marks", 25, step: 25, list: "tickmarks", class: "range i-full" %><%= tag.datalist options_for_select(["0", "25", "50", "75", "100"]), id: "tickmarks" %>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@import url("https://esm.sh/@stanko/dual-range-input@1.0.0/dist/index.css");.range { accent-color: var(--color-primary);}.range:focus-visible { outline: var(--input-outline-size, 2px) solid var(--color-selected-dark);}.dual-range-input { /* Height of the input */ --dri-height: 1rem; /* Thumb size */ --dri-thumb-width: var(--dri-height); --dri-thumb-height: var(--dri-height); /* Thumb background color */ --dri-thumb-color: var(--color-primary); --dri-thumb-hover-color: var(--dri-thumb-color); --dri-thumb-active-color: var(--color-selected-dark); /* Thumb border */ --dri-thumb-border-color: var(--dri-thumb-color); --dri-thumb-border-hover-color: var(--dri-thumb-border-color); --dri-thumb-border-active-color: var(--dri-thumb-border-color); --dri-thumb-border-radius: 1rem; --dri-thumb-border-width: 1px; /* Track size */ --dri-track-height: calc(var(--dri-height) * .45); --dri-track-border-radius: 1rem; /* Track color */ --dri-track-color: var(--color-border); --dri-track-filled-color: var(--color-primary);}
Java Script is not required or multiple files are needed, check the notes.
No notes provided.