Tabs holds one TabList of Tabs and a TabPanel for each tab, matched by value. Each Tab is a ToggleButton with the tab role, so it takes every ToggleButton prop. The first enabled tab is selected unless you pick one. See the web Tabs for the same component in the browser.
Pass defaultValue to choose the first tab, or leave it out to start on the first enabled one.
Pass value and onChange when the screen owns the selection. onChange is not called for the tab that is already selected.
orientation="vertical" puts the list beside the panels, as a settings screen does. Tabs then fill the list's width with their label at the start, and the panel takes the rest of the row.
An unselected panel renders nothing by default. Pass keepMounted to keep it mounted and hidden, so a form in it keeps what was typed.
- There is no arrow-key navigation on a touch screen, so activation is accepted and has no effect.
- Tabs also takes core 3.0's onValueChange, called with the same value as onChange.
- Each panel is labelled by its tab for screen readers.
Takes every Flex prop. It is a Column, or a Row when vertical, with fillWidth and gap="16".
Takes every Flex prop. A Row with gap="4", or a Column when vertical. Name it with aria-label when nothing on screen labels it.
Takes every ToggleButton prop except selected.
Takes every Flex prop.