> To build a Wix site agentically, or add Wix features like bookings or a store to a site you already have, follow https://www.wix.com/headless/skill.md
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Tabs Component

## Article: Tabs Component

## Article Link: https://dev.wix.com/docs/wix-design-system/components/navigation/tabs-component.md

## Article Content:

# Tabs

_Components/Navigation_

Interactive docs page: <https://wix-pages.com/design-system-documentation/#/component/tabs>

## Overview

```jsx
() => {
  const [activeId, setActiveId] = React.useState(1);

  return (
    <Tabs
      activeId={activeId}
      onClick={(value) => setActiveId(Number(value.id))}
      items={[
        { id: 1, title: 'Published' },
        { id: 2, title: 'Draft' },
        { id: 3, title: 'Archived' },
      ]}
    />
  );
};
```

Tabs enable users to navigate between different content sections on the same page, card, or a panel.

### Do

- Use it to organize multiple content sections within the same context.
- Use it to enhance usability by grouping information or forms into smaller, easily digestible parts.
- Use short and descriptive tab titles.

### Don't

- Don't use it to group unrelated content.
- Don't use it to navigate to other pages. Use `<Sidebar/>`, `<Breadcrumbs/>` or links instead.
- Don't use it to show the path users need to follow to complete a process. Use `<Stepper/>` instead.

### Feature examples

#### Size

Control tabs size with `size` prop:

- Use `small` in dense layouts, like narrow panels.
- Use `smallMedium` in layouts that sit between dense and standard.
- Use `medium` (default) in all other layouts, like below `<Page.Header/>`.

```jsx
() => {
  const [activeId, setActiveId] = React.useState(2);

  return (
    <Box direction="vertical" gap="24px">
      <Tabs
        size="small"
        activeId={activeId}
        onClick={(value) => setActiveId(Number(value.id))}
        items={[
          { id: 1, title: 'Small' },
          { id: 2, title: 'Small' },
        ]}
      />
      <Tabs
        size="smallMedium"
        activeId={activeId}
        onClick={(value) => setActiveId(Number(value.id))}
        items={[
          { id: 1, title: 'Small medium' },
          { id: 2, title: 'Small medium' },
        ]}
      />
      <Tabs
        size="medium"
        activeId={activeId}
        onClick={(value) => setActiveId(Number(value.id))}
        items={[
          { id: 1, title: 'Medium' },
          { id: 2, title: 'Medium' },
        ]}
      />
    </Box>
  );
};
```

#### Min width

By default, tabs fill in the entire width of their parent container and have a minimum width of 628 px.

Set custom min width of tabs using the `minWidth` prop.

```jsx
() => {
  const [activeId, setActiveId] = React.useState(2);

  return (
    <StorybookComponents.Stack flexDirection="column">
      <Tabs
        activeId={activeId}
        onClick={(value) => setActiveId(Number(value.id))}
        items={[
          { id: 1, title: 'Default' },
          { id: 2, title: 'Default' },
        ]}
      />
      <Box>
        <Tabs
          minWidth="360px"
          activeId={activeId}
          onClick={(value) => setActiveId(Number(value.id))}
          items={[
            { id: 1, title: 'Min width' },
            { id: 2, title: 'Min width' },
          ]}
        />
      </Box>
    </StorybookComponents.Stack>
  );
};
```

#### Type

Control how tabs are positioned with `type` prop:

- By default, each tab grows with its title. Side paddings are inside tabs.
- `compact` - each tab grows with its title. Side paddings are outside tabs.
- `compactSide` - each tab grows with its title. Side paddings are outside tabs. The first and the last tab has no left and right paddings respectively.
- `uniformSide` - each tab grows to the size defined in `width` prop. If tab content is longer than the `width`, it gets truncated by ellipsis. Side paddings are inside tabs.
- `uniformFull` - all tabs grow equally to fill in the whole container. Side paddings are inside tabs.

