Components
TabList
Code

TabList

TabList(props): null | ReactElement<any, string | JSXElementConstructor<any>>

Parameters

NameType
propsTabListProps & RefAttributes<HTMLDivElement (opens in a new tab)>

Returns

null | ReactElement<any, string | JSXElementConstructor<any>>

Example

example.tsx
<TabProvider>
  <TabList>
    <Tab>Tab 1</Tab>
    <Tab>Tab 2</Tab>
  </TabList>
  <TabPanel>Tab 1</TabPanel>
  <TabPanel>Tab 2</TabPanel>
</TabProvider>
import React from 'react'
import { TabProvider, TabList, Tab, TabPanel } from '@vtex/shoreline-components'

export default function App() {
return (<>
<TabProvider>
<TabList>
<Tab>Tab 1</Tab>
<Tab>Tab 2</Tab>
</TabList>
<TabPanel>
Tab 1
</TabPanel>
<TabPanel>
Tab 2
</TabPanel>
</TabProvider>
</>
)}

Defined in

node_modules/.pnpm/@types+react@18.2.14/node_modules/@types/react/ts5.0/index.d.ts:355