Components
Tab
Code

Tab

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

Parameters

NameType
propsTabProps & RefAttributes<HTMLButtonElement (opens in a new tab)>

Returns

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

Example

<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 } from '@vtex/shoreline-components'
import { TabList } from '@vtex/shoreline-components'
import { Tab } from '@vtex/shoreline-components'
import { Tab } from '@vtex/shoreline-components'
import { TabPanel } from '@vtex/shoreline-components'
import { 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