The $appearance prop sets tab styles for various backgrounds, including a light version
for dark backgrounds. It's responsive, allowing
breakpoint-specific adjustments.
'default' | 'light'
$fill
boolean
false
Dictates whether the Tabs proportionately fill the available space. This prop is
responsive and can be used to set the $fill value at
different breakpoints.
id
string
The id attribute assigns the relevant ARIA attributes to establish a semantic relationship
between the Tab and its corresponding Panel.
onTabClick
(index: number) => void
The onTabClick callback triggers when a tab is clicked, providing the index of the clicked
tab as a number. This enables custom actions based on the specific tab interaction.
Tabs.Tab
Prop
Type
Default
Description
$active
boolean
Indicates the current tab selection.
$hover
boolean
Indicates if a tab is being hovered over.
$theme
string
The theme of the active indicator as a Sky gradient Note: if $appearance is set to light, the theme will be ignored.
Basic Tabs
<Tabsid="example-1">
<Tabs.Tab>
Video Doorbell
</Tabs.Tab>
<Tabs.Tab>
Indoor Camera
</Tabs.Tab>
<Tabs.Tab>
Motion & Contact Sensors
</Tabs.Tab>
<Tabs.Panel>
See who’s at your door from anywhere on your smart phone. Even chat with them.
</Tabs.Panel>
<Tabs.Panel>
The ultimate house sitter. Keeps an eye on any room.
</Tabs.Panel>
<Tabs.Panel>
If something moves or opens when it shouldn’t, you’ll know via the Sky Protect app.
</Tabs.Panel>
</Tabs>
Tabs Props
$appearance
$appearance can be set to light or default to provide contrast with backgrounds.
<Tabsid="example-2"$appearance="light">
<Tabs.Tab$active>
Video Doorbell
</Tabs.Tab>
<Tabs.Tab>
Indoor Camera
</Tabs.Tab>
<Tabs.Tab>
Motion & Contact Sensors
</Tabs.Tab>
<Tabs.Panel>
<Text$color="white">See who’s at your door from anywhere on your smart phone. Even chat with them.</Text>
</Tabs.Panel>
<Tabs.Panel>
<Text$color="white">The ultimate house sitter. Keeps an eye on any room.</Text>
</Tabs.Panel>
<Tabs.Panel>
<Text$color="white">If something moves or opens when it shouldn’t, you’ll know via the Sky Protect app.</Text>
</Tabs.Panel>
</Tabs>
$fill
Set $fill to have Tabs proportionately take up the available space
<Tabsid="example-3"$fill={{xs:false,md:true}}>
<Tabs.Tab$active>
Video Doorbell
</Tabs.Tab>
<Tabs.Tab>
Indoor Camera
</Tabs.Tab>
<Tabs.Tab>
Motion & Contact Sensors
</Tabs.Tab>
<Tabs.Panel>
See who’s at your door from anywhere on your smart phone. Even chat with them.
</Tabs.Panel>
<Tabs.Panel>
The ultimate house sitter. Keeps an eye on any room.
</Tabs.Panel>
<Tabs.Panel>
If something moves or opens when it shouldn’t, you’ll know via the Sky Protect app.
</Tabs.Panel>
</Tabs>
id
The id attribute sets the appropriate aria attributes to provide semantic relationship between the Tab and Panel.
<Tabsid="example-4">
The id is essential for the Tabs to function correctly and must be a unique value when
multiple Tabs are used on a page.
OnTabClick
The onTabClick callback is triggered when a tab is clicked. It receives the index of the clicked tab as a number. This allows you to determine which tab was activated and perform additional actions or updates based on the selected tab.