Tabs

<TabContainer> shows a row of tabs and renders one child at a time. Each direct
child supplies its tab title via its label prop.
import { Label, TabContainer, VBox } from "@huyz0/ztui/react";
<TabContainer activeIndex={0} onChange={(i) => console.log("tab", i)}> <VBox label="Profile" style={{ padding: 1 }}> <Label>Profile panel</Label> </VBox> <VBox label="Preferences" style={{ padding: 1 }}> <Label>Preferences panel</Label> </VBox></TabContainer>;Key props
Section titled “Key props”- Children — each child’s
labelbecomes its tab title. activeIndex/onChange— controlled active tab (or let it manage internally).
Interaction
Section titled “Interaction”Click a tab, or use the arrow keys when the tab bar is focused.