Skip to main content

TabBar

Import

import TopTabs from '@/components/ui/tabs/TopTabs'; 

Props

PropTypeDefaultDescription
tabsTabItem[]RequiredAn array of tab objects containing a label and a render function.
defaultIndexnumber0Index of the tab to show initially.

Basic Usage

const MyTabs = () => (
<TopTabs
defaultIndex={1}
tabs={[
{
label: 'Overview',
render: () => <Text>This is the Overview tab.</Text>,
},
{
label: 'Details',
render: () => <Text>This is the Details tab.</Text>,
},
]}
/>
);

NOTE: All example can be founded in tabs_preview.tsx