Porsche Design SystemSearchNavigate to GitHub repository of Porsche Design SystemOpen sidebar
ConfiguratorExamplesUsageAccessibilityAPI
Tag Table of Contents With slotted button It is possible to add a <button> tag into the p-tag component. If you do this, the entire component becomes clickable and no other content outside the button or link is allowed.
Open in Stackblitz
<!doctype html>
<html lang="en" class="auto">
<head>
  <title></title>
</head>
<body class="bg-base">

<div class="flex flex-wrap gap-static-md">
  <p-tag icon="car" color="background-base">
    <button type="button">
      Color background-base
    </button>
  </p-tag>
  <p-tag color="background-surface">
    <button type="button">
      Color background-surface
    </button>
  </p-tag>
  <p-tag color="background-default">
    <button type="button">
      Color background-default
    </button>
  </p-tag>
  <p-tag color="background-frosted">
    <button type="button">
      Color background-frosted
    </button>
  </p-tag>
  <p-tag color="primary">
    <button type="button">
      Color primary
    </button>
  </p-tag>
  <p-tag color="notification-info-soft">
    <button type="button">
      Color notification-info-soft
    </button>
  </p-tag>
  <p-tag color="notification-warning-soft">
    <button type="button">
      Color notification-warning-soft
    </button>
  </p-tag>
  <p-tag color="notification-success-soft">
    <button type="button">
      Color notification-success-soft
    </button>
  </p-tag>
  <p-tag color="notification-error-soft">
    <button type="button">
      Color notification-error-soft
    </button>
  </p-tag>
</div>
<script>

</script>
</body>
</html>
With slotted link It is possible to add <a> tag into the p-tag component. If you do this, the entire component becomes clickable and no other content outside the button or link is allowed.
Open in Stackblitz
<!doctype html>
<html lang="en" class="auto">
<head>
  <title></title>
</head>
<body class="bg-base">

<div class="flex flex-wrap gap-static-md">
  <p-tag icon="car" color="background-base">
    <a href="https://porsche.com">
      Color background-base
    </a>
  </p-tag>
  <p-tag color="background-surface">
    <a href="https://porsche.com">
      Color background-surface
    </a>
  </p-tag>
  <p-tag color="background-default">
    <a href="https://porsche.com">
      Color background-default
    </a>
  </p-tag>
  <p-tag color="background-frosted">
    <a href="https://porsche.com">
      Color background-frosted
    </a>
  </p-tag>
  <p-tag color="primary">
    <a href="https://porsche.com">
      Color primary
    </a>
  </p-tag>
  <p-tag color="notification-info-soft">
    <a href="https://porsche.com">
      Color notification-info-soft
    </a>
  </p-tag>
  <p-tag color="notification-warning-soft">
    <a href="https://porsche.com">
      Color notification-warning-soft
    </a>
  </p-tag>
  <p-tag color="notification-success-soft">
    <a href="https://porsche.com">
      Color notification-success-soft
    </a>
  </p-tag>
  <p-tag color="notification-error-soft">
    <a href="https://porsche.com">
      Color notification-error-soft
    </a>
  </p-tag>
</div>
<script>

</script>
</body>
</html>
Multiline The contents of the p-tag component are rendered with white-space: nowrap by default. If multiline rendering is needed (e.g. due to less amount of space), the default behaviour can be overwritten with CSS from outside.
Some label with longer text wrapped in a narrow container
Open in Stackblitz
<!doctype html>
<html lang="en" class="auto">
<head>
  <title></title>
</head>
<body class="bg-base">

<div class="w-[100px]">
  <p-tag color="notification-success-soft" class="whitespace-normal">
    Some label with longer text wrapped in a narrow container
  </p-tag>
</div>
<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%