```jsx
() => {
  const [activeId, setActiveId] = React.useState(1);

  return (
    <StorybookComponents.Stack flexDirection="column">
      <Box direction="vertical" gap="1">
        <Text secondary weight="normal">
          Default
        </Text>
        <Tabs
          items={[
            { id: 1, title: 'Tab' },
            { id: 2, title: 'Tab' },
            { id: 3, title: 'Tab' },
          ]}
          activeId={activeId}
          onClick={(value) => setActiveId(Number(value.id))}
        />
      </Box>
      <Box direction="vertical" gap="1">
        <Text secondary weight="normal">
          Compact
        </Text>
        <Tabs
          type="compact"
          items={[
            { id: 1, title: 'Tab' },
            { id: 2, title: 'Tab' },
            { id: 3, title: 'Tab' },
          ]}
          activeId={activeId}
          onClick={(value) => setActiveId(Number(value.id))}
        />
      </Box>
      <Box direction="vertical" gap="1">
        <Text secondary weight="normal">
          Compact side
        </Text>
        <Tabs
          type="compactSide"
          items={[
            { id: 1, title: 'Tab' },
            { id: 2, title: 'Tab' },
            { id: 3, title: 'Tab' },
          ]}
          activeId={activeId}
          onClick={(value) => setActiveId(Number(value.id))}
        />
      </Box>
      <Box direction="vertical" gap="1">
        <Text secondary weight="normal">
          Uniform side
        </Text>
        <Tabs
          type="uniformSide"
          width={120}
          items={[
            { id: 1, title: 'Tab' },
            { id: 2, title: 'Tab' },
            { id: 3, title: 'Tab' },
          ]}
          activeId={activeId}
          onClick={(value) => setActiveId(Number(value.id))}
        />
      </Box>
      <Box direction="vertical" gap="1">
        <Text secondary weight="normal">
          Uniform full
        </Text>
        <Tabs
          type="uniformFull"
          items={[
            { id: 1, title: 'Tab' },
            { id: 2, title: 'Tab' },
            { id: 3, title: 'Tab' },
          ]}
          activeId={activeId}
          onClick={(value) => setActiveId(Number(value.id))}
        />
      </Box>
    </StorybookComponents.Stack>
  );
};
```

#### Disabled tab

Set `disabled` on an item to make that tab non-interactive and render it in a muted state.

```jsx
() => {
  const [activeId, setActiveId] = React.useState(1);

  return (
    <Tabs
      items={[
        { id: 1, title: 'Details' },
        { id: 2, title: 'Pricing' },
        { id: 3, title: 'Shipping', disabled: true },
        { id: 4, title: 'Preview' },
      ]}
      activeId={activeId}
      onClick={(value) => setActiveId(Number(value.id))}
    />
  );
};
```

#### Alignment

Control text alignment inside tabs with `alignment` prop. It supports 3 options:

- Use `start` (default) to align tab titles to to the left.
- Use `center` to align them to the middle.
- Use `end` to align them to the right.

```jsx
() => {
  const [activeId, setActiveId] = React.useState(1);

  return (
    <StorybookComponents.Stack flexDirection="column">
      <Tabs
        alignment="start"
        type="uniformFull"
        items={[
          { id: 1, title: 'Start' },
          { id: 2, title: 'Start' },
        ]}
        activeId={activeId}
        onClick={(value) => setActiveId(Number(value.id))}
      />
      <Tabs
        alignment="center"
        type="uniformFull"
        items={[
          { id: 1, title: 'Center' },
          { id: 2, title: 'Center' },
        ]}
        activeId={activeId}
        onClick={(value) => setActiveId(Number(value.id))}
      />
      <Tabs
        alignment="end"
        type="uniformFull"
        items={[
          { id: 1, title: 'End' },
          { id: 2, title: 'End' },
        ]}
        activeId={activeId}
        onClick={(value) => setActiveId(Number(value.id))}
      />
    </StorybookComponents.Stack>
  );
};
```

#### Bottom divider

