@porsche-design-system/components-angular 4.5.0 → 4.6.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/bin/pds-skill.js +259 -0
  3. package/fesm2022/porsche-design-system-components-angular.mjs.map +1 -1
  4. package/package.json +5 -2
  5. package/skill/SKILL.md +124 -0
  6. package/skill/references/components/p-accordion/examples/Default.ts +26 -0
  7. package/skill/references/components/p-accordion/examples/InteractiveElementsInSummary.ts +30 -0
  8. package/skill/references/components/p-accordion/examples/StickySummary.ts +26 -0
  9. package/skill/references/components/p-accordion/p-accordion.md +95 -0
  10. package/skill/references/components/p-ai-tag/examples/Default.ts +13 -0
  11. package/skill/references/components/p-ai-tag/examples/WithinCheckbox.ts +33 -0
  12. package/skill/references/components/p-ai-tag/examples/WithinFormLabel.ts +40 -0
  13. package/skill/references/components/p-ai-tag/examples/WithinImage.ts +16 -0
  14. package/skill/references/components/p-ai-tag/examples/WithinInputSearch.ts +15 -0
  15. package/skill/references/components/p-ai-tag/examples/WithinRadioGroup.ts +32 -0
  16. package/skill/references/components/p-ai-tag/examples/WithinTable.ts +94 -0
  17. package/skill/references/components/p-ai-tag/examples/WithinText.ts +17 -0
  18. package/skill/references/components/p-ai-tag/p-ai-tag.md +47 -0
  19. package/skill/references/components/p-banner/examples/Customization.ts +37 -0
  20. package/skill/references/components/p-banner/examples/Default.ts +26 -0
  21. package/skill/references/components/p-banner/p-banner.md +92 -0
  22. package/skill/references/components/p-button/examples/Default.ts +15 -0
  23. package/skill/references/components/p-button/examples/Form.ts +26 -0
  24. package/skill/references/components/p-button/examples/FormAttribute.ts +30 -0
  25. package/skill/references/components/p-button/p-button.md +118 -0
  26. package/skill/references/components/p-button-pure/examples/CustomClickableArea.ts +15 -0
  27. package/skill/references/components/p-button-pure/examples/Default.ts +15 -0
  28. package/skill/references/components/p-button-pure/examples/Form.ts +26 -0
  29. package/skill/references/components/p-button-pure/examples/FormAttribute.ts +30 -0
  30. package/skill/references/components/p-button-pure/p-button-pure.md +118 -0
  31. package/skill/references/components/p-button-tile/examples/ColorScheme.ts +18 -0
  32. package/skill/references/components/p-button-tile/examples/Default.ts +21 -0
  33. package/skill/references/components/p-button-tile/examples/FooterSlot.ts +32 -0
  34. package/skill/references/components/p-button-tile/examples/Hyphens.ts +38 -0
  35. package/skill/references/components/p-button-tile/examples/UiBehaviour.ts +44 -0
  36. package/skill/references/components/p-button-tile/p-button-tile.md +115 -0
  37. package/skill/references/components/p-canvas/examples/Default.ts +13 -0
  38. package/skill/references/components/p-canvas/p-canvas.md +91 -0
  39. package/skill/references/components/p-carousel/examples/Default.ts +26 -0
  40. package/skill/references/components/p-carousel/examples/DynamicSlides.ts +37 -0
  41. package/skill/references/components/p-carousel/examples/FlexibleWidths.ts +32 -0
  42. package/skill/references/components/p-carousel/examples/FocusOnCenterSlide.ts +65 -0
  43. package/skill/references/components/p-carousel/examples/Intl.ts +23 -0
  44. package/skill/references/components/p-carousel/examples/JumpToSlide.ts +50 -0
  45. package/skill/references/components/p-carousel/p-carousel.md +142 -0
  46. package/skill/references/components/p-checkbox/examples/Default.ts +13 -0
  47. package/skill/references/components/p-checkbox/examples/Form.ts +31 -0
  48. package/skill/references/components/p-checkbox/examples/Indeterminate.ts +16 -0
  49. package/skill/references/components/p-checkbox/examples/Slots.ts +57 -0
  50. package/skill/references/components/p-checkbox/examples/WrappedLabel.ts +27 -0
  51. package/skill/references/components/p-checkbox/p-checkbox.md +122 -0
  52. package/skill/references/components/p-crest/examples/CustomClickableArea.ts +13 -0
  53. package/skill/references/components/p-crest/examples/Default.ts +13 -0
  54. package/skill/references/components/p-crest/examples/Link.ts +13 -0
  55. package/skill/references/components/p-crest/p-crest.md +65 -0
  56. package/skill/references/components/p-display/examples/Color.ts +15 -0
  57. package/skill/references/components/p-display/examples/Default.ts +15 -0
  58. package/skill/references/components/p-display/examples/Semantics.ts +21 -0
  59. package/skill/references/components/p-display/examples/Size.ts +15 -0
  60. package/skill/references/components/p-display/examples/SizeResponsive.ts +15 -0
  61. package/skill/references/components/p-display/p-display.md +78 -0
  62. package/skill/references/components/p-divider/examples/Default.ts +13 -0
  63. package/skill/references/components/p-divider/examples/Responsive.ts +15 -0
  64. package/skill/references/components/p-divider/examples/Vertical.ts +15 -0
  65. package/skill/references/components/p-divider/p-divider.md +49 -0
  66. package/skill/references/components/p-drilldown/examples/CustomContent.ts +166 -0
  67. package/skill/references/components/p-drilldown/examples/Default.ts +119 -0
  68. package/skill/references/components/p-drilldown/p-drilldown.md +168 -0
  69. package/skill/references/components/p-fieldset/examples/Default.ts +15 -0
  70. package/skill/references/components/p-fieldset/examples/Required.ts +16 -0
  71. package/skill/references/components/p-fieldset/examples/SlottedLabel.ts +18 -0
  72. package/skill/references/components/p-fieldset/examples/SlottedMessage.ts +18 -0
  73. package/skill/references/components/p-fieldset/p-fieldset.md +88 -0
  74. package/skill/references/components/p-flag/examples/Default.ts +13 -0
  75. package/skill/references/components/p-flag/examples/ResponsiveSize.ts +13 -0
  76. package/skill/references/components/p-flag/examples/Size.ts +16 -0
  77. package/skill/references/components/p-flag/examples/SizeCssVar.ts +13 -0
  78. package/skill/references/components/p-flag/p-flag.md +68 -0
  79. package/skill/references/components/p-flyout/examples/CustomStyling.ts +47 -0
  80. package/skill/references/components/p-flyout/examples/Default.ts +44 -0
  81. package/skill/references/components/p-flyout/examples/Form.ts +47 -0
  82. package/skill/references/components/p-flyout/examples/StickyTop.ts +44 -0
  83. package/skill/references/components/p-flyout/p-flyout.md +128 -0
  84. package/skill/references/components/p-heading/examples/Color.ts +15 -0
  85. package/skill/references/components/p-heading/examples/Default.ts +15 -0
  86. package/skill/references/components/p-heading/examples/Semantics.ts +21 -0
  87. package/skill/references/components/p-heading/p-heading.md +78 -0
  88. package/skill/references/components/p-icon/examples/Color.ts +16 -0
  89. package/skill/references/components/p-icon/examples/ColorCssVar.ts +13 -0
  90. package/skill/references/components/p-icon/examples/Custom.ts +13 -0
  91. package/skill/references/components/p-icon/examples/Default.ts +13 -0
  92. package/skill/references/components/p-icon/examples/Overview.ts +591 -0
  93. package/skill/references/components/p-icon/examples/ResponsiveSize.ts +13 -0
  94. package/skill/references/components/p-icon/examples/Size.ts +16 -0
  95. package/skill/references/components/p-icon/examples/SizeCssVar.ts +13 -0
  96. package/skill/references/components/p-icon/p-icon.md +88 -0
  97. package/skill/references/components/p-inline-notification/examples/ActionButton.ts +29 -0
  98. package/skill/references/components/p-inline-notification/examples/Default.ts +13 -0
  99. package/skill/references/components/p-inline-notification/examples/EventHandling.ts +31 -0
  100. package/skill/references/components/p-inline-notification/p-inline-notification.md +74 -0
  101. package/skill/references/components/p-input-date/examples/Default.ts +13 -0
  102. package/skill/references/components/p-input-date/examples/Form.ts +31 -0
  103. package/skill/references/components/p-input-date/examples/Slots.ts +44 -0
  104. package/skill/references/components/p-input-date/p-input-date.md +138 -0
  105. package/skill/references/components/p-input-email/examples/Default.ts +13 -0
  106. package/skill/references/components/p-input-email/examples/Form.ts +31 -0
  107. package/skill/references/components/p-input-email/examples/Slots.ts +44 -0
  108. package/skill/references/components/p-input-email/p-input-email.md +142 -0
  109. package/skill/references/components/p-input-month/examples/Default.ts +13 -0
  110. package/skill/references/components/p-input-month/examples/Form.ts +31 -0
  111. package/skill/references/components/p-input-month/examples/Slots.ts +44 -0
  112. package/skill/references/components/p-input-month/p-input-month.md +138 -0
  113. package/skill/references/components/p-input-number/examples/Default.ts +13 -0
  114. package/skill/references/components/p-input-number/examples/Form.ts +31 -0
  115. package/skill/references/components/p-input-number/examples/Slots.ts +44 -0
  116. package/skill/references/components/p-input-number/p-input-number.md +146 -0
  117. package/skill/references/components/p-input-password/examples/Default.ts +13 -0
  118. package/skill/references/components/p-input-password/examples/Form.ts +31 -0
  119. package/skill/references/components/p-input-password/examples/Slots.ts +42 -0
  120. package/skill/references/components/p-input-password/examples/Toggle.ts +13 -0
  121. package/skill/references/components/p-input-password/p-input-password.md +141 -0
  122. package/skill/references/components/p-input-search/examples/AriaCombobox.ts +38 -0
  123. package/skill/references/components/p-input-search/examples/Default.ts +13 -0
  124. package/skill/references/components/p-input-search/examples/Form.ts +31 -0
  125. package/skill/references/components/p-input-search/examples/Slots.ts +44 -0
  126. package/skill/references/components/p-input-search/p-input-search.md +178 -0
  127. package/skill/references/components/p-input-tel/examples/Default.ts +13 -0
  128. package/skill/references/components/p-input-tel/examples/Form.ts +31 -0
  129. package/skill/references/components/p-input-tel/examples/Slots.ts +44 -0
  130. package/skill/references/components/p-input-tel/p-input-tel.md +141 -0
  131. package/skill/references/components/p-input-text/examples/Controlled.ts +36 -0
  132. package/skill/references/components/p-input-text/examples/Default.ts +13 -0
  133. package/skill/references/components/p-input-text/examples/Form.ts +31 -0
  134. package/skill/references/components/p-input-text/examples/Slots.ts +44 -0
  135. package/skill/references/components/p-input-text/p-input-text.md +146 -0
  136. package/skill/references/components/p-input-time/examples/Default.ts +13 -0
  137. package/skill/references/components/p-input-time/examples/Form.ts +31 -0
  138. package/skill/references/components/p-input-time/examples/Slots.ts +44 -0
  139. package/skill/references/components/p-input-time/p-input-time.md +140 -0
  140. package/skill/references/components/p-input-url/examples/Default.ts +13 -0
  141. package/skill/references/components/p-input-url/examples/Form.ts +31 -0
  142. package/skill/references/components/p-input-url/examples/Slots.ts +44 -0
  143. package/skill/references/components/p-input-url/p-input-url.md +141 -0
  144. package/skill/references/components/p-input-week/examples/Default.ts +13 -0
  145. package/skill/references/components/p-input-week/examples/Form.ts +31 -0
  146. package/skill/references/components/p-input-week/examples/Slots.ts +44 -0
  147. package/skill/references/components/p-input-week/p-input-week.md +138 -0
  148. package/skill/references/components/p-link/examples/Default.ts +15 -0
  149. package/skill/references/components/p-link/examples/FrameworkRouting.ts +17 -0
  150. package/skill/references/components/p-link/examples/Icon.ts +20 -0
  151. package/skill/references/components/p-link/p-link.md +101 -0
  152. package/skill/references/components/p-link-pure/examples/CustomClickableArea.ts +15 -0
  153. package/skill/references/components/p-link-pure/examples/Default.ts +15 -0
  154. package/skill/references/components/p-link-pure/examples/FrameworkRouting.ts +17 -0
  155. package/skill/references/components/p-link-pure/examples/Icon.ts +20 -0
  156. package/skill/references/components/p-link-pure/p-link-pure.md +110 -0
  157. package/skill/references/components/p-link-tile/examples/ColorScheme.ts +18 -0
  158. package/skill/references/components/p-link-tile/examples/Default.ts +21 -0
  159. package/skill/references/components/p-link-tile/examples/FooterSlot.ts +32 -0
  160. package/skill/references/components/p-link-tile/examples/Hyphens.ts +39 -0
  161. package/skill/references/components/p-link-tile/examples/UiBehaviour.ts +44 -0
  162. package/skill/references/components/p-link-tile/examples/WithVideo.ts +18 -0
  163. package/skill/references/components/p-link-tile/p-link-tile.md +105 -0
  164. package/skill/references/components/p-link-tile-product/examples/Default.ts +24 -0
  165. package/skill/references/components/p-link-tile-product/examples/FrameworkRouting.ts +27 -0
  166. package/skill/references/components/p-link-tile-product/p-link-tile-product.md +93 -0
  167. package/skill/references/components/p-modal/examples/AlertDialog.ts +41 -0
  168. package/skill/references/components/p-modal/examples/CustomStyling.ts +28 -0
  169. package/skill/references/components/p-modal/examples/Default.ts +41 -0
  170. package/skill/references/components/p-modal/examples/Scrollable.ts +45 -0
  171. package/skill/references/components/p-modal/p-modal.md +135 -0
  172. package/skill/references/components/p-model-signature/examples/CustomStyling.ts +17 -0
  173. package/skill/references/components/p-model-signature/examples/Default.ts +13 -0
  174. package/skill/references/components/p-model-signature/examples/MaskBlendMode.ts +35 -0
  175. package/skill/references/components/p-model-signature/examples/MaskImage.ts +15 -0
  176. package/skill/references/components/p-model-signature/examples/MaskVideo.ts +15 -0
  177. package/skill/references/components/p-model-signature/examples/SafeZone.ts +63 -0
  178. package/skill/references/components/p-model-signature/p-model-signature.md +62 -0
  179. package/skill/references/components/p-multi-select/examples/AsyncFilter.ts +149 -0
  180. package/skill/references/components/p-multi-select/examples/Default.ts +32 -0
  181. package/skill/references/components/p-multi-select/examples/Form.ts +38 -0
  182. package/skill/references/components/p-multi-select/examples/Optgroups.ts +45 -0
  183. package/skill/references/components/p-multi-select/examples/SelectedSlot.ts +103 -0
  184. package/skill/references/components/p-multi-select/examples/SetValue.ts +76 -0
  185. package/skill/references/components/p-multi-select/examples/Slots.ts +51 -0
  186. package/skill/references/components/p-multi-select/p-multi-select.md +197 -0
  187. package/skill/references/components/p-pagination/examples/Default.ts +13 -0
  188. package/skill/references/components/p-pagination/p-pagination.md +83 -0
  189. package/skill/references/components/p-pin-code/examples/CopyPaste.ts +13 -0
  190. package/skill/references/components/p-pin-code/examples/Default.ts +13 -0
  191. package/skill/references/components/p-pin-code/examples/Form.ts +31 -0
  192. package/skill/references/components/p-pin-code/examples/Slots.ts +42 -0
  193. package/skill/references/components/p-pin-code/p-pin-code.md +109 -0
  194. package/skill/references/components/p-popover/examples/Default.ts +17 -0
  195. package/skill/references/components/p-popover/examples/SlottedButton.ts +18 -0
  196. package/skill/references/components/p-popover/p-popover.md +116 -0
  197. package/skill/references/components/p-radio-group/examples/Default.ts +20 -0
  198. package/skill/references/components/p-radio-group/examples/Form.ts +38 -0
  199. package/skill/references/components/p-radio-group/examples/Slots.ts +72 -0
  200. package/skill/references/components/p-radio-group/p-radio-group.md +157 -0
  201. package/skill/references/components/p-scroller/examples/Default.ts +54 -0
  202. package/skill/references/components/p-scroller/examples/Height.ts +29 -0
  203. package/skill/references/components/p-scroller/examples/ScrollToPosition.ts +43 -0
  204. package/skill/references/components/p-scroller/p-scroller.md +93 -0
  205. package/skill/references/components/p-segmented-control/examples/Default.ts +29 -0
  206. package/skill/references/components/p-segmented-control/examples/Form.ts +37 -0
  207. package/skill/references/components/p-segmented-control/examples/Slots.ts +57 -0
  208. package/skill/references/components/p-segmented-control/examples/WithLabels.ts +29 -0
  209. package/skill/references/components/p-segmented-control/p-segmented-control.md +162 -0
  210. package/skill/references/components/p-select/examples/AsyncFilter.ts +149 -0
  211. package/skill/references/components/p-select/examples/Default.ts +32 -0
  212. package/skill/references/components/p-select/examples/Form.ts +38 -0
  213. package/skill/references/components/p-select/examples/Optgroups.ts +45 -0
  214. package/skill/references/components/p-select/examples/Required.ts +48 -0
  215. package/skill/references/components/p-select/examples/SelectedSlot.ts +130 -0
  216. package/skill/references/components/p-select/examples/SetValue.ts +71 -0
  217. package/skill/references/components/p-select/examples/Slots.ts +51 -0
  218. package/skill/references/components/p-select/examples/SlottedImages.ts +38 -0
  219. package/skill/references/components/p-select/p-select.md +194 -0
  220. package/skill/references/components/p-sheet/examples/Default.ts +33 -0
  221. package/skill/references/components/p-sheet/p-sheet.md +121 -0
  222. package/skill/references/components/p-spinner/examples/Color.ts +16 -0
  223. package/skill/references/components/p-spinner/examples/ColorCssVar.ts +13 -0
  224. package/skill/references/components/p-spinner/examples/Default.ts +13 -0
  225. package/skill/references/components/p-spinner/examples/ResponsiveSize.ts +13 -0
  226. package/skill/references/components/p-spinner/examples/Size.ts +16 -0
  227. package/skill/references/components/p-spinner/examples/SizeCssVar.ts +13 -0
  228. package/skill/references/components/p-spinner/p-spinner.md +96 -0
  229. package/skill/references/components/p-stepper-horizontal/examples/Default.ts +26 -0
  230. package/skill/references/components/p-stepper-horizontal/examples/FrameworkImplementation.ts +107 -0
  231. package/skill/references/components/p-stepper-horizontal/p-stepper-horizontal.md +109 -0
  232. package/skill/references/components/p-switch/examples/Default.ts +21 -0
  233. package/skill/references/components/p-switch/p-switch.md +103 -0
  234. package/skill/references/components/p-table/examples/Advanced.ts +162 -0
  235. package/skill/references/components/p-table/examples/CaptionProperty.ts +40 -0
  236. package/skill/references/components/p-table/examples/CaptionSlot.ts +43 -0
  237. package/skill/references/components/p-table/examples/Default.ts +120 -0
  238. package/skill/references/components/p-table/examples/HideLabel.ts +40 -0
  239. package/skill/references/components/p-table/examples/LayoutFixed.ts +53 -0
  240. package/skill/references/components/p-table/examples/Sorting.ts +79 -0
  241. package/skill/references/components/p-table/p-table.md +189 -0
  242. package/skill/references/components/p-tabs/examples/ActiveTab.ts +29 -0
  243. package/skill/references/components/p-tabs/examples/Default.ts +29 -0
  244. package/skill/references/components/p-tabs/examples/Gradient.ts +114 -0
  245. package/skill/references/components/p-tabs/examples/Labelling.ts +29 -0
  246. package/skill/references/components/p-tabs/p-tabs.md +136 -0
  247. package/skill/references/components/p-tabs-bar/examples/Default.ts +29 -0
  248. package/skill/references/components/p-tabs-bar/examples/Gradient.ts +80 -0
  249. package/skill/references/components/p-tabs-bar/examples/Labelling.ts +29 -0
  250. package/skill/references/components/p-tabs-bar/examples/Links.ts +23 -0
  251. package/skill/references/components/p-tabs-bar/p-tabs-bar.md +181 -0
  252. package/skill/references/components/p-tag/examples/Default.ts +15 -0
  253. package/skill/references/components/p-tag/examples/Multiline.ts +17 -0
  254. package/skill/references/components/p-tag/examples/SlottedButton.ts +44 -0
  255. package/skill/references/components/p-tag/examples/SlottedLink.ts +44 -0
  256. package/skill/references/components/p-tag/p-tag.md +66 -0
  257. package/skill/references/components/p-tag-dismissible/examples/Default.ts +15 -0
  258. package/skill/references/components/p-tag-dismissible/p-tag-dismissible.md +75 -0
  259. package/skill/references/components/p-text/examples/Default.ts +15 -0
  260. package/skill/references/components/p-text/examples/Semantics.ts +21 -0
  261. package/skill/references/components/p-text/examples/Size.ts +15 -0
  262. package/skill/references/components/p-text/examples/SizeResponsive.ts +15 -0
  263. package/skill/references/components/p-text/p-text.md +68 -0
  264. package/skill/references/components/p-text-list/examples/Default.ts +31 -0
  265. package/skill/references/components/p-text-list/p-text-list.md +68 -0
  266. package/skill/references/components/p-textarea/examples/Default.ts +13 -0
  267. package/skill/references/components/p-textarea/examples/Form.ts +31 -0
  268. package/skill/references/components/p-textarea/examples/Slots.ts +42 -0
  269. package/skill/references/components/p-textarea/p-textarea.md +122 -0
  270. package/skill/references/components/p-toast/examples/Default.ts +23 -0
  271. package/skill/references/components/p-toast/p-toast.md +61 -0
  272. package/skill/references/components/p-wordmark/examples/CustomClickableArea.ts +13 -0
  273. package/skill/references/components/p-wordmark/examples/Default.ts +13 -0
  274. package/skill/references/components/p-wordmark/examples/Size.ts +13 -0
  275. package/skill/references/components/p-wordmark/p-wordmark.md +66 -0
  276. package/skill/references/icons.md +5 -0
  277. package/skill/references/styles/emotion.md +439 -0
  278. package/skill/references/styles/scss.md +402 -0
  279. package/skill/references/styles/tailwindcss.md +356 -0
  280. package/skill/references/styles/vanilla-extract.md +444 -0
  281. package/skill/references/stylesheets.md +331 -0
  282. package/skill/references/tokens.md +323 -0
  283. package/types/porsche-design-system-components-angular.d.ts +2 -2
