Porsche Design SystemSearchNavigate to GitHub repository of Porsche Design SystemOpen sidebar
ConfiguratorExamplesUsageAccessibilityAPI
Select The p-select component is a versatile custom form element that enables the selection of a single options. It can be used within a form or in a controlled manner. When the p-select component is used within a form, it utilizes the ElementInternals API, which has limited browser support. For broader browser compatibility, consider using a controlled approach instead. Many of the properties closely resemble those found in the select-wrapper and other form components (e.g. label, description, state, message, hideLabel, disabled, required & dropdownDirection). Options are slotted using the p-select-option component. Each option needs to have an assigned value, which can be passed via an attribute or property and needs to be of type string. Initial selection states can only be achieved using the value property on the p-select component (More Info). Options don't have a selected attribute or property. If an option should be visible but not selectable, it can be disabled by using the disabled attribute. If the selection isn't required or should be clearable again, you can use an empty p-select-option as default selection (More Info). Hint: The p-select utilizes the Popover API to render its dropdown on the #top-layer which enables it to be shown correctly even when used e.g. within a scroll container.
Option AOption BOption COption DOption EOption F
Open in Stackblitz
<!doctype html>
<html lang="en" class="auto">
<head>
  <title></title>
</head>
<body class="bg-base">

<p-select name="options" label="Some Label" description="Some description">
  <p-select-option value="a">
    Option A
  </p-select-option>
  <p-select-option value="b">
    Option B
  </p-select-option>
  <p-select-option value="c">
    Option C
  </p-select-option>
  <p-select-option value="d">
    Option D
  </p-select-option>
  <p-select-option value="e">
    Option E
  </p-select-option>
  <p-select-option value="f">
    Option F
  </p-select-option>
</p-select>
<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%