Porsche Design SystemSearchNavigate to GitHub repository of Porsche Design SystemOpen sidebar
ConfiguratorExamplesUsageAccessibilityAPI
Tabs Table of Contents Gradient color If the amount of tabs exceeds the viewport, the component renders arrow-buttons to help with horizontal scrolling. The background and gradient has to align to your chosen background.
Tab Content 1
Open in Stackblitz
<!doctype html>
<html lang="en" class="auto">
<head>
  <title></title>
</head>
<body class="bg-base">

<p-tabs gradient-color="background-surface">
  <p-tabs-item label="Tab 1">
    <p-text>
      Tab Content 1
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 2">
    <p-text>
      Tab Content 2
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 3">
    <p-text>
      Tab Content 3
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 4">
    <p-text>
      Tab Content 4
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 5">
    <p-text>
      Tab Content 5
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 6">
    <p-text>
      Tab Content 6
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 7">
    <p-text>
      Tab Content 7
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 8">
    <p-text>
      Tab Content 8
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 9">
    <p-text>
      Tab Content 9
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 10">
    <p-text>
      Tab Content 10
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 11">
    <p-text>
      Tab Content 11
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 12">
    <p-text>
      Tab Content 12
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 13">
    <p-text>
      Tab Content 13
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 14">
    <p-text>
      Tab Content 14
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 15">
    <p-text>
      Tab Content 15
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 16">
    <p-text>
      Tab Content 16
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 17">
    <p-text>
      Tab Content 17
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 18">
    <p-text>
      Tab Content 18
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 19">
    <p-text>
      Tab Content 19
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab 20">
    <p-text>
      Tab Content 20
    </p-text>
  </p-tabs-item>
</p-tabs>
<script>

</script>
</body>
</html>
Active Tab You may need to change the initial active tab. To do so, set the active-tab-index attribute of p-tabs. Make sure to update the activeTabIndex when adding or removing elements.
Tab Content Two
Open in Stackblitz
<!doctype html>
<html lang="en" class="auto">
<head>
  <title></title>
</head>
<body class="bg-base">

<p-tabs active-tab-index="1">
  <p-tabs-item label="Tab One">
    <p-text>
      Tab Content One
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab Two">
    <p-text>
      Tab Content Two
    </p-text>
  </p-tabs-item>
  <p-tabs-item label="Tab Three">
    <p-text>
      Tab Content Three
    </p-text>
  </p-tabs-item>
</p-tabs>
<script>

</script>
</body>
</html>
Global settingsThemeChanges the theme of the application and any Porsche Design System component. It's possible to choose between forced theme light and dark. It's also possible to use auto, which applies light or dark theme depending on the operating system settings automatically.LightDarkAuto (sync with operating system)DirectionThe dir global attribute in HTML changes the direction of text and other content within an element. It's most often used on the <html> tag to set the entire page's direction, which is crucial for supporting languages that are written from right to left (RTL), such as Arabic and Hebrew. For example, using <html dir="rtl"> makes the entire page display from right to left, adjusting the layout and text flow accordingly.LTR (left-to-right)RTL (right-to-left)Text ZoomTo ensure accessibility and comply with WCAG 2.2 AA standards, it is mandatory for web content to support text resizing up to at least 200% without loss of content or functionality. Using relative units like rem is a best practice for achieving this, as they allow the text to scale uniformly based on the user's browser settings.100%130%150%200%