Tabs

Tabs are used to organize content into separate views, allowing users to switch between them easily.

Example

Anatomy

<Tabs.Root>
  <Tabs.List>
    <Tabs.Tab value="value" />
  </Tabs.List>
  <Tabs.Content value="value" />
</Tabs.Root>

Usage

import { Tabs } from '@ivaldi/ui'
<Tabs.Root>

  <Tabs.List>
    <Tabs.Tab value="edit">
      <PencilIcon /> Edit
    </Tabs.Tab>
    <Tabs.Tab value="preview">
      <EyeIcon /> Preview
    </Tabs.Tab>
  </Tabs.List>

  <Tabs.Content value="edit">
    <p>Edit your content here.</p>
  </Tabs.Content>
  
  <Tabs.Content value="preview">
    <p>Preview your content here.</p>
  </Tabs.Content>

</Tabs.Root>

Tabs.Root Props

PropTypeDefault
valuestring—
defaultValuestring—
onValueChangefunction—
orientationenum—
direnum—
activationModeenum—
classNamestring—
childrenReactNode—
asChildboolean—

Tabs.Root Props

PropTypeDefault
valuestring—
defaultValuestring—
onValueChangefunction—
orientationenum—
direnum—
activationModeenum—
classNamestring—
childrenReactNode—
asChildboolean—

Tabs.Content Props

PropTypeDefault
valuestring—
forceMounttrue—
classNamestring—
childrenReactNode—
asChildboolean—

Tabs.Indicator Props

PropTypeDefault

Tabs.List Props

PropTypeDefault
loopboolean—
classNamestring—
childrenReactNode—
asChildboolean—
indicatorenum"box"
sizeenum"default"

Tabs.List Props

PropTypeDefault
loopboolean—
classNamestring—
childrenReactNode—
asChildboolean—

Tabs.Trigger Props

PropTypeDefault

Tabs.Trigger Props

PropTypeDefault
valuestring—
typeenum—
classNamestring—
childrenReactNode—
asChildboolean—