Question description
Design and implement a tab component.
The component should support switching between multiple tabs and displaying the corresponding content for the active tab.
This problem asks you to design a tab component that manages active-tab state and switches displayed content when users click different tabs. The key is to organize tab data clearly, keep the current selection in state, and update the view and active styling together on each interaction.