The API for the React Spectrum Tabs
component changed significantly between Beta and RC. The documentation on the React Spectrum website has been updated to follow the new API. This guide aims to assist developers using the beta and wishing to upgrade to the new RC version.
In the previous API, the Tabs
component accepted <Item>
elements as children. Each item had a title
prop representing the tab header, and children
representing the tab contents.
<Tabs aria-label="History of Ancient Rome">
<Item title="Founding of Rome" key="FoR">
<Content marginTop="size-250" marginStart="size-125">
<Text>Arma virumque cano, Troiae qui primus ab oris.</Text>