Gravity
Search…
Tabs
Tabs are a great way to simplify complex user interfaces by showing groups of elements only when they're required.
To create a tabbed view, wrap all the components in a <TabView> component.
1
<TabView name='Billing' labels={['Plan', 'Card Details']}>
2
<Card className={ prop.className }/>
3
<Card className={ prop.className }/>
4
</TabView
Copied!

Props

prop
description
value
name
unique name for the tab view
string
labels
list of tab labels
string array
You must pass the name prop in order for the state to be saved across view changes. You must also pass the className prop down to any direct children.
Last modified 3mo ago
Copy link
Contents
Props