Build Tabs
Build a tabbed interface from the provided TABS data. The starter renders every tab as active and only the first panel — fix both.
Requirements
- Exactly one panel is visible at a time.
- Clicking a tab shows its panel and moves the active styling.
- The first tab is selected on load.
- Set
aria-selectedon the active tab, since the markup already uses tab roles.
Follow-up
What would keyboard support look like (arrow keys between tabs)? When would you render all panels and hide the inactive ones instead of unmounting them?