Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom range input #25600

Merged
merged 19 commits into from
Feb 19, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/4.0/components/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -1176,13 +1176,15 @@ As is the `size` attribute:
Create custom `<input type="range">` controls with `.custom-range`. The track (the background) and thumb (the value) are both styled to appear the same across browsers. As only IE and Firefox support "filling" their track from the left or right of the thumb as a means to visually indicate progress, we do not currently support it.

{% example html %}
<input type="range" class="custom-range">
<label for="customRange1">Example range</label>
<input type="range" class="custom-range" id="customRange1">
{% endexample %}

Additionally, you may specify steps by adding `min` and `max` attributes.
Range inputs have implicit values for `min` and `max`—`0` and `100`, respectively. You may specify new values for those using the `min` and `max` attributes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also include at the end:

By default, range inputs "snap" to integer values. To change this, you can specify a `step` value.

and then perhaps add step="0.5" to the following example? Or is that getting too specific?


{% example html %}
<input type="range" class="custom-range" min="0" max="5">
<label for="customRange2">Example range</label>
<input type="range" class="custom-range" min="0" max="5" id="customRange2">
{% endexample %}

### File browser
Expand Down