Time Range
Two `<input type="time">` paired with a typographic `→` divider. Single visual unit while remaining two independent fields for keyboard nav and form submission.
Time Range the 18th of 28 designs in the 28 CSS Input Field Designs collection. The design is implemented in pure CSS — no JavaScript required. Copy the HTML and CSS panels below into your project. Because the demo is pure CSS, it works in any framework or templating engine you happen to use. The design honours prefers-reduced-motion and uses real semantic markup, so it ships accessibility-ready out of the box.
Live preview
The code
<fieldset class="if-time">
<legend class="if-time-legend">Quiet hours</legend>
<span class="if-time-row">
<label
><span class="if-time-cap">From</span><input type="time" name="from" value="22:00"
/></label>
<span class="if-time-sep" aria-hidden="true">→</span>
<label><span class="if-time-cap">To</span><input type="time" name="to" value="07:00" /></label>
</span>
</fieldset> .if-time {
width: 100%;
max-width: 320px;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
padding: 12px 14px;
background: #1a1a22;
}
.if-time-legend {
padding: 0 6px;
font-family: "JetBrains Mono", monospace;
font-size: 10px;
letter-spacing: 0.12em;
color: #b8b6d4;
text-transform: uppercase;
}
.if-time-row {
display: flex;
align-items: center;
gap: 12px;
}
.if-time label {
flex: 1;
display: grid;
gap: 4px;
}
.if-time-cap {
font-size: 10px;
color: #b8b6d4;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.if-time input {
width: 100%;
box-sizing: border-box;
padding: 8px 10px;
background: #0c0c12;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
color: #f0eeff;
font:
600 13px/1 "JetBrains Mono",
monospace;
outline: none;
color-scheme: dark;
}
.if-time input:focus {
border-color: #a78bfa;
}
.if-time-sep {
color: #a78bfa;
font-size: 14px;
align-self: end;
padding-bottom: 9px;
}