Build an iOS-style segmented control as a single React component. It's a small piece of stateful UI — one selected index — but done right the highlight, the ARIA state, and the status label all read from that single source of truth, and each segment is a real role="tab" button inside a role="tablist".
The starter App.tsx renders three segments — Day, Week, Month — with the first already selected. Make it interactive:
useState(0).selected class (accent background), aria-selected={true}, and the status line reads Selected: <label>.Day highlighted green and "Selected: Day" below. Clicking Week moves the highlight to Week and shows "Selected: Week".role="tab" + aria-selected are wired to the same index.selected value guarantees only one carries the highlight.role="tablist" and each segment is a <button role="tab"> with aria-selected — the accessible pattern for a single-choice control.styles.css; focus on the state.