sandstone/ Tab Layout
Provides a Sandstone-themed TabLayout.
import TabLayout from '@enact/sandstone/TabLayout';Members
TabLayoutComponent
Tabbed Layout component.
Example:
<TabLayout>
<Tab title="Tab One">
<Item>Hello</Item>
</Tab>
<Tab title="Tab Two">
<Item>Goodbye</Item>
</Tab>
</TabLayout>import TabLayout from '@enact/sandstone/TabLayout';Statics
A shortcut to access sandstone/TabLayout.Tab
Properties
Collection of Tabs to render.
Collapses the vertical tab list into icons only.
Only applies to
orientation="vertical". If the tabs do not include icons, a single collapsed icon will be shown.Customizes the component by mapping the supplied collection of CSS class names to the corresponding internal elements and states of this component.
The following classes are supported:
The currently selected tab.
Default: 0Called when the tabs are collapsed.
Called when the tabs are expanded.
Called when a tab is selected
Called when the tab collapse or expand animation completes.
Event payload includes:
type- Always set to "onTabAnimationEnd"collapsed-truewhen the tabs are collapsed
Orientation of the tabs.
Default: 'vertical'Assign a custom size to horizontal tabs.
Tabs in the horizontal orientation automatically stretch to fill the available width. Leave this prop blank to use the default auto-sizing behavior. Tabs may also be set to a finite width using this property. This accepts numeric pixel values. Be mindful of the value you provide as values that are too wide will run off the edge of the screen.
Only applies to
orientation="horizontal"at this time.
TabComponent
An item for the TabLayout.
Configures the tab title and icon.
import {Tab} from '@enact/sandstone/TabLayout';Properties
Key for the tab.
Note:
TabLayoutautomatically generates a key based on the title and icon combination. If this combination is not unique for all items,tabKeymust be specified to make each tab have a unique (and persistent) key.Title of the tab.
The contents to show when the tab is selected.
The icon content of the tab.
Called when a tab is clicked.
Configuration props for a Sprite icon.
All props on Sprite are supported here. By default,
stoppedwill be set tofalsewhen the tab is focused andtrueotherwise. To override, passstoppedin this object.