@@ -0,0 +1,194 @@
1
+ # p-select
2
+
3
+ The `p-select` component is a versatile custom form element that enables the selection of a single option.
4
+
5
+ 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](./p-select.md)). 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](./p-select.md)).
6
+
7
+ **Hint:** The `p-select` utilizes the [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/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.
8
+
9
+ ## Usage
10
+
11
+ ### Do:
12
+
13
+ - Keep the label visible for better accessibility whenever possible.
14
+ - Provide a descriptive label text for screen readers when using the component without a label.
15
+ - Use it to search and choose a single option from a list — for example to trigger an action based on the selection or to navigate the user to a new position — and recommend a default option for most users.
16
+ - Use without label only if the context clearly describes what the component is to be used for and no further explanation is required.
17
+ - Provide a description text displayed openly and directly outside the form field when helpful for the user to get further information on the input.
18
+ - Use the custom filter for a large number of select options (e.g. country/state select).
19
+ - Use without preselection (mandatory field) if you don't know or need to make sure the user makes a conscious choice.
20
+ - Use preselection (mandatory field) if you have a reason to believe one of the options is most likely or you know the default or current option.
21
+ - Use preselection (optional field) to make it possible to go back to an empty default.
22
+ - Use common sort order for menu items (frequency of use, alpha or numeric).
23
+
24
+ ### Don't:
25
+
26
+ - Don't use select boxes for data that is highly familiar such as the day month or year.
27
+ - Don't set the default to 'please select' if there's an empty field.
28
+ - Don't use very long select boxes that require scrolling but if unavoidable make sure that when open there is only a maximum of 7 elements in the field of view without having to scroll.
29
+
30
+ ## Accessibility support
31
+
32
+ ### Keyboard
33
+
34
+ #### Combobox
35
+
36
+ | Key / state | Function |
37
+ | --- | --- |
38
+ | `Down Arrow` `Up Arrow` `Space` | - Opens the listbox if it is not already displayed without moving focus or changing selection. - DOM focus remains on the combobox. |
39
+ | `Space` | Closes the listbox if it is displayed. |
40
+
41
+ #### Listbox
42
+
43
+ | Key / state | Function |
44
+ | --- | --- |
45
+ | `Down Arrow` `Up Arrow` | Moves visual focus to the next/previous option. |
46
+ | `Home` `End` | Moves visual focus to the first/last option. |
47
+ | `ESC` | Closes listbox |
48
+ | `Enter`, `Space` | Selects an option |
49
+
50
+ ### ARIA enhancements
51
+
52
+ #### Internal **ARIA** that is managed by the component:
53
+
54
+ | ARIA | Usage |
55
+ | --- | --- |
56
+ | `aria-labelledby="IDREF"` | References the accessible name of the combobox. |
57
+ | `aria-describedby="IDREF"` | References the accessible description and status messages of the combobox. |
58
+ | `aria-label="STRING"` | References the accessible name of the listbox. |
59
+ | `role="status"`, `role="alert"` | When `message` and `state` prop change, the status message is announced. |
60
+ | `aria-expanded="BOOLEAN"` | Indicates that the listbox element is displayed/hidden. |
61
+ | `aria-controls="IDREF"` | Identifies the element that serves as the listbox. |
62
+ | `aria-hidden="true"` | If `required` attribute is set, the visible indicator is hidden from assistive technologies. |
63
+ | `aria-haspopup="listbox"` | Indicates that the combobox will open a listbox. |
64
+ | `aria-required="true"` | Indicates if the element is required. |
65
+
66
+ ## Development considerations
67
+
68
+ ### Disabled state
69
+
70
+ In general, avoid using the `disabled` state. Disabled elements are no longer focusable and may be missed by screen reader users. They can also confuse sighted users if the reason they are disabled is not made clear.
71
+
72
+ ### Common do's and don'ts
73
+
74
+ - **Do** provide a clear, persistent label for what the selection controls.
75
+ - **Do** use meaningful option text so choices are understandable out of context.
76
+ - **Do** use the component state/message API so validation and status changes are announced.
77
+ - **Do** use clear error wording that helps users recover.
78
+ - **Don't** use a prompt option or adjacent text as a substitute for a field label.
79
+ - **Don't** use very short or ambiguous option labels when context is important.
80
+ - **Don't** use `hide-label` without an accessible name.
81
+
82
+ ## API
83
+
84
+ ### Properties
85
+
86
+ | Property | Type | Default | Description |
87
+ | --- | --- | --- | --- |
88
+ | `compact` | `boolean` | `false` | Reduces the control height and padding for use in dense layouts where vertical space is limited. |
89
+ | `description` | `string` | `''` | Sets a supplementary description displayed below the label to give users additional guidance about the select. |
90
+ | `disabled` | `boolean` | `false` | Prevents user interaction with the select and excludes its value from form submissions. |
91
+ | `dropdownDirection` | `'down'` `'up'` `'auto'` | `'auto'` | Controls whether the dropdown list opens upward (`up`) or downward (`down`), or determines the direction automatically (`auto`). |
92
+ | `filter` | `boolean` | `false` | Shows a text input inside the dropdown that filters the visible options as the user types. Ignored when the `filter` slot is used. |
93
+ | `form` | `string` | `undefined` | Associates the select with a form element by its ID when it is not a direct descendant of that form. |
94
+ | `hideLabel` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Hides the visible label while keeping it accessible to screen readers. Supports responsive breakpoint values. |
95
+ | `label` | `string` | `''` | Sets the visible label text displayed above the select control to identify its purpose. |
96
+ | `message` | `string` | `''` | Sets the validation feedback message displayed below the select when `state` is `success` or `error`. |
97
+ | `name` _(required)_ | `string` | `undefined` | Sets the name of the control submitted with the form data, identifying the selected value on the server. |
98
+ | `required` | `boolean` | `false` | Marks the select as required so the form cannot be submitted unless a non-empty option is selected. |
99
+ | `state` | `'none'` `'error'` `'success'` | `'none'` | Sets the validation state of the select, which controls its visual appearance and feedback message style (`none`, `success`, `error`). |
100
+ | `value` | `string | number | null` | `undefined` | The selected value. Matches an option strictly by type and value, meaning null matches only an option with value null, undefined matches only an option with value undefined (no preselection by default), and string or number only match an option whose value has the same type and equal value. Please note that FormData always serializes values as strings, so when participating in a native (uncontrolled) form a number value is restored as string via formStateRestoreCallback and will no longer strictly match a number-typed option. This limitation only applies to native form state restoration; in controlled forms (where the consumer manages value directly via the change event), the number type is preserved end-to-end. |
101
+
102
+ ### Events
103
+
104
+ | Event | Type | Description |
105
+ | --- | --- | --- |
106
+ | `blur` | `CustomEvent<void>` | Emitted when the select component loses focus, useful for triggering validation on blur. |
107
+ | `change` | `CustomEvent<SelectChangeEventDetail>`<br>`{ name: string; value: string | number | null | undefined }` | Emitted when the user selects a different option, carrying the new value in the event detail. |
108
+ | `toggle` | `CustomEvent<SelectToggleEventDetail>`<br>`{ open: boolean }` | Emitted when the dropdown list opens or closes, carrying the new `isOpen` state in the event detail. |
109
+
110
+ ### Controlled properties
111
+
112
+ - `value` — a controlled prop, but the component also updates it internally. Listen for the `change` event to observe changes; you do not have to write the value back.
113
+
114
+ ### Slots
115
+
116
+ | Slot | Required | Allowed tag names | Description |
117
+ | --- | --- | --- | --- |
118
+ | `label` | no | — | Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
119
+ | `label-after` | no | — | Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`). |
120
+ | `description` | no | — | Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
121
+ | `selected` | no | — | Use this slot to provide custom markup for the selected option display in the button area. |
122
+ | _(default)_ | no | — | Default slot for the `p-select-option` tags. |
123
+ | `options-status` | no | — | When implementing a custom filter with the `filter` slot, use this slot for loading, error and no results status. |
124
+ | `message` | no | — | Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed. |
125
+ | `filter` | no | — | Optional slot for providing a custom `p-input-search` input. When used, the default filter input is replaced and the built-in filter logic is disabled, giving full control over filtering behavior. |
126
+
127
+ ## Sub-components
128
+
129
+ These tags are only valid inside the parent(s) listed under each one — often this component, but some are shared and list a different parent (e.g. a tag documented here via a common ancestor). Their APIs come from the same authoritative `component-meta` as the parent above.
130
+
131
+ ### `p-multi-select-option`
132
+
133
+ Allowed parents: `p-multi-select`, `p-optgroup`.
134
+
135
+ #### Properties
136
+
137
+ | Property | Type | Default | Description |
138
+ | --- | --- | --- | --- |
139
+ | `disabled` | `boolean` | `false` | Disables the option, preventing it from being selected. |
140
+ | `value` _(required)_ | `string | number` | `undefined` | Sets the value submitted with the form data when this option is selected in the parent multi-select. |
141
+
142
+ #### Slots
143
+
144
+ | Slot | Required | Allowed tag names | Description |
145
+ | --- | --- | --- | --- |
146
+ | _(default)_ | no | — | Default slot for the option text. |
147
+
148
+ ### `p-optgroup`
149
+
150
+ Allowed parents: `p-select`, `p-multi-select`.
151
+
152
+ #### Properties
153
+
154
+ | Property | Type | Default | Description |
155
+ | --- | --- | --- | --- |
156
+ | `disabled` | `boolean` | `false` | Disables all options in the group, preventing any of them from being selected. |
157
+ | `label` | `string` | `undefined` | Sets the visible group heading displayed above the grouped options. |
158
+
159
+ #### Slots
160
+
161
+ | Slot | Required | Allowed tag names | Description |
162
+ | --- | --- | --- | --- |
163
+ | _(default)_ | no | — | Default slot for the optgroup content. |
164
+
165
+ ### `p-select-option`
166
+
167
+ Allowed parents: `p-select`, `p-optgroup`.
168
+
169
+ #### Properties
170
+
171
+ | Property | Type | Default | Description |
172
+ | --- | --- | --- | --- |
173
+ | `disabled` | `boolean` | `false` | Prevents the option from being selected and visually dims it to indicate it is unavailable. |
174
+ | `value` | `string | number | null` | `undefined` | Sets the value submitted with the form data when this option is selected in the parent select control. |
175
+
176
+ #### Slots
177
+
178
+ | Slot | Required | Allowed tag names | Description |
179
+ | --- | --- | --- | --- |
180
+ | _(default)_ | no | — | Default slot for the option content. |
181
+
182
+ ## Examples
183
+
184
+ | Example | When to use | File |
185
+ | --- | --- | --- |
186
+ | Default | Minimal default configuration. | [./examples/Default.ts](./examples/Default.ts) |
187
+ | Form | The `p-select` can be integrated into a form in two ways: **controlled** or **uncontrolled**, depending on your needs. | [./examples/Form.ts](./examples/Form.ts) |
188
+ | Basic example without preselection | To require the user to actively pick an option, leave the `p-select` `value` property unset (or set it to `undefined` or `null`). | [./examples/Required.ts](./examples/Required.ts) |
189
+ | Slotted images | In order to show an icon for each option, you can optionally slot an `img` tag within the `p-select-option`. | [./examples/SlottedImages.ts](./examples/SlottedImages.ts) |
190
+ | Slots | Use named slots when `label`, `description` or `message` need markup such as a link. | [./examples/Slots.ts](./examples/Slots.ts) |
191
+ | Set Value | The `p-select` component behaves like regular form elements. | [./examples/SetValue.ts](./examples/SetValue.ts) |
192
+ | With optgroups | With optgroups | [./examples/Optgroups.ts](./examples/Optgroups.ts) |
193
+ | Custom asynchronous filtering | The `p-select` component automatically filters options based on user input. | [./examples/AsyncFilter.ts](./examples/AsyncFilter.ts) |
194
+ | Custom option rendering | `p-select-option` only allows `#text` and `img` nodes unless the parent `p-select` provides a custom selection renderer through the `selected` slot, which also enables custom option markup. | [./examples/SelectedSlot.ts](./examples/SelectedSlot.ts) |
@@ -0,0 +1,33 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
3
+
4
+ @Component({
5
+ selector: 'porsche-design-system-app',
6
+ template: `
7
+ <p-button type="button" [aria]="{'aria-haspopup': 'dialog'}" (click)="onClick()">
8
+ Open Sheet
9
+ </p-button>
10
+
11
+ <p-sheet [open]="open" [aria]="{'aria-label': 'Some Heading'}" (dismiss)="onDismiss()">
12
+ <p-heading slot="header" size="large" tag="h2">
13
+ Some Heading
14
+ </p-heading>
15
+ <p-text>
16
+ Some Content
17
+ </p-text>
18
+ </p-sheet>
19
+ `,
20
+ changeDetection: ChangeDetectionStrategy.OnPush,
21
+ standalone: true,
22
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
23
+ })
24
+ export class ExampleComponent {
25
+ open = false;
26
+
27
+ onClick() {
28
+ this.open = true;
29
+ }
30
+ onDismiss() {
31
+ this.open = false;
32
+ }
33
+ }
@@ -0,0 +1,121 @@
1
+ # p-sheet
2
+
3
+ The `p-sheet` is a temporary overlay to focus the user's attention on one or multiple tasks while the underlying page is still visible but interactions with it are blocked. It should be used thoughtfully and sparingly.
4
+
5
+ It is a controlled component. This grants flexible control over the sheet's behavior especially whether it should stay open after user interaction like submission of a form.
6
+
7
+ > **Scroll-lock**
8
+ >
9
+ > This component sets `overflow: hidden` on the body when opened in order to prevent background scrolling.
10
+ >
11
+ > This doesn't work completely reliable under iOS but is the most stable solution.
12
+ >
13
+ > Feel free to address this issue in an Open Source PR, if you can provide a better solution.
14
+ >
15
+ > **[Current implementation](https://github.com/porsche-design-system/porsche-design-system/blob/main/packages/components/src/utils/setScrollLock.ts)**
16
+
17
+ Following **web standards**, the component uses the native `<dialog />` element internally which ensures proper focus handling including a **focus trap**. In addition, it's rendered on the `#top-layer` which ensures the element to be on top of the page independent of where `p-sheet` is placed in the DOM hierarchy (`z-index` is not relevant anymore and won't have any effect).
18
+
19
+ The most important property of `p-sheet` is its `open` property. When it's set to `true` the sheet will be visible. In order to get notified when the sheet gets closed by clicking the `x` button, the backdrop or by pressing the `Escape` key you need to register an event listener for the `dismiss` event which is emitted by `p-sheet`.
20
+
21
+ ## Usage
22
+
23
+ ### Do:
24
+
25
+ - Use an sheet only for critical decisions or when multiple related actions need to be presented.
26
+ - Keep the options clear, concise, and easy to understand.
27
+ - Limit the number of choices to avoid overwhelming the user.
28
+ - Use descriptive labels that indicate the outcome of each action.
29
+ - Include a cancel option to allow users to dismiss the sheet without making a selection.
30
+
31
+ ### Don't:
32
+
33
+ - Don’t use sheets for non-essential or minor tasks.
34
+ - Avoid presenting too many options or complex decisions.
35
+ - Don’t use vague labels like “OK” or “Cancel” without context.
36
+ - Avoid stacking multiple sheets on top of each other.
37
+ - Don’t interrupt the user’s workflow unnecessarily.
38
+
39
+ ## Accessibility support
40
+
41
+ The `Sheet` component uses the native `dialog` element to provide a modal dialog which comes with browser-specific behavior. As a result, accessibility features may vary across different browsers.
42
+
43
+ ### Keyboard
44
+
45
+ | Key / state | Function |
46
+ | --- | --- |
47
+ | `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element inside the dialog. Focus is trapped (browser behavior). |
48
+ | `ESC` | Closes the dialog. |
49
+ | `focus` on trigger element | The focus is returned to the trigger element after closing the dialog (browser behavior). |
50
+
51
+ ### ARIA enhancements
52
+
53
+ #### External **ARIA** provided by the `aria` property:
54
+
55
+ | ARIA | Usage |
56
+ | --- | --- |
57
+ | `aria-label` | Defines a string value that labels the dialog element. |
58
+ | `role` | Defines the semantic of the dialog element (`dialog` or `alertdialog`). |
59
+
60
+ #### Internal **ARIA** that is managed by the component:
61
+
62
+ | ARIA | Usage |
63
+ | --- | --- |
64
+ | `aria-label="STRING"` | Defines the accessible name if no `aria` property is provided, uses the contents of the header slot and falls back to a fixed name. |
65
+
66
+ ## Development considerations
67
+
68
+ Set `aria-haspopup` on the trigger so users know a dialog will open. Ensure the sheet has a meaningful title via the header slot or `aria` property.
69
+
70
+ ### Common do's and don'ts
71
+
72
+ - **Do** use a semantic trigger (usually a button) with a meaningful accessible name.
73
+ - **Do** set `aria-haspopup` through the trigger component `aria` prop when opening the sheet.
74
+ - **Do** ensure a meaningful title/label is available via the header slot or `aria` property.
75
+ - **Don't** add raw host-level ARIA attributes as a workaround.
76
+ - **Don't** use unclear trigger copy like "Open" when the sheet purpose is not obvious.
77
+
78
+ ## API
79
+
80
+ ### Properties
81
+
82
+ | Property | Type | Default | Description |
83
+ | --- | --- | --- | --- |
84
+ | `aria` | `SheetAriaAttribute` | `undefined` | Sets ARIA attributes on the sheet dialog element for improved accessibility when the default `aria-label` is insufficient. |
85
+ | `background` | `'canvas'` `'surface'` | `'canvas'` | Sets the background color of the sheet panel (`canvas` or `surface`). |
86
+ | `disableBackdropClick` | `boolean` | `false` | When enabled, clicking the backdrop will not close the sheet. |
87
+ | `dismissButton` | `boolean` | `true` | Shows a dismiss button in the sheet header so users can manually close it. |
88
+ | `open` _(required)_ | `boolean` | `false` | Controls whether the sheet panel slides in from the bottom and is visible to the user. |
89
+
90
+ ### Events
91
+
92
+ | Event | Type | Description |
93
+ | --- | --- | --- |
94
+ | `dismiss` | `CustomEvent<void>` | Emitted when the user dismisses the sheet via the close button, backdrop click, or Escape key. |
95
+ | `motionHiddenEnd` | `CustomEvent<SheetMotionHiddenEndEventDetail>`<br>`TransitionEvent` | Emitted after the sheet's close transition has fully completed and the panel is hidden. |
96
+ | `motionVisibleEnd` | `CustomEvent<SheetMotionVisibleEndEventDetail>`<br>`TransitionEvent` | Emitted after the sheet's open transition has fully completed and the panel is visible. |
97
+
98
+ ### Controlled properties
99
+
100
+ - `open` — a controlled prop: the component does **not** update it itself. Handle the `dismiss` event and assign the new value to `open` yourself, or the change will not take effect.
101
+
102
+ ### Slots
103
+
104
+ | Slot | Required | Allowed tag names | Description |
105
+ | --- | --- | --- | --- |
106
+ | `header` | no | — | Renders a header section above the content area. |
107
+ | _(default)_ | no | — | Default slot for the main content. |
108
+
109
+ ### CSS Variables
110
+
111
+ | CSS Variable | Default | Description |
112
+ | --- | --- | --- |
113
+ | `--ref-p-sheet-pt` | — | Exposes the internally used padding-top of the Sheet as read only CSS variable. When slotting e.g. a media container, this variable can be used to stretch the element to the top of the Sheet. |
114
+ | `--ref-p-sheet-pb` | — | Exposes the internally used padding-bottom of the Sheet as read only CSS variable. When slotting e.g. a media container, this variable can be used to stretch the element to the bottom of the Sheet. |
115
+ | `--ref-p-sheet-px` | — | Exposes the internally used padding-inline of the Sheet as read only CSS variable. When slotting e.g. a media container, this variable can be used to stretch the element to the full horizontal size of the Sheet. |
116
+
117
+ ## Examples
118
+
119
+ | Example | When to use | File |
120
+ | --- | --- | --- |
121
+ | Default | Minimal default configuration. | [./examples/Default.ts](./examples/Default.ts) |
@@ -0,0 +1,16 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
3
+
4
+ @Component({
5
+ selector: 'porsche-design-system-app',
6
+ template: `
7
+ <p-text [style]="{'color': 'light-dark(mediumvioletred, deeppink)'}" color="inherit">
8
+ <p-spinner class="me-static-sm" color="inherit" [aria]="{'aria-label': 'Loading page content'}"></p-spinner>
9
+ Some text
10
+ </p-text>
11
+ `,
12
+ changeDetection: ChangeDetectionStrategy.OnPush,
13
+ standalone: true,
14
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
15
+ })
16
+ export class ExampleComponent {}
@@ -0,0 +1,13 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
3
+
4
+ @Component({
5
+ selector: 'porsche-design-system-app',
6
+ template: `
7
+ <p-spinner class="[--p-spinner-color:deeppink] [--p-spinner-track-color:lightpink]" [aria]="{'aria-label': 'Loading page content'}"></p-spinner>
8
+ `,
9
+ changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
12
+ })
13
+ export class ExampleComponent {}
@@ -0,0 +1,13 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
3
+
4
+ @Component({
5
+ selector: 'porsche-design-system-app',
6
+ template: `
7
+ <p-spinner [aria]="{'aria-label': 'Loading page content'}"></p-spinner>
8
+ `,
9
+ changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
12
+ })
13
+ export class ExampleComponent {}
@@ -0,0 +1,13 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
3
+
4
+ @Component({
5
+ selector: 'porsche-design-system-app',
6
+ template: `
7
+ <p-spinner [size]="{'base': 'sm', 'l': '2xl'}" [aria]="{'aria-label': 'Loading page content'}"></p-spinner>
8
+ `,
9
+ changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
12
+ })
13
+ export class ExampleComponent {}
@@ -0,0 +1,16 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
3
+
4
+ @Component({
5
+ selector: 'porsche-design-system-app',
6
+ template: `
7
+ <p-text class="text-[48px]" size="inherit">
8
+ <p-spinner class="me-static-sm" size="inherit" [aria]="{'aria-label': 'Loading page content'}"></p-spinner>
9
+ Some text
10
+ </p-text>
11
+ `,
12
+ changeDetection: ChangeDetectionStrategy.OnPush,
13
+ standalone: true,
14
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
15
+ })
16
+ export class ExampleComponent {}
@@ -0,0 +1,13 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
3
+
4
+ @Component({
5
+ selector: 'porsche-design-system-app',
6
+ template: `
7
+ <p-spinner class="[--p-spinner-size:48px]" [aria]="{'aria-label': 'Loading page content'}"></p-spinner>
8
+ `,
9
+ changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
12
+ })
13
+ export class ExampleComponent {}
@@ -0,0 +1,96 @@
1
+ # p-spinner
2
+
3
+ The `p-spinner` component indicates an indeterminate ongoing process and should be used when users must wait for loading or processing to finish.
4
+
5
+ There are unavoidable moments when the user has to wait for more than 1 second (for example due to technical processing of information or requests). These moments should be bridged with a good user feedback in order to not leave the user uncertain about what's currently happening - also to avoid a high bounce rate and to obtain a positive impression of your website or application.
6
+
7
+ For ongoing operations between 2-10 seconds, where the loading progress cannot be determined, use a **Spinner** (looped indicator) to inform the user about an ongoing operation. Use it either stand-alone (for example as page loader) or within components, such as in Buttons to indicate progress after clicking "save".
8
+
9
+ ## Usage
10
+
11
+ ### Do:
12
+
13
+ - Use when the user has to wait for more than 1 second.
14
+ - Use either stand-alone or within components (e.g. in Buttons to indicate progress after clicking "save“).
15
+ - Use vertically and horizontally centered within the referring area.
16
+ - Use a blocking layer for the whole screen when the user is not supposed to start another activity.
17
+ - Include simple text to explain why the user is waiting.
18
+ - Disable the component while the spinner is visible if it is triggered by an interaction.
19
+
20
+ ### Don't:
21
+
22
+ - Don't use too many Spinners at the same time within a page or application.
23
+ - Don't use Spinners for delays of more than 10 seconds without providing a progress bar showing the estimated waiting time.
24
+ - Don't use threatening text such as "Don't click again" to prevent the user from clicking twice.
25
+
26
+ ## Accessibility support
27
+
28
+ ### ARIA enhancements
29
+
30
+ #### External **ARIA** provided by the `aria` property:
31
+
32
+ | ARIA | Usage |
33
+ | --- | --- |
34
+ | `aria-label` | Defines a string value that labels the live region. |
35
+
36
+ #### Internal **ARIA** that is managed by the component:
37
+
38
+ | ARIA | Usage |
39
+ | --- | --- |
40
+ | `role="alert"` | Provided message is announced. |
41
+
42
+ ## Development considerations
43
+
44
+ ### Announcing loading messages
45
+
46
+ To provide feedback to screen reader users, it is mandatory to announce the loading state of the spinner. This can be achieved in the following ways:
47
+
48
+ - Pre-rendering the component in the DOM.
49
+ - Providing a meaningful loading state message through the `aria` property, e.g. `aria="{ 'aria-label': 'Start/End loading content'}"`.
50
+
51
+ ### Common do's and don'ts
52
+
53
+ - **Do** pre-render the spinner when loading feedback must be announced.
54
+ - **Do** provide a specific loading message through the `aria` prop.
55
+ - **Don't** mount the spinner only at the moment loading starts without a label.
56
+
57
+ ## Notes
58
+
59
+ ### Disable animation
60
+
61
+ For automated visual regression tests, the spinner animation can be disabled by setting a global CSS variable:
62
+
63
+ ```
64
+ :root {
65
+ --p-animation-duration: 0s !important;
66
+ }
67
+ ```
68
+
69
+ ## API
70
+
71
+ ### Properties
72
+
73
+ | Property | Type | Default | Description |
74
+ | --- | --- | --- | --- |
75
+ | `aria` | `SpinnerAriaAttribute` | `undefined` | Sets ARIA attributes on the spinner's live region element; use `aria-label` to provide a descriptive loading message for screen readers. |
76
+ | `color` | `'primary'` `'inherit'` | `'primary'` | Sets the color of the spinning indicator using PDS semantic color tokens (e.g. `primary`, `contrast-high`, `inherit`). |
77
+ | `size` | `'2xs'` `'xs'` `'sm'` `'md'` `'lg'` `'xl'` `'2xl'` `'3xl'` `'4xl'` `'5xl'` `'inherit'`<br>_deprecated:_ `'small'` `'medium'` `'large'`<br>`BreakpointCustomizable<SpinnerSize>` | `'sm'` | Sets the size of the spinner using the PDS typographic scale. Use `inherit` to derive the size from the parent element's font-size. Supports responsive breakpoint values. |
78
+
79
+ ### CSS Variables
80
+
81
+ | CSS Variable | Default | Description |
82
+ | --- | --- | --- |
83
+ | `--p-spinner-size` | — | Defines the width and height of the spinner. Overrides the `size` property when set. |
84
+ | `--p-spinner-color` | — | Defines the foreground color. Overrides the `color` property when set. |
85
+ | `--p-spinner-track-color` | — | Defines the track/background color. Overrides the `color` property when set. |
86
+
87
+ ## Examples
88
+
89
+ | Example | When to use | File |
90
+ | --- | --- | --- |
91
+ | Default | Minimal default configuration. | [./examples/Default.ts](./examples/Default.ts) |
92
+ | Size via Prop | There are predefined sizes for the component available which should cover most use cases. | [./examples/Size.ts](./examples/Size.ts) |
93
+ | Size via CSS Variable | Instead of using the `size` prop, the size can be controlled via the custom CSS variable `--p-spinner-size`, which accepts any valid CSS length value. | [./examples/SizeCssVar.ts](./examples/SizeCssVar.ts) |
94
+ | Responsive Size | The `size` property supports `BreakpointCustomizable` values, allowing you to define different sizes for each major breakpoint (`xs`, `s`, `m`, `l`, `xl`). | [./examples/ResponsiveSize.ts](./examples/ResponsiveSize.ts) |
95
+ | Color via Prop | The `color` property can be set to `inherit` to derive the spinner's color from the `currentcolor` of a parent element (e.g. a `p-text`). | [./examples/Color.ts](./examples/Color.ts) |
96
+ | Color via CSS Variable | Instead of using the `color` prop, the colors can be controlled via the custom CSS variables `--p-spinner-color` and `--p-spinner-track-color`, which accept any valid CSS color value. | [./examples/ColorCssVar.ts](./examples/ColorCssVar.ts) |
@@ -0,0 +1,26 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
3
+
4
+ @Component({
5
+ selector: 'porsche-design-system-app',
6
+ template: `
7
+ <p-stepper-horizontal>
8
+ <p-stepper-horizontal-item state="complete">
9
+ Step 1
10
+ </p-stepper-horizontal-item>
11
+ <p-stepper-horizontal-item state="warning">
12
+ Step 2
13
+ </p-stepper-horizontal-item>
14
+ <p-stepper-horizontal-item state="current">
15
+ Step 3
16
+ </p-stepper-horizontal-item>
17
+ <p-stepper-horizontal-item>
18
+ Step 4
19
+ </p-stepper-horizontal-item>
20
+ </p-stepper-horizontal>
21
+ `,
22
+ changeDetection: ChangeDetectionStrategy.OnPush,
23
+ standalone: true,
24
+ imports: [PorscheDesignSystemModule], // <-- PDS module is imported here
25
+ })
26
+ export class ExampleComponent {}