JSFiddle - React, Tailwind, and code Playground
by Ankhena
HTML
<div class="filter">
<div class="filter-range-wrapper">
<div class="filter-range">
<div class="filter-range-scale">
<div class="filter-range-bar"></div>
</div>
<button class="filter-range-handle min"></button>
<button class="filter-range-handle max" style="left: 75%;"></button>
</div>
</div>
<div class="filter-interval">
<label>От <input type="text" name="min-interval" value="0"></label>
<label>До <input type="text" name="max-interval" value="15000"></label>
</div>
</div>
CSS
@import url("https://fonts.googleapis.com/css?family=Roboto:400");
body {
margin: 0;
padding: 0;
font-family: "Roboto", "Arial", sans-serif;
}
.filter {
margin: 20px auto;
padding: 25px;
width: 300px;
background-color: #eee;
border-radius: 3px;
}
.filter-range-wrapper {
margin-bottom: 10px;
padding: 39px 18px;
border-radius: 3px;
background-color: #999;
}
.filter-range {
position: relative;
}
.filter-range-scale {
height: 2px;
background-color: #d7dcde;
}
.filter-range-bar {
height: 2px;
width: 75%;
background-color: #00ca74;
}
.filter-range-handle {
position: absolute;
top: 50%;
left: 0%;
transform: translateY(-50%);
width: 4px;
height: 4px;
box-sizing: content-box;
padding: 0;
border: 8px solid #ffffff;
border-radius: 50%;
background-color: #3f4445;
cursor: pointer;
}
.filter-interval {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.filter-interval label {
width: 50%;
font-size: 16px;
line-height: 22px;
text-transform: uppercase;
}
.filter-interval label:last-child {
text-align: right;
}
.filter-interval input {
margin-left: 8px;
width: 80px;
height: 38px;
border-radius: 2px;
border: none;
font: inherit;
color: inherit;
text-align: center;
background-color: #999;
}