Build an on/off toggle switch as a single React component. It's the simplest piece of stateful UI there is — one boolean — but doing it right means the visual state, the ARIA state, and the label all read from that single source of truth, and the control is a real role="switch" button, not a bare <div>.
The starter App.tsx renders the switch in its off state. Make it interactive:
on boolean with useState(false).on each time it's clicked.on is true: add the on class to the switch (the knob slides via CSS), set aria-checked={on}, and show On (else Off) in the status line.role="switch" + aria-checked are wired to the same state.on.<button role="switch"> with aria-checked; that's the accessible pattern (keyboard and screen-reader support come for free from the button)..switch.on .knob { transform: translateX(...) } handles the slide — you only toggle the class.styles.css; focus on the state.