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)DirectionChanges the direction of HTML elements, mostly used on<html> tag to support languages which are read from right to left like e.g. Arabic.LTR (left-to-right)RTL (right-to-left)AutoText ZoomChanges the text size and values with unit rem or em relatively. This setting can be defined in browser settings for any website or by an application itself on<html> tag. To achieve WCAG 2.2 AA compliance it's obligatory to support text zoom up to at least 200%.100%130%150%200%