Control if the default bottom divider is shown with `hasDivider` prop.

```jsx
() => {
  const [activeId, setActiveId] = React.useState(1);

  return (
    <StorybookComponents.Stack flexDirection="column">
      <Tabs
        activeId={activeId}
        onClick={(value) => setActiveId(Number(value.id))}
        items={[
          { id: 1, title: 'Default' },
          { id: 2, title: 'Default' },
        ]}
      />
      <Tabs
        hasDivider={false}
        activeId={activeId}
        onClick={(value) => setActiveId(Number(value.id))}
        items={[
          { id: 1, title: 'No divider' },
          { id: 2, title: 'No divider' },
        ]}
      />
    </StorybookComponents.Stack>
  );
};
```

#### Side content

Add any component to the end of tabs with `sideContent` prop.

For example, use it to store a filter or form actions like Save and Cancel.

```jsx
() => {
  const [activeId, setActiveId] = React.useState(1);

  return (
    <Tabs
      activeId={activeId}
      onClick={(value) => setActiveId(Number(value.id))}
      items={[
        { id: 1, title: 'Tab' },
        { id: 2, title: 'Tab' },
      ]}
      sideContent=<StorybookComponents.Placeholder>
        Side content
      </StorybookComponents.Placeholder>
    />
  );
};
```

#### Scroll

When `Tabs` do not have enough space to be fully shown, a horizontal scroll will be enabled.

```jsx
() => {
  const [activeId, setActiveId] = React.useState(2);

  return (
    <Tabs
      activeId={activeId}
      onClick={(value) => setActiveId(Number(value.id))}
      items={[
        { id: 1, title: 'Tab' },
        { id: 2, title: 'Tab' },
        { id: 3, title: 'Tab' },
      ]}
    />
  );
};
```

### Common use case examples

#### In a page

Use tabs to divide all page contents into shorter, digestible parts.

Divide content in a way that allows users completing their task under each tab independently.

```jsx
() => {
  const [activeId, setActiveId] = React.useState(1);

  const tabContent = {
    1: (
      <Card>
        <Card.Header
          title="General (RSVP event)"
          subtitle={
            <Box gap="1">
              <Text skin="standard" secondary>
                Guests register by submitting yes & no responses.
              </Text>
              <TextButton underline="always">Learn More</TextButton>
            </Box>
          }
        />
        <Card.Divider />
        <Card.Content>
          <Layout>
            <Cell span={8}>
              <Layout>
                <Cell>
                  <FormField label="Event name">
                    <Input value="90s Rock Concert" />
                  </FormField>
                </Cell>
                <Cell>
                  <FormField label="Short teaser (optional)">
                    <InputArea
                      placeholder="Add a few words under the name of the event to inspire guests, e.g., An unforgettable show!"
                      resizable
                      rows={3}
                    />
                  </FormField>
                </Cell>
              </Layout>
            </Cell>
            <Cell span={4}>
              <FormField label="Event cover">
                <ImageViewer width="100%" height="168px" />
              </FormField>
            </Cell>
          </Layout>
        </Card.Content>
      </Card>
    ),

    2: (
      <Card>
        <MarketingLayout
          title="Customize your own automated emails"
          description="Design customized emails and set the automated triggers. Remember to disable the relevant default email above if you're creating your own branded emails."
          actions={
            <Button size="small" priority="secondary">
              Create Automations
            </Button>
          }
          image={
            <Box width="100%" align="right">
              <Image
                width="120px"
                src="PromotionalPromoteMarketingHomeEmail.svg"
                transparent
              />
            </Box>
          }
        />
      </Card>
    ),

    3: (
      <EmptyState
        theme={'page-no-border'}
        title="Start inviting guests"
        subtitle="Once guests RSVP to your event, you’ll see their info here. To get started, send an invite."
      >
        {<TextButton prefixIcon={<Icons.Add />}>Create Invitation</TextButton>}
      </EmptyState>
    ),
  };

  return (
    <Page>
      <Page.Header
        breadcrumbs={
          <Breadcrumbs
            activeId="2"
            items={[
              { id: '1', value: 'Events' },
              { id: '2', value: '90s Rock Concert' },
            ]}
            onClick={() => {}}
          />
        }
        showBackButton
        onBackClicked={() => {}}
        title="90s Rock Concert"
        actionsBar=<Box gap="2" height="60px">
          <Button priority="secondary">Cancel</Button>
          <Button>Save</Button>
        </Box>
      />
      <Page.Content>
        <Layout>
          <Cell>
            <Tabs
              activeId={activeId}
              onClick={(value) => setActiveId(Number(value.id))}
              items={[
                { id: 1, title: 'Event details' },
                { id: 2, title: 'Emails' },
                { id: 3, title: 'Guest list' },
              ]}
            />
          </Cell>
          <Cell>{tabContent[activeId]}</Cell>
        </Layout>
      </Page.Content>
    </Page>
  );
};
```

#### In a panel

Let users switch between parts of content in the same context of a `<SidePanel/>`.

Select to show either panel divider or a default tabs' divider to separate panel header from its main content.

```jsx
() => {
  const [selectedSidebar, setSelectedSidebar] = React.useState(0);
  const [activeTab, setActiveTab] = React.useState(0);
  const [toggleImage, setToggleImage] = React.useState(true);
  const [togglePosts, setTogglePosts] = React.useState(false);
  const [toggleCommenting, setToggleCommenting] = React.useState(false);
  const [descriptionValue, setDescriptionValue] = React.useState('');
  const [authorTags, setAuthorTags] = React.useState([]);
  const [publishDate, setPublishDate] = React.useState(null);
  const [author, setAuthor] = React.useState(null);

  const items = [
    {
      id: 0,
      label: 'Settings',
      icon: <Icons.Settings />,
    },
    {
      id: 1,
      label: 'Categories',
      icon: <Icons.Category />,
    },
    {
      id: 2,
      label: 'Tags',
      icon: <Icons.Tag />,
    },
  ];

  const authorOptions = [
    listItemSelectBuilder({
      id: 0,
      prefix: <Avatar size="size18" />,
      title: 'Doe John',
      label: 'Doe John',
    }),
    listItemSelectBuilder({
      id: 1,
      prefix: <Avatar size="size18" />,
      title: 'John Doe',
      label: 'John Doe',
    }),
    listItemActionBuilder({
      id: 2,
      title: 'New Author',
      prefixIcon: <Icons.Add />,
    }),
  ];

  const handleSelectTag = (tag, previousTags, setTags) =>
    setTags([...previousTags, { id: tag.id, label: tag.value }]);

  const handleRemoveTag = (tag, previousTags, setTags) =>
    setTags(previousTags.filter((currTag) => currTag.id !== tag));

  const renderSettingsPanel = () => (
    <SidePanel width="300px" onCloseButtonClick={() => {}}>
      <SidePanel.Header title="Post Settings" showDivider={false}>
        <Tabs
          items={[
            { id: 0, title: 'General' },
            { id: 1, title: 'Advanced' },
          ]}
          activeId={activeTab}
          type="uniformSide"
          width="114px"
          onClick={(value) => setActiveTab(Number(value.id))}
        />
      </SidePanel.Header>
      <SidePanel.Content>
        {activeTab === 0 && (
          <Box direction="vertical" gap="24px">
            <FormField label="Display cover image" labelPlacement="left">
              <ToggleSwitch
                checked={toggleImage}
                onChange={() => setToggleImage(!toggleImage)}
              />
            </FormField>
            {toggleImage && (
              <Cell>
                <Box height="120px">
                  <AddItem theme="image" tooltipContent="Add Item" />
                </Box>
              </Cell>
            )}
            <FormField label="Publish date">
              <DatePicker
                width="100%"
                placeholderText="Publish Now"
                popoverProps={{ appendTo: 'scrollParent' }}
                autoFocus={false}
                value={publishDate}
                onChange={(date) => setPublishDate(date)}
              />
            </FormField>
            <FormField label="Author">
              <AutoComplete
                placeholder="Select Author"
                options={authorOptions}
                selectedId={author}
                popoverProps={{ appendTo: 'window' }}
                value={author}
                onSelect={(option) => setAuthor(option.label)}
                onChange={(event) => setAuthor(event.target.value)}
              />
            </FormField>
            <FormField label="Set as featured post" labelPlacement="left">
              <ToggleSwitch
                checked={togglePosts}
                onChange={() => setTogglePosts(!togglePosts)}
              />
            </FormField>
          </Box>
        )}
        {activeTab === 1 && (
          <Box direction="vertical" gap="24px">
            <FormField label="Description">
              <InputArea
                placeholder="Add a description..."
                value={descriptionValue}
                onChange={(e) => setDescriptionValue(e.target.value)}
                maxLength={140}
                hasCounter
              />
            </FormField>
            <FormField label="Related post">
              <MultiSelect
                tags={authorTags}
                options={[
                  { id: '1', value: 'British authors' },
                  { id: '2', value: 'French authors' },
                ]}
                customSuffix={
                  <Box>
                    <TextButton prefixIcon={<Icons.Add />}>
                      Add Posts
                    </TextButton>
                  </Box>
                }
                onSelect={(tag) =>
                  handleSelectTag(tag, authorTags, setAuthorTags)
                }
                onRemoveTag={(tag) =>
                  handleRemoveTag(tag, authorTags, setAuthorTags)
                }
              />
            </FormField>
            <FormField label="Enable commenting" labelPlacement="left">
              <ToggleSwitch
                checked={toggleCommenting}
                onChange={() => setToggleCommenting(!toggleCommenting)}
              />
            </FormField>
          </Box>
        )}
      </SidePanel.Content>
    </SidePanel>
  );

  return (
    <Layout gap={0}>
      <Cell>
        <ComposerHeader backButtonValue="Back">
          <ComposerHeader.Actions justifyContent="flex-end">
            <ToggleButton labelValue="Undo">
              <Icons.Undo />
            </ToggleButton>
            <ToggleButton labelValue="Redo">
              <Icons.Redo />
            </ToggleButton>
          </ComposerHeader.Actions>
          <ComposerHeader.MainActions>
            <Button skin="inverted">Preview</Button>
            <Button>Publish</Button>
          </ComposerHeader.MainActions>
        </ComposerHeader>
      </Cell>
      <Cell>
        <Box direction="vertical">
          <Box gap="0" height="600px">
            <ComposerSidebar
              labelPlacement="bottom"
              items={items}
              selectedId={0}
            />

            {selectedSidebar === 0 && renderSettingsPanel()}

            <Box backgroundColor="D70" width="100%">
              <Box width="100%" padding={4}>
                <StorybookComponents.Placeholder>
                  <Box verticalAlign="middle" align="center" height="100%">
                    <Text>Composer content area</Text>
                  </Box>
                </StorybookComponents.Placeholder>
              </Box>
            </Box>
          </Box>
        </Box>
      </Cell>
    </Layout>
  );
};
```

#### With scroll

If there are several tabs, that do not fit into a narrow layout, let users navigation between them with `scroll`.

```jsx
() => {
  const [selectedSidebar, setSelectedSidebar] = React.useState(0);
  const [activeTab, setActiveTab] = React.useState(0);
  const [toggleImage, setToggleImage] = React.useState(true);
  const [togglePosts, setTogglePosts] = React.useState(false);
  const [toggleCommenting, setToggleCommenting] = React.useState(false);
  const [descriptionValue, setDescriptionValue] = React.useState('');
  const [authorTags, setAuthorTags] = React.useState([]);
  const [publishDate, setPublishDate] = React.useState(null);
  const [author, setAuthor] = React.useState(null);

  const items = [
    {
      id: 0,
      label: 'Settings',
      icon: <Icons.Settings />,
    },
    {
      id: 1,
      label: 'Categories',
      icon: <Icons.Category />,
    },
    {
      id: 2,
      label: 'Tags',
      icon: <Icons.Tag />,
    },
  ];

  const authorOptions = [
    listItemSelectBuilder({
      id: 0,
      prefix: <Avatar size="size18" />,
      title: 'Doe John',
      label: 'Doe John',
    }),
    listItemSelectBuilder({
      id: 1,
      prefix: <Avatar size="size18" />,
      title: 'John Doe',
      label: 'John Doe',
    }),
    listItemActionBuilder({
      id: 2,
      title: 'New Author',
      prefixIcon: <Icons.Add />,
    }),
  ];

  const handleSelectTag = (tag, previousTags, setTags) =>
    setTags([...previousTags, { id: tag.id, label: tag.value }]);

  const handleRemoveTag = (tag, previousTags, setTags) =>
    setTags(previousTags.filter((currTag) => currTag.id !== tag));

  const renderSettingsPanel = () => (
    <SidePanel width="300px" onCloseButtonClick={() => {}}>
      <SidePanel.Header title="Post Settings" showDivider={false}>
        <Tabs
          items={[
            { id: 0, title: 'Published' },
            { id: 1, title: 'Reported' },
            { id: 3, title: 'Drafts' },
            { id: 4, title: 'Trash' },
          ]}
          activeId={activeTab}
          type="uniformSide"
          width="114px"
          onClick={(value) => setActiveTab(Number(value.id))}
        />
      </SidePanel.Header>
      <SidePanel.Content>
        {activeTab === 0 && (
          <Box direction="vertical" gap="24px">
            <FormField label="Display cover image" labelPlacement="left">
              <ToggleSwitch
                checked={toggleImage}
                onChange={() => setToggleImage(!toggleImage)}
              />
            </FormField>
            {toggleImage && (
              <Cell>
                <Box height="120px">
                  <AddItem theme="image" tooltipContent="Add Item" />
                </Box>
              </Cell>
            )}
            <FormField label="Publish date">
              <DatePicker
                width="100%"
                placeholderText="Publish Now"
                popoverProps={{ appendTo: 'scrollParent' }}
                autoFocus={false}
                value={publishDate}
                onChange={(date) => setPublishDate(date)}
              />
            </FormField>
            <FormField label="Author">
              <AutoComplete
                placeholder="Select Author"
                options={authorOptions}
                selectedId={author}
                popoverProps={{ appendTo: 'window' }}
                value={author}
                onSelect={(option) => setAuthor(option.label)}
                onChange={(event) => setAuthor(event.target.value)}
              />
            </FormField>
            <FormField label="Set as featured post" labelPlacement="left">
              <ToggleSwitch
                checked={togglePosts}
                onChange={() => setTogglePosts(!togglePosts)}
              />
            </FormField>
          </Box>
        )}
        {activeTab === 1 && (
          <Box direction="vertical" gap="24px">
            <FormField label="Description">
              <InputArea
                placeholder="Add a description..."
                value={descriptionValue}
                onChange={(e) => setDescriptionValue(e.target.value)}
                maxLength={140}
                hasCounter
              />
            </FormField>
            <FormField label="Related post">
              <MultiSelect
                tags={authorTags}
                options={[
                  { id: '1', value: 'British authors' },
                  { id: '2', value: 'French authors' },
                ]}
                customSuffix={
                  <Box>
                    <TextButton prefixIcon={<Icons.Add />}>
                      Add Posts
                    </TextButton>
                  </Box>
                }
                onSelect={(tag) =>
                  handleSelectTag(tag, authorTags, setAuthorTags)
                }
                onRemoveTag={(tag) =>
                  handleRemoveTag(tag, authorTags, setAuthorTags)
                }
              />
            </FormField>
            <FormField label="Enable commenting" labelPlacement="left">
              <ToggleSwitch
                checked={toggleCommenting}
                onChange={() => setToggleCommenting(!toggleCommenting)}
              />
            </FormField>
          </Box>
        )}
      </SidePanel.Content>
    </SidePanel>
  );

  return (
    <Layout gap={0}>
      <Cell>
        <ComposerHeader backButtonValue="Back">
          <ComposerHeader.Actions justifyContent="flex-end">
            <ToggleButton labelValue="Undo">
              <Icons.Undo />
            </ToggleButton>
            <ToggleButton labelValue="Redo">
              <Icons.Redo />
            </ToggleButton>
          </ComposerHeader.Actions>
          <ComposerHeader.MainActions>
            <Button skin="inverted">Preview</Button>
            <Button>Publish</Button>
          </ComposerHeader.MainActions>
        </ComposerHeader>
      </Cell>
      <Cell>
        <Box direction="vertical">
          <Box gap="0" height="600px">
            <ComposerSidebar
              labelPlacement="bottom"
              items={items}
              selectedId={0}
            />

            {selectedSidebar === 0 && renderSettingsPanel()}

            <Box backgroundColor="D70" width="100%">
              <Box width="100%" padding={4}>
                <StorybookComponents.Placeholder>
                  <Box verticalAlign="middle" align="center" height="100%">
                    <Text>Composer content area</Text>
                  </Box>
                </StorybookComponents.Placeholder>
              </Box>
            </Box>
          </Box>
        </Box>
      </Cell>
    </Layout>
  );
};
```

## Code

```jsx
import { Tabs } from '@wix/design-system';
```

### Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `activeId` | `string \| number` | — | A selected tab id. |
| `alignment` | `"center" \| "end" \| "start"` | — | Control text alignment in tab item. |
| `dataHook` | `string` | — | Applied as data-hook HTML attribute that can be used in the tests. |
| `hasDivider` | `boolean` | — | Specifies whether to display a divider at the bottom of the tabs when `showDivider` isn't set. |
| `horizontalPadding` | `boolean` | `true` | If true, adds horizontal padding to the tabs container. |
| `horizontalScrollProps` | `HorizontalScrollCommonProps` | — | Allows to pass all common horizontal scroll props. |
| `items` *(required)* | `Item[]` | — | An array of tabs. |
| `minWidth` | `string \| number` | — | A minimum width of the container. |
| `onClick` | `(item: Item) => void` | — | Click event handler. |
| `scrollOnOverflow` | `boolean` | `false` | Wraps overflowing content within a scrollable container. |
| `showDivider` | `boolean` | — | If true, places a divider on bottom. |
| `sideContent` | `ReactNode` | — | Can be either string or renderable node. |
| `size` | `"small" \| "medium" \| "smallMedium"` | — | One of: medium, small, smallMedium. |
| `type` | `"compact" \| "compactSide" \| "uniformSide" \| "uniformFull"` | — | One of: '', compact, compactSide, uniformSide, uniformFull. |
| `width` | `string \| number` | — | A specific width of a tab (only for uniformSide type) |

## Testkit

Import the driver matching your test environment:

```jsx
// UniDriver
import { TabsUniDriver } from '@wix/design-system/dist/testkit/unidriver';

// Vanilla
import { TabsTestkit } from '@wix/design-system/dist/testkit';

// Puppeteer
import { TabsTestkit } from '@wix/design-system/dist/testkit/puppeteer';

// Testing Library
import { TabsTestkit } from '@wix/design-system/dist/testkit/testing-library';
```

### Driver methods

| Method | Description |
| --- | --- |
| `getTitles` | Gets all titles text |
| `clickTabAt` | Clicks the tab at index |
| `getActiveTabIndex` | Gets active tab index |
| `isDefaultType` | Checks whether tabs type is default |
| `getItemsContainerType` | Gets tabs container type |
| `getDataHook` | Gets the data-hook |
| `getItemsWidth` | Gets a set of tabs widths |
| `hasDivider` | Checks whether tabs has a divider |
| `sideContent` | Gets the side content |
| `getSideContent` | — |
| `getItemsMaxWidths` | Gets tabs max widths |
| `getItemsMinWidths` | Gets tabs min widths |
| `isTabDisabled` | Checks whether the tab at index is disabled |
| `exists` | Checks whether the component found with the given data hook. |
| `element` | Gets the component root element. |
| `click` | Clicks on the component root element. |
| `base` | Returns UniDriver for the base element. |

## Changelog

- **1.340.0** (2026-10-21) — maintenance release, no component-specific changes
- **1.339.0** (2026-10-19) — maintenance release, no component-specific changes
- **1.338.0** (2026-10-15) — maintenance release, no component-specific changes
- **1.332.0** (2026-10-05) — maintenance release, no component-specific changes
- **1.331.0** (2026-10-01) — maintenance release, no component-specific changes
- **1.330.0** (2026-09-28) — maintenance release, no component-specific changes
- **1.329.0** (2026-09-24) — maintenance release, no component-specific changes
- **1.325.0** (2026-09-17) — maintenance release, no component-specific changes
- **1.323.0** (2026-09-10) — maintenance release, no component-specific changes
- **1.310.0** (2026-08-10) — feat: add `disabled` prop to `Item` — renders the tab in a visually muted state and prevents interaction while keeping it focusable. ([#16744](invalid-url)) — has visual changes
- **1.295.0** (2026-07-03) — feat: add smallMedium size and refresh odeditor active/hover fills ([#16466](invalid-url)) — has visual changes
- **1.292.0** (2026-06-22) — maintenance release, no component-specific changes
- **1.291.0** (2026-06-19) — maintenance release, no component-specific changes
- **1.279.0** (2026-05-13) — feat: add label font-size/line-height medium tokens for odeditor ([#16236](invalid-url))
- **1.278.0** (2026-05-08) — fix: fix default tabText font size ([#16255](invalid-url)) — has visual changes
- **1.277.0** (2026-05-07) — fix: fix device hover support affecting active tab styles ([#16233](invalid-url))
- **1.273.0** (2026-04-30) — maintenance release, no component-specific changes
- **1.266.0** (2026-04-07) — maintenance release, no component-specific changes
- **1.260.0** (2026-03-17) — maintenance release, no component-specific changes
- **1.254.0** (2026-02-03) — maintenance release, no component-specific changes
- **1.247.2** (2026-01-21) — maintenance release, no component-specific changes
- **1.232.0** (2025-11-28) — feat: added default horizontal padding on editor3 ([#15560](invalid-url))
- **1.229.0** (2025-11-18) — feat: add wds-border-width-varied and apply to divider ([#15528](invalid-url))
- **1.213.0** (2025-08-19) — maintenance release, no component-specific changes
- **1.212.0** (2025-08-11) — maintenance release, no component-specific changes
- **1.208.0** (2025-07-25) — breaking: editor3 tokenization ([#15117](invalid-url))
- **1.197.0** (2025-06-06) — maintenance release, no component-specific changes
- **1.172.1** (2025-03-21) — maintenance release, no component-specific changes
- **1.172.0** (2025-03-20) — feat: integrate horizontal scrolling ([#14554](invalid-url))
- **1.162.0** (2025-02-17) — feat: introduce affix nodes (prefix & suffix) ([#14502](invalid-url))
- **1.155.0** (2025-01-23) — maintenance release, no component-specific changes
- **1.138.1** (2024-10-30) — maintenance release, no component-specific changes
- **1.120.0** (2024-08-02) — maintenance release, no component-specific changes
- **1.115.0** (2024-07-17) — maintenance release, no component-specific changes
- **1.106.0** (2024-05-24) — maintenance release, no component-specific changes
- **1.102.0** (2024-04-16) — maintenance release, no component-specific changes
- **1.93.0** (2024-02-08) — maintenance release, no component-specific changes
- **1.92.1** (2024-02-05) — maintenance release, no component-specific changes