Windows — Fluent JS behaviour

Selection controls

Checkbox, radio, switch, slider, star rating and the number box in Fluent 2 style: revealing borders, the 40×20 switch, and stars you can walk with the keyboard.

Documentation

Real scenarios

The component as it is used in a product — not a specimen grid.

Controls that reveal themselves

The border darkens as you approach, the checkmark scales in, the switch fill wipes across, and the stars walk star-by-star with the arrow keys. Hold a spin button and it repeats.

Display

Personalisation › Display

A restart is required — one file is still locked.
Power mode
Brightness Screen luminance in percent. ۷۰٪
Rate this experience Click a star, or walk with ← →. ۳ از ۵
Font size Editor text size, 8 to 72.

Important props

Important props
Prop Type Default What it does
reveal border 'hover 1px' The border darkens on hover and doubles blue on focus.
switch size '40 × 20' Fluent’s long slim switch; the fill wipes across.
number-box spin 'up/down' Up/down buttons inside the field; hold to repeat.

Snippet

<label class="flsel-check"><input type="checkbox"><span>✓</span> حالت شب</label>
<label class="flsel-switch"><input type="checkbox"><span class="flsel-track"></span></label>

<style>
.flsel-check span { display: grid; place-items: center; inline-size: 20px; block-size: 20px;
                    border-radius: 4px; border: 1px solid #8a8a8a; background: #ffffffb3;
                    color: transparent; }
.flsel-check input:checked + span { background: #005FB8; border-color: #005FB8; color: #fff; }
.flsel-track { inline-size: 40px; block-size: 20px; border-radius: 999px;
               border: 1px solid #8a8a8a; background: transparent; }
.flsel-switch input:checked + .flsel-track { background: #005FB8; }
</style>