@porsche-design-system/components-react 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 (289) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/bin/pds-skill.js +259 -0
  3. package/esm/lib/components/button.wrapper.d.ts +2 -2
  4. package/esm/lib/components/link.wrapper.d.ts +2 -2
  5. package/package.json +4 -3
  6. package/skill/SKILL.md +136 -0
  7. package/skill/references/components/p-accordion/examples/Default.tsx +24 -0
  8. package/skill/references/components/p-accordion/examples/InteractiveElementsInSummary.tsx +28 -0
  9. package/skill/references/components/p-accordion/examples/StickySummary.tsx +24 -0
  10. package/skill/references/components/p-accordion/p-accordion.md +95 -0
  11. package/skill/references/components/p-ai-tag/examples/Default.tsx +10 -0
  12. package/skill/references/components/p-ai-tag/examples/WithinCheckbox.tsx +30 -0
  13. package/skill/references/components/p-ai-tag/examples/WithinFormLabel.tsx +37 -0
  14. package/skill/references/components/p-ai-tag/examples/WithinImage.tsx +13 -0
  15. package/skill/references/components/p-ai-tag/examples/WithinInputSearch.tsx +12 -0
  16. package/skill/references/components/p-ai-tag/examples/WithinRadioGroup.tsx +29 -0
  17. package/skill/references/components/p-ai-tag/examples/WithinTable.tsx +91 -0
  18. package/skill/references/components/p-ai-tag/examples/WithinText.tsx +14 -0
  19. package/skill/references/components/p-ai-tag/p-ai-tag.md +47 -0
  20. package/skill/references/components/p-banner/examples/Customization.tsx +35 -0
  21. package/skill/references/components/p-banner/examples/Default.tsx +24 -0
  22. package/skill/references/components/p-banner/p-banner.md +92 -0
  23. package/skill/references/components/p-button/examples/Default.tsx +12 -0
  24. package/skill/references/components/p-button/examples/Form.tsx +28 -0
  25. package/skill/references/components/p-button/examples/FormAttribute.tsx +31 -0
  26. package/skill/references/components/p-button/p-button.md +118 -0
  27. package/skill/references/components/p-button-pure/examples/CustomClickableArea.tsx +12 -0
  28. package/skill/references/components/p-button-pure/examples/Default.tsx +12 -0
  29. package/skill/references/components/p-button-pure/examples/Form.tsx +28 -0
  30. package/skill/references/components/p-button-pure/examples/FormAttribute.tsx +32 -0
  31. package/skill/references/components/p-button-pure/p-button-pure.md +118 -0
  32. package/skill/references/components/p-button-tile/examples/ColorScheme.tsx +15 -0
  33. package/skill/references/components/p-button-tile/examples/Default.tsx +18 -0
  34. package/skill/references/components/p-button-tile/examples/FooterSlot.tsx +29 -0
  35. package/skill/references/components/p-button-tile/examples/Hyphens.tsx +33 -0
  36. package/skill/references/components/p-button-tile/examples/UiBehaviour.tsx +41 -0
  37. package/skill/references/components/p-button-tile/p-button-tile.md +115 -0
  38. package/skill/references/components/p-canvas/examples/Default.tsx +10 -0
  39. package/skill/references/components/p-canvas/p-canvas.md +91 -0
  40. package/skill/references/components/p-carousel/examples/Default.tsx +23 -0
  41. package/skill/references/components/p-carousel/examples/DynamicSlides.tsx +32 -0
  42. package/skill/references/components/p-carousel/examples/FlexibleWidths.tsx +29 -0
  43. package/skill/references/components/p-carousel/examples/FocusOnCenterSlide.tsx +56 -0
  44. package/skill/references/components/p-carousel/examples/Intl.tsx +20 -0
  45. package/skill/references/components/p-carousel/examples/JumpToSlide.tsx +42 -0
  46. package/skill/references/components/p-carousel/p-carousel.md +142 -0
  47. package/skill/references/components/p-checkbox/examples/Default.tsx +10 -0
  48. package/skill/references/components/p-checkbox/examples/Form.tsx +45 -0
  49. package/skill/references/components/p-checkbox/examples/Indeterminate.tsx +13 -0
  50. package/skill/references/components/p-checkbox/examples/Slots.tsx +54 -0
  51. package/skill/references/components/p-checkbox/examples/WrappedLabel.tsx +24 -0
  52. package/skill/references/components/p-checkbox/p-checkbox.md +122 -0
  53. package/skill/references/components/p-crest/examples/CustomClickableArea.tsx +10 -0
  54. package/skill/references/components/p-crest/examples/Default.tsx +10 -0
  55. package/skill/references/components/p-crest/examples/Link.tsx +10 -0
  56. package/skill/references/components/p-crest/p-crest.md +65 -0
  57. package/skill/references/components/p-display/examples/Color.tsx +12 -0
  58. package/skill/references/components/p-display/examples/Default.tsx +12 -0
  59. package/skill/references/components/p-display/examples/Semantics.tsx +18 -0
  60. package/skill/references/components/p-display/examples/Size.tsx +12 -0
  61. package/skill/references/components/p-display/examples/SizeResponsive.tsx +12 -0
  62. package/skill/references/components/p-display/p-display.md +78 -0
  63. package/skill/references/components/p-divider/examples/Default.tsx +10 -0
  64. package/skill/references/components/p-divider/examples/Responsive.tsx +12 -0
  65. package/skill/references/components/p-divider/examples/Vertical.tsx +12 -0
  66. package/skill/references/components/p-divider/p-divider.md +49 -0
  67. package/skill/references/components/p-drilldown/examples/CustomContent.tsx +164 -0
  68. package/skill/references/components/p-drilldown/examples/Default.tsx +117 -0
  69. package/skill/references/components/p-drilldown/p-drilldown.md +168 -0
  70. package/skill/references/components/p-fieldset/examples/Default.tsx +12 -0
  71. package/skill/references/components/p-fieldset/examples/Required.tsx +13 -0
  72. package/skill/references/components/p-fieldset/examples/SlottedLabel.tsx +15 -0
  73. package/skill/references/components/p-fieldset/examples/SlottedMessage.tsx +15 -0
  74. package/skill/references/components/p-fieldset/p-fieldset.md +88 -0
  75. package/skill/references/components/p-flag/examples/Default.tsx +10 -0
  76. package/skill/references/components/p-flag/examples/ResponsiveSize.tsx +10 -0
  77. package/skill/references/components/p-flag/examples/Size.tsx +13 -0
  78. package/skill/references/components/p-flag/examples/SizeCssVar.tsx +10 -0
  79. package/skill/references/components/p-flag/p-flag.md +68 -0
  80. package/skill/references/components/p-flyout/examples/CustomStyling.tsx +45 -0
  81. package/skill/references/components/p-flyout/examples/Default.tsx +42 -0
  82. package/skill/references/components/p-flyout/examples/Form.tsx +54 -0
  83. package/skill/references/components/p-flyout/examples/StickyTop.tsx +42 -0
  84. package/skill/references/components/p-flyout/p-flyout.md +128 -0
  85. package/skill/references/components/p-heading/examples/Color.tsx +12 -0
  86. package/skill/references/components/p-heading/examples/Default.tsx +12 -0
  87. package/skill/references/components/p-heading/examples/Semantics.tsx +18 -0
  88. package/skill/references/components/p-heading/p-heading.md +78 -0
  89. package/skill/references/components/p-icon/examples/Color.tsx +13 -0
  90. package/skill/references/components/p-icon/examples/ColorCssVar.tsx +10 -0
  91. package/skill/references/components/p-icon/examples/Custom.tsx +10 -0
  92. package/skill/references/components/p-icon/examples/Default.tsx +10 -0
  93. package/skill/references/components/p-icon/examples/Overview.tsx +588 -0
  94. package/skill/references/components/p-icon/examples/ResponsiveSize.tsx +10 -0
  95. package/skill/references/components/p-icon/examples/Size.tsx +13 -0
  96. package/skill/references/components/p-icon/examples/SizeCssVar.tsx +10 -0
  97. package/skill/references/components/p-icon/p-icon.md +88 -0
  98. package/skill/references/components/p-inline-notification/examples/ActionButton.tsx +25 -0
  99. package/skill/references/components/p-inline-notification/examples/Default.tsx +10 -0
  100. package/skill/references/components/p-inline-notification/examples/EventHandling.tsx +25 -0
  101. package/skill/references/components/p-inline-notification/p-inline-notification.md +74 -0
  102. package/skill/references/components/p-input-date/examples/Default.tsx +10 -0
  103. package/skill/references/components/p-input-date/examples/Form.tsx +45 -0
  104. package/skill/references/components/p-input-date/examples/Slots.tsx +41 -0
  105. package/skill/references/components/p-input-date/p-input-date.md +142 -0
  106. package/skill/references/components/p-input-email/examples/Default.tsx +10 -0
  107. package/skill/references/components/p-input-email/examples/Form.tsx +51 -0
  108. package/skill/references/components/p-input-email/examples/Slots.tsx +41 -0
  109. package/skill/references/components/p-input-email/p-input-email.md +146 -0
  110. package/skill/references/components/p-input-month/examples/Default.tsx +10 -0
  111. package/skill/references/components/p-input-month/examples/Form.tsx +45 -0
  112. package/skill/references/components/p-input-month/examples/Slots.tsx +41 -0
  113. package/skill/references/components/p-input-month/p-input-month.md +142 -0
  114. package/skill/references/components/p-input-number/examples/Default.tsx +10 -0
  115. package/skill/references/components/p-input-number/examples/Form.tsx +51 -0
  116. package/skill/references/components/p-input-number/examples/Slots.tsx +41 -0
  117. package/skill/references/components/p-input-number/p-input-number.md +150 -0
  118. package/skill/references/components/p-input-password/examples/Default.tsx +10 -0
  119. package/skill/references/components/p-input-password/examples/Form.tsx +51 -0
  120. package/skill/references/components/p-input-password/examples/Slots.tsx +39 -0
  121. package/skill/references/components/p-input-password/examples/Toggle.tsx +10 -0
  122. package/skill/references/components/p-input-password/p-input-password.md +145 -0
  123. package/skill/references/components/p-input-search/examples/AriaCombobox.tsx +35 -0
  124. package/skill/references/components/p-input-search/examples/Default.tsx +10 -0
  125. package/skill/references/components/p-input-search/examples/Form.tsx +52 -0
  126. package/skill/references/components/p-input-search/examples/Slots.tsx +41 -0
  127. package/skill/references/components/p-input-search/p-input-search.md +182 -0
  128. package/skill/references/components/p-input-tel/examples/Default.tsx +10 -0
  129. package/skill/references/components/p-input-tel/examples/Form.tsx +45 -0
  130. package/skill/references/components/p-input-tel/examples/Slots.tsx +41 -0
  131. package/skill/references/components/p-input-tel/p-input-tel.md +145 -0
  132. package/skill/references/components/p-input-text/examples/Controlled.tsx +36 -0
  133. package/skill/references/components/p-input-text/examples/Default.tsx +10 -0
  134. package/skill/references/components/p-input-text/examples/Form.tsx +45 -0
  135. package/skill/references/components/p-input-text/examples/Slots.tsx +41 -0
  136. package/skill/references/components/p-input-text/p-input-text.md +150 -0
  137. package/skill/references/components/p-input-time/examples/Default.tsx +10 -0
  138. package/skill/references/components/p-input-time/examples/Form.tsx +45 -0
  139. package/skill/references/components/p-input-time/examples/Slots.tsx +41 -0
  140. package/skill/references/components/p-input-time/p-input-time.md +144 -0
  141. package/skill/references/components/p-input-url/examples/Default.tsx +10 -0
  142. package/skill/references/components/p-input-url/examples/Form.tsx +45 -0
  143. package/skill/references/components/p-input-url/examples/Slots.tsx +41 -0
  144. package/skill/references/components/p-input-url/p-input-url.md +145 -0
  145. package/skill/references/components/p-input-week/examples/Default.tsx +10 -0
  146. package/skill/references/components/p-input-week/examples/Form.tsx +45 -0
  147. package/skill/references/components/p-input-week/examples/Slots.tsx +41 -0
  148. package/skill/references/components/p-input-week/p-input-week.md +142 -0
  149. package/skill/references/components/p-link/examples/Default.tsx +12 -0
  150. package/skill/references/components/p-link/examples/FrameworkRouting.tsx +14 -0
  151. package/skill/references/components/p-link/examples/Icon.tsx +17 -0
  152. package/skill/references/components/p-link/p-link.md +101 -0
  153. package/skill/references/components/p-link-pure/examples/CustomClickableArea.tsx +12 -0
  154. package/skill/references/components/p-link-pure/examples/Default.tsx +12 -0
  155. package/skill/references/components/p-link-pure/examples/FrameworkRouting.tsx +14 -0
  156. package/skill/references/components/p-link-pure/examples/Icon.tsx +17 -0
  157. package/skill/references/components/p-link-pure/p-link-pure.md +110 -0
  158. package/skill/references/components/p-link-tile/examples/ColorScheme.tsx +15 -0
  159. package/skill/references/components/p-link-tile/examples/Default.tsx +18 -0
  160. package/skill/references/components/p-link-tile/examples/FooterSlot.tsx +29 -0
  161. package/skill/references/components/p-link-tile/examples/Hyphens.tsx +34 -0
  162. package/skill/references/components/p-link-tile/examples/UiBehaviour.tsx +41 -0
  163. package/skill/references/components/p-link-tile/examples/WithVideo.tsx +15 -0
  164. package/skill/references/components/p-link-tile/p-link-tile.md +105 -0
  165. package/skill/references/components/p-link-tile-product/examples/Default.tsx +22 -0
  166. package/skill/references/components/p-link-tile-product/examples/FrameworkRouting.tsx +25 -0
  167. package/skill/references/components/p-link-tile-product/p-link-tile-product.md +93 -0
  168. package/skill/references/components/p-modal/examples/AlertDialog.tsx +39 -0
  169. package/skill/references/components/p-modal/examples/CustomStyling.tsx +26 -0
  170. package/skill/references/components/p-modal/examples/Default.tsx +39 -0
  171. package/skill/references/components/p-modal/examples/Scrollable.tsx +43 -0
  172. package/skill/references/components/p-modal/p-modal.md +135 -0
  173. package/skill/references/components/p-model-signature/examples/CustomStyling.tsx +14 -0
  174. package/skill/references/components/p-model-signature/examples/Default.tsx +10 -0
  175. package/skill/references/components/p-model-signature/examples/MaskBlendMode.tsx +32 -0
  176. package/skill/references/components/p-model-signature/examples/MaskImage.tsx +12 -0
  177. package/skill/references/components/p-model-signature/examples/MaskVideo.tsx +12 -0
  178. package/skill/references/components/p-model-signature/examples/SafeZone.tsx +60 -0
  179. package/skill/references/components/p-model-signature/p-model-signature.md +62 -0
  180. package/skill/references/components/p-multi-select/examples/AsyncFilter.tsx +136 -0
  181. package/skill/references/components/p-multi-select/examples/Default.tsx +29 -0
  182. package/skill/references/components/p-multi-select/examples/Form.tsx +53 -0
  183. package/skill/references/components/p-multi-select/examples/Optgroups.tsx +42 -0
  184. package/skill/references/components/p-multi-select/examples/SelectedSlot.tsx +94 -0
  185. package/skill/references/components/p-multi-select/examples/SetValue.tsx +80 -0
  186. package/skill/references/components/p-multi-select/examples/Slots.tsx +48 -0
  187. package/skill/references/components/p-multi-select/p-multi-select.md +197 -0
  188. package/skill/references/components/p-pagination/examples/Default.tsx +10 -0
  189. package/skill/references/components/p-pagination/p-pagination.md +83 -0
  190. package/skill/references/components/p-pin-code/examples/CopyPaste.tsx +10 -0
  191. package/skill/references/components/p-pin-code/examples/Default.tsx +10 -0
  192. package/skill/references/components/p-pin-code/examples/Form.tsx +45 -0
  193. package/skill/references/components/p-pin-code/examples/Slots.tsx +39 -0
  194. package/skill/references/components/p-pin-code/p-pin-code.md +109 -0
  195. package/skill/references/components/p-popover/examples/Default.tsx +14 -0
  196. package/skill/references/components/p-popover/examples/SlottedButton.tsx +15 -0
  197. package/skill/references/components/p-popover/p-popover.md +116 -0
  198. package/skill/references/components/p-radio-group/examples/Default.tsx +17 -0
  199. package/skill/references/components/p-radio-group/examples/Form.tsx +53 -0
  200. package/skill/references/components/p-radio-group/examples/Slots.tsx +69 -0
  201. package/skill/references/components/p-radio-group/p-radio-group.md +157 -0
  202. package/skill/references/components/p-scroller/examples/Default.tsx +51 -0
  203. package/skill/references/components/p-scroller/examples/Height.tsx +26 -0
  204. package/skill/references/components/p-scroller/examples/ScrollToPosition.tsx +58 -0
  205. package/skill/references/components/p-scroller/p-scroller.md +93 -0
  206. package/skill/references/components/p-segmented-control/examples/Default.tsx +26 -0
  207. package/skill/references/components/p-segmented-control/examples/Form.tsx +52 -0
  208. package/skill/references/components/p-segmented-control/examples/Slots.tsx +54 -0
  209. package/skill/references/components/p-segmented-control/examples/WithLabels.tsx +26 -0
  210. package/skill/references/components/p-segmented-control/p-segmented-control.md +162 -0
  211. package/skill/references/components/p-select/examples/AsyncFilter.tsx +136 -0
  212. package/skill/references/components/p-select/examples/Default.tsx +29 -0
  213. package/skill/references/components/p-select/examples/Form.tsx +53 -0
  214. package/skill/references/components/p-select/examples/Optgroups.tsx +42 -0
  215. package/skill/references/components/p-select/examples/Required.tsx +48 -0
  216. package/skill/references/components/p-select/examples/SelectedSlot.tsx +124 -0
  217. package/skill/references/components/p-select/examples/SetValue.tsx +80 -0
  218. package/skill/references/components/p-select/examples/Slots.tsx +48 -0
  219. package/skill/references/components/p-select/examples/SlottedImages.tsx +35 -0
  220. package/skill/references/components/p-select/p-select.md +194 -0
  221. package/skill/references/components/p-sheet/examples/Default.tsx +31 -0
  222. package/skill/references/components/p-sheet/p-sheet.md +121 -0
  223. package/skill/references/components/p-spinner/examples/Color.tsx +13 -0
  224. package/skill/references/components/p-spinner/examples/ColorCssVar.tsx +10 -0
  225. package/skill/references/components/p-spinner/examples/Default.tsx +10 -0
  226. package/skill/references/components/p-spinner/examples/ResponsiveSize.tsx +10 -0
  227. package/skill/references/components/p-spinner/examples/Size.tsx +13 -0
  228. package/skill/references/components/p-spinner/examples/SizeCssVar.tsx +10 -0
  229. package/skill/references/components/p-spinner/p-spinner.md +96 -0
  230. package/skill/references/components/p-stepper-horizontal/examples/Default.tsx +23 -0
  231. package/skill/references/components/p-stepper-horizontal/examples/FrameworkImplementation.tsx +100 -0
  232. package/skill/references/components/p-stepper-horizontal/p-stepper-horizontal.md +109 -0
  233. package/skill/references/components/p-switch/examples/Default.tsx +19 -0
  234. package/skill/references/components/p-switch/p-switch.md +103 -0
  235. package/skill/references/components/p-table/examples/Advanced.tsx +186 -0
  236. package/skill/references/components/p-table/examples/CaptionProperty.tsx +37 -0
  237. package/skill/references/components/p-table/examples/CaptionSlot.tsx +40 -0
  238. package/skill/references/components/p-table/examples/Default.tsx +117 -0
  239. package/skill/references/components/p-table/examples/HideLabel.tsx +37 -0
  240. package/skill/references/components/p-table/examples/LayoutFixed.tsx +50 -0
  241. package/skill/references/components/p-table/examples/Sorting.tsx +86 -0
  242. package/skill/references/components/p-table/p-table.md +189 -0
  243. package/skill/references/components/p-tabs/examples/ActiveTab.tsx +26 -0
  244. package/skill/references/components/p-tabs/examples/Default.tsx +26 -0
  245. package/skill/references/components/p-tabs/examples/Gradient.tsx +111 -0
  246. package/skill/references/components/p-tabs/examples/Labelling.tsx +26 -0
  247. package/skill/references/components/p-tabs/p-tabs.md +136 -0
  248. package/skill/references/components/p-tabs-bar/examples/Default.tsx +27 -0
  249. package/skill/references/components/p-tabs-bar/examples/Gradient.tsx +78 -0
  250. package/skill/references/components/p-tabs-bar/examples/Labelling.tsx +27 -0
  251. package/skill/references/components/p-tabs-bar/examples/Links.tsx +20 -0
  252. package/skill/references/components/p-tabs-bar/p-tabs-bar.md +181 -0
  253. package/skill/references/components/p-tag/examples/Default.tsx +12 -0
  254. package/skill/references/components/p-tag/examples/Multiline.tsx +14 -0
  255. package/skill/references/components/p-tag/examples/SlottedButton.tsx +41 -0
  256. package/skill/references/components/p-tag/examples/SlottedLink.tsx +41 -0
  257. package/skill/references/components/p-tag/p-tag.md +66 -0
  258. package/skill/references/components/p-tag-dismissible/examples/Default.tsx +12 -0
  259. package/skill/references/components/p-tag-dismissible/p-tag-dismissible.md +75 -0
  260. package/skill/references/components/p-text/examples/Default.tsx +12 -0
  261. package/skill/references/components/p-text/examples/Semantics.tsx +18 -0
  262. package/skill/references/components/p-text/examples/Size.tsx +12 -0
  263. package/skill/references/components/p-text/examples/SizeResponsive.tsx +12 -0
  264. package/skill/references/components/p-text/p-text.md +68 -0
  265. package/skill/references/components/p-text-list/examples/Default.tsx +28 -0
  266. package/skill/references/components/p-text-list/p-text-list.md +68 -0
  267. package/skill/references/components/p-textarea/examples/Default.tsx +10 -0
  268. package/skill/references/components/p-textarea/examples/Form.tsx +45 -0
  269. package/skill/references/components/p-textarea/examples/Slots.tsx +39 -0
  270. package/skill/references/components/p-textarea/p-textarea.md +122 -0
  271. package/skill/references/components/p-toast/examples/Default.tsx +22 -0
  272. package/skill/references/components/p-toast/p-toast.md +61 -0
  273. package/skill/references/components/p-wordmark/examples/CustomClickableArea.tsx +10 -0
  274. package/skill/references/components/p-wordmark/examples/Default.tsx +10 -0
  275. package/skill/references/components/p-wordmark/examples/Size.tsx +10 -0
  276. package/skill/references/components/p-wordmark/p-wordmark.md +66 -0
  277. package/skill/references/icons.md +5 -0
  278. package/skill/references/styles/emotion.md +439 -0
  279. package/skill/references/styles/scss.md +402 -0
  280. package/skill/references/styles/tailwindcss.md +356 -0
  281. package/skill/references/styles/vanilla-extract.md +444 -0
  282. package/skill/references/stylesheets.md +331 -0
  283. package/skill/references/tokens.md +323 -0
  284. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +1 -1
  285. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +1 -1
  286. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +1 -1
  287. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1 -1
  288. package/ssr/esm/lib/components/button.wrapper.d.ts +2 -2
  289. package/ssr/esm/lib/components/link.wrapper.d.ts +2 -2
@@ -0,0 +1,181 @@
1
+ # p-tabs-bar
2
+
3
+ The `p-tabs-bar` component is a styled button/link list for multiple purposes. You can use it with your framework router to ensure your **window location** updates on tab click, use it for **hash routing** and displaying content accordingly to the hash, as **skip navigation** to move on a longer page or to **change the state** of another element and therefore change the appearance of your content.
4
+
5
+ The component does not handle the display of your content. If you use the component you have to manually care for the content to be rendered beneath. To help with this task the component triggers an event called `update` with the index of the active tab.
6
+
7
+ If you intend to only change content on tab-click without location changes and you are fine that the content needs to be pre-rendered then we prepared a component which also handles the correct display of content according to the active tab. Have a look at the [Tabs](../p-tabs/p-tabs.md) component.
8
+
9
+ It is a controlled component. This means it does not contain any internal state, and you are in full control over its behavior.
10
+
11
+ > **Important note**
12
+ >
13
+ > For documentation purpose we use `<button>` tags in the examples below to make them clickable without changing the route. For route changes it is mandatory to use `<a>` tags with `href` in your application. And be aware of that it's not allowed to mix and match `<button>` with `<a>` tags as direct children in the component!
14
+
15
+ Basic implementation is a tab bar with tabs to switch between the content. Just put `<button>` tags if you need to change e.g. the state on tab-click or `<a>` tags, if you also have to manipulate the window location, inside the `<p-tabs-bar>` component and it will handle all styling behaviors.
16
+
17
+ In order to get notified when the active tabs change, you need to register an event listener for the `update` event which is emitted by `p-tabs-bar`.
18
+
19
+ ## Usage
20
+
21
+ ### Do:
22
+
23
+ - Use as an anchor navigation to jump to a section on a longer page.
24
+ - Use it to switch between different stages of content.
25
+ - Use it to show different types of elements.
26
+
27
+ ### Don't:
28
+
29
+ - Don't place more than six tabs within a group.
30
+ - Don't use more than two words for a tab label whenever possible.
31
+ - Don't use it for primary navigation.
32
+
33
+ ---
34
+
35
+ ## Related Component
36
+
37
+ - [Tabs](../p-tabs/p-tabs.md)
38
+ - [Pagination](../p-pagination/p-pagination.md)
39
+
40
+ ## Accessibility support
41
+
42
+ ### Keyboard
43
+
44
+ #### Tabs Bar as a tabbed interface
45
+
46
+ | Key / state | Function |
47
+ | --- | --- |
48
+ | `Tab` | - Moves focus to the active tab. - When the tab list contains the focus, moves focus to the next element in the tab sequence, which is the `tabpanel` element. |
49
+ | `Right Arrow`, `Left Arrow` | - Moves focus to the next tab. - Activates the newly focused tab. - If focus is on the last tab, moves focus to the first tab. |
50
+ | `Home`, `End` | - Moves focus to the first/last tab and activates it. |
51
+
52
+ #### Tabs Bar as link list
53
+
54
+ | Key / state | Function |
55
+ | --- | --- |
56
+ | `Tab`, `Shift-Tab` | Moves focus to next (or previous) focusable element. |
57
+ | `Enter` | Activates the link. |
58
+
59
+ ### ARIA enhancements
60
+
61
+ #### External **ARIA** provided by the `aria` property:
62
+
63
+ | ARIA | Usage |
64
+ | --- | --- |
65
+ | `aria-label="STRING"` | Defines a string value that labels the tablist when used as a tabbed interface. |
66
+ | `aria-description="STRING"` | Defines a string value that adds a more detailed description of the tablist. |
67
+
68
+ The `aria` property applies only when the component is used as a **tabbed interface** with `<button>` children. It is not applied when the component is used as a **link list** with `<a>` children.
69
+
70
+ #### Internal **ARIA** that is managed by the component:
71
+
72
+ | ARIA | Usage |
73
+ | --- | --- |
74
+ | `role="tablist"` | Indicates that the element serves as a container for a set of tabs. |
75
+ | `role="tab"` | Indicates the button serves as a tab control. |
76
+ | `aria-selected="BOOLEAN"` | Indicates whether the tab is selected and whether its associated tabpanel is visible. |
77
+
78
+ ## Development considerations
79
+
80
+ ### Labelling
81
+
82
+ When multiple tab bars appear on the same page, or when the purpose of the tabs is not clear from the visible tab labels alone, provide a descriptive accessible name for the tablist using the `aria` property, e.g.: `<p-tabs-bar aria="{ 'aria-label': 'Some label for the tablist', 'aria-description': 'Some description for the tablist' }">`.
83
+
84
+ ### ARIA enhancements if used as a tabbed interface
85
+
86
+ The `p-tabs-bar` component is detached from the content (`tabpanel`) which belongs to the active tab. To be truly accessible you need to provide additional ARIA attributes, because every tab (`button`) needs an `aria-controls` attribute which points to the corresponding `id` of the `tabpanel`. The content placeholder needs the `role="tabpanel"` and the attribute `aria-labelledby` which points to the unique `id` of the corresponding tab (`button`).
87
+
88
+ You must also take care of the **focus handling** of the `tabpanel`. Therefore, the active tab panel must have a `tabindex="0"` to receive keyboard focus and the focus indicator must be styled accordingly. Use the provided focus style like this:
89
+
90
+ ```html
91
+ <p-tabs-bar
92
+ aria="{ 'aria-label': 'Some label for the tablist', 'aria-description': 'Some description for the tablist' }"
93
+ active-tab-index="0"
94
+ >
95
+ <button type="button" id="tab-item-0" aria-controls="tab-panel-0">Tab One</button>
96
+ <button type="button" id="tab-item-1" aria-controls="tab-panel-1">Tab Two</button>
97
+ <button type="button" id="tab-item-2" aria-controls="tab-panel-2">Tab Three</button>
98
+ </p-tabs-bar>
99
+ <div id="tab-panel-0" role="tabpanel" tabindex="0" aria-labelledby="tab-item-0">
100
+ <p-text>Your content of Tab 1</p-text>
101
+ </div>
102
+ <div id="tab-panel-1" role="tabpanel" hidden tabindex="-1" aria-labelledby="tab-item-1">
103
+ <p-text>Your content of Tab 2</p-text>
104
+ </div>
105
+ <div id="tab-panel-2" role="tabpanel" hidden tabindex="-1" aria-labelledby="tab-item-2">
106
+ <p-text>Your content of Tab 3</p-text>
107
+ </div>
108
+ ```
109
+
110
+ ```scss
111
+ p-tabs-bar ~ [tabindex='0'][role='tabpanel'] {
112
+ @include pds-focus;
113
+ }
114
+ ```
115
+
116
+ ### ARIA enhancements if used as a link list
117
+
118
+ #### Route based navigation
119
+
120
+ If the `p-tabs-bar` is used as a link list (navigation context), the semantics of that UI component changes completely - from a **tabbed interface** where content changes happen **on-site** to a **list of links** where content changes are **route-based**. Therefore, additional ARIA attributes **must not** be provided for tab identification. The `p-tabs-bar` component manages this also internally.
121
+
122
+ To enhance accessibility even further, wrap the `p-tabs-bar` in a `<nav>` element with an `aria-label` attribute. Additionally, an `aria-current="page"` attribute should be provided to the active link.
123
+
124
+ ```html
125
+ <nav aria-label="Label for the navigation">
126
+ <p-tabs-bar>
127
+ <a href="https://porsche.com/page-1" aria-current="page">Page One</a>
128
+ <a href="https://porsche.com/page-2">Page Two</a>
129
+ <a href="https://porsche.com/page-3">Page Three</a>
130
+ </p-tabs-bar>
131
+ </nav>
132
+ ```
133
+
134
+ #### In-page jump navigation
135
+
136
+ If the `p-tabs-bar` is used as an in-page jump navigation, you should follow the same rules as for the route-based variant except that `aria-current="page"` should not be used.
137
+
138
+ ### Common do's and don'ts
139
+
140
+ - **Do** pass tablist ARIA through the `aria` prop when using a tabbed interface.
141
+ - **Do** wrap route-based navigation in `<nav>` with a descriptive `aria-label`.
142
+ - **Do** wire `aria-controls`, `role="tabpanel"`, and `aria-labelledby` in the host application for tab interfaces.
143
+ - **Don't** add tab semantics when the component is used as a link list for route-based navigation.
144
+
145
+ ## API
146
+
147
+ ### Properties
148
+
149
+ | Property | Type | Default | Description |
150
+ | --- | --- | --- | --- |
151
+ | `activeTabIndex` | `number | undefined` | `undefined` | Sets the zero-based index of the currently active tab. Pass `undefined` to render all tabs in an unselected state. |
152
+ | `aria` | `TabsBarAriaAttribute` | `undefined` | Sets ARIA attributes on the tablist, such as `aria-label` and `aria-description`. |
153
+ | `background` | `'canvas'` `'surface'` `'frosted'` `'none'` | `'none'` | Sets the background color of the tabs bar. Use `frosted` only when placed on top of images, videos, or gradients. |
154
+ | `compact` | `boolean` | `undefined` | Reduces the tab height and padding for use in dense layouts where vertical space is limited. |
155
+ | `size` | `'small'` `'medium'`<br>`BreakpointCustomizable<TabsBarSize>` | `'small'` | Sets the font size of the tab labels using the PDS typographic scale. Supports responsive breakpoint values. |
156
+ | `weight` _(deprecated)_ | `'regular'` `'semi-bold'` | `'regular'` | @deprecated Will be removed in the next major release. Has no effect anymore. |
157
+
158
+ ### Events
159
+
160
+ | Event | Type | Description |
161
+ | --- | --- | --- |
162
+ | `update` | `CustomEvent<TabsBarUpdateEventDetail>`<br>`{ activeTabIndex: number }` | Emitted when the user clicks a different tab, carrying the new `activeTabIndex` in the event detail. |
163
+
164
+ ### Controlled properties
165
+
166
+ - `activeTabIndex` — a controlled prop: the component does **not** update it itself. Handle the `update` event and assign the new value to `activeTabIndex` yourself, or the change will not take effect.
167
+
168
+ ### Slots
169
+
170
+ | Slot | Required | Allowed tag names | Description |
171
+ | --- | --- | --- | --- |
172
+ | _(default)_ | no | — | Default slot for the `button` or `a` tags which will be rendered as tabs. |
173
+
174
+ ## Examples
175
+
176
+ | Example | When to use | File |
177
+ | --- | --- | --- |
178
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
179
+ | Links | If the `p-tabs-bar` is used as a link list (navigation context), the semantics of that UI component changes completely - from a **tabbed interface** where content changes happen **on-site** to a **list of links** where content changes are **route-based**. | [./examples/Links.tsx](./examples/Links.tsx) |
180
+ | Gradient color | If the amount of tabs exceeds the viewport, the component renders arrow-buttons to help with horizontal scrolling. | [./examples/Gradient.tsx](./examples/Gradient.tsx) |
181
+ | Labelling | Use the `aria` property to provide an accessible name and optional description for the tablist when the component is used as a tabbed interface with `<button>` children. | [./examples/Labelling.tsx](./examples/Labelling.tsx) |
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { PTag } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PTag>
8
+ Some label
9
+ </PTag>
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { PTag } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <div className="w-[100px]">
8
+ <PTag variant="success" className="whitespace-normal">
9
+ Some label with longer text wrapped in a narrow container
10
+ </PTag>
11
+ </div>
12
+ </>
13
+ )
14
+ }
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { PTag } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <div className="flex flex-wrap gap-static-md">
8
+ <PTag icon="car" variant="primary">
9
+ <button type="button">
10
+ Variant primary
11
+ </button>
12
+ </PTag>
13
+ <PTag variant="secondary">
14
+ <button type="button">
15
+ Variant secondary
16
+ </button>
17
+ </PTag>
18
+ <PTag variant="info">
19
+ <button type="button">
20
+ Variant info
21
+ </button>
22
+ </PTag>
23
+ <PTag variant="warning">
24
+ <button type="button">
25
+ Variant warning
26
+ </button>
27
+ </PTag>
28
+ <PTag variant="success">
29
+ <button type="button">
30
+ Variant success
31
+ </button>
32
+ </PTag>
33
+ <PTag variant="error">
34
+ <button type="button">
35
+ Variant error
36
+ </button>
37
+ </PTag>
38
+ </div>
39
+ </>
40
+ )
41
+ }
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { PTag } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <div className="flex flex-wrap gap-static-md">
8
+ <PTag icon="car" variant="primary">
9
+ <a href="https://porsche.com">
10
+ Variant primary
11
+ </a>
12
+ </PTag>
13
+ <PTag variant="secondary">
14
+ <a href="https://porsche.com">
15
+ Variant secondary
16
+ </a>
17
+ </PTag>
18
+ <PTag variant="info">
19
+ <a href="https://porsche.com">
20
+ Variant info
21
+ </a>
22
+ </PTag>
23
+ <PTag variant="warning">
24
+ <a href="https://porsche.com">
25
+ Variant warning
26
+ </a>
27
+ </PTag>
28
+ <PTag variant="success">
29
+ <a href="https://porsche.com">
30
+ Variant success
31
+ </a>
32
+ </PTag>
33
+ <PTag variant="error">
34
+ <a href="https://porsche.com">
35
+ Variant error
36
+ </a>
37
+ </PTag>
38
+ </div>
39
+ </>
40
+ )
41
+ }
@@ -0,0 +1,66 @@
1
+ # p-tag
2
+
3
+ `p-tag` is used to label, categorize, or organize items by using keywords that describe them.
4
+
5
+ ## Usage
6
+
7
+ Use tags to label, categorize, or organize items using keywords that describe them.
8
+
9
+ ### Do:
10
+
11
+ - Use to indicate or highlight a certain attribute of an item.
12
+ - Use to show that content is mapped to one or multiple categories.
13
+ - Use to indicate that a certain filter is active.
14
+ - Use short labeling for easy scanning.
15
+ - Have a large number of tags horizontally scrollable, swipeable, or navigable with arrows.
16
+ - Have tags in a predefined space and move to the next line once they meet the boundary.
17
+ - Use color themes such as success, neutral, warning, and error for better visual perception
18
+ - Include icons to improve the faster perception.
19
+ - Add a link for further explanation about the tag for better understandability (With modal).
20
+ - Add a link for additional information that is not necessary for the task completion (With modal).
21
+
22
+ ### Don't:
23
+
24
+ - Don't use more than two words (only if necessary).
25
+ - Don't implement something else than a link or button.
26
+ - Don't use Tags for navigation.
27
+
28
+ ## Accessibility support
29
+
30
+ This component does not include any special accessibility features.
31
+
32
+ ## Development considerations
33
+
34
+ Tags should communicate status or category in visible text. Do not rely on color or icon alone.
35
+
36
+ ### Common do's and don'ts
37
+
38
+ - **Do** include descriptive text in the default slot.
39
+ - **Do** use color and icon as supporting cues, not the only indicator.
40
+ - **Don't** use an icon-only tag without visible text.
41
+
42
+ ## API
43
+
44
+ ### Properties
45
+
46
+ | Property | Type | Default | Description |
47
+ | --- | --- | --- | --- |
48
+ | `compact` | `boolean` | `false` | Reduces the tag's padding and height for use in dense layouts where vertical space is limited. |
49
+ | `icon` | `'none'`<br>one of 290 icon names — see [icon names](references/icons.md) | `'none'` | Sets the icon displayed inside the tag alongside the label. Use `none` to render the tag without an icon. |
50
+ | `iconSource` | `string` | `undefined` | Sets a URL to a custom SVG icon, overriding the built-in icon set when a brand-specific icon is needed. |
51
+ | `variant` | `'primary'` `'secondary'` `'info'` `'info-frosted'` `'warning'` `'warning-frosted'` `'success'` `'success-frosted'` `'error'` `'error-frosted'` | `'secondary'` | Sets the visual style of the tag, which controls its background and text colors (e.g. `primary`, `secondary`, `notification-info`). |
52
+
53
+ ### Slots
54
+
55
+ | Slot | Required | Allowed tag names | Description |
56
+ | --- | --- | --- | --- |
57
+ | _(default)_ | no | — | Default slot for the tag content. |
58
+
59
+ ## Examples
60
+
61
+ | Example | When to use | File |
62
+ | --- | --- | --- |
63
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
64
+ | With slotted button | It is possible to add a `<button>` tag into the `p-tag` component. | [./examples/SlottedButton.tsx](./examples/SlottedButton.tsx) |
65
+ | With slotted link | It is possible to add an `<a>` tag to the `p-tag` component. | [./examples/SlottedLink.tsx](./examples/SlottedLink.tsx) |
66
+ | Multiline | The contents of the `p-tag` component are rendered with `white-space: nowrap` by default. | [./examples/Multiline.tsx](./examples/Multiline.tsx) |
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { PTagDismissible } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PTagDismissible>
8
+ Some label
9
+ </PTagDismissible>
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,75 @@
1
+ # p-tag-dismissible
2
+
3
+ `p-tag-dismissible` is used in contexts where the user can actively remove a tag. It is often seen in filtering.
4
+
5
+ ## Usage
6
+
7
+ Allows users to quickly refine the result of data they want to be presented on the page.
8
+
9
+ ### Do:
10
+
11
+ - Use to show that a certain filter is active.
12
+ - Use this component with a label if additional information is needed (e.g. category an attribute/filter refers to).
13
+
14
+ ### Don't:
15
+
16
+ - Don't use it for other interactions than dismissing a selection.
17
+ - Don't have long content that causes multiline.
18
+
19
+ ## Accessibility support
20
+
21
+ ### Keyboard
22
+
23
+ | Key / state | Function |
24
+ | --- | --- |
25
+ | `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element. |
26
+ | `Enter`, `Space` | Removes the element. |
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 interactive element. |
35
+
36
+ #### Internal **ARIA** that is managed by the component:
37
+
38
+ | ARIA | Usage |
39
+ | --- | --- |
40
+ | `aria-hidden="true"` | The "close" icon is hidden from assistive technologies. |
41
+
42
+ ## Development considerations
43
+
44
+ ### Focus handling
45
+
46
+ Ensure that when a `p-tag-dismissible` is removed, the focus is set to the previous or next `p-tag-dismissible` or to another focusable element. This prevents losing the focus order.
47
+
48
+ ### Common do's and don'ts
49
+
50
+ - **Do** provide a visible `label` that describes the tag content.
51
+ - **Do** pass dismiss-button ARIA through the `aria` prop when the default action text is insufficient.
52
+ - **Do** move focus to a sensible target after removing a tag.
53
+ - **Don't** add native `aria-*` attributes directly on the component host.
54
+
55
+ ## API
56
+
57
+ ### Properties
58
+
59
+ | Property | Type | Default | Description |
60
+ | --- | --- | --- | --- |
61
+ | `aria` | `TagDismissibleAriaAttribute` | `undefined` | Sets ARIA attributes on the dismiss button element, for example use `aria-label` to provide a descriptive close action for screen readers. |
62
+ | `compact` | `boolean` | `false` | Reduces the tag's padding and height for use in dense layouts where vertical space is limited. |
63
+ | `label` | `string` | `undefined` | Sets the visible label text displayed inside the tag alongside the dismiss button. |
64
+
65
+ ### Slots
66
+
67
+ | Slot | Required | Allowed tag names | Description |
68
+ | --- | --- | --- | --- |
69
+ | _(default)_ | no | — | Default slot for the tag content. |
70
+
71
+ ## Examples
72
+
73
+ | Example | When to use | File |
74
+ | --- | --- | --- |
75
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { PText } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PText>
8
+ The quick brown fox jumps over the lazy dog
9
+ </PText>
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { PText } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PText tag="blockquote">
8
+ The quick brown fox jumps over the lazy dog
9
+ </PText>
10
+
11
+ <PText>
12
+ <blockquote>
13
+ The quick brown fox jumps over the lazy dog
14
+ </blockquote>
15
+ </PText>
16
+ </>
17
+ )
18
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { PText } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PText className="text-[3rem]" size="inherit">
8
+ The quick brown fox jumps over the lazy dog
9
+ </PText>
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { PText } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PText size={{'base': 'sm', 'l': '2xl'}}>
8
+ The quick brown fox jumps over the lazy dog
9
+ </PText>
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,68 @@
1
+ # p-text
2
+
3
+ `p-text` is used to specify paragraph styling in documents.
4
+
5
+ > **Recommendation**
6
+ >
7
+ > Although the component is very sophisticated, it's recommended (if possible) to use the corresponding utility classes of the "@porsche-design-system/components-{js | angular | react | vue}/tailwindcss" sub-package or any of the other styling solutions for best performance since way less DOM nodes are required to render. Further information can be found [here](../../styles/tailwindcss.md).
8
+
9
+ ## Usage
10
+
11
+ p-text is used to specify paragraph styling
12
+
13
+ ### Do:
14
+
15
+ - Use p-text for all running body copy, descriptions, and supporting text.
16
+ - Default to text-small for standard paragraphs; scale up for intros or short content blocks.
17
+ - Use text-xx-small for legal disclaimers or metadata.
18
+ - Maintain spacing and alignment using the fluid grid and responsive typography.
19
+ - Always use the predefined text styles to ensure readability and scalability.
20
+
21
+ ### Don't:
22
+
23
+ - Don’t use p-text styles for section titles or visual emphasis—use p-heading or p-display.
24
+ - Don’t apply unapproved font sizes, weights, or custom spacing.
25
+
26
+ ## Accessibility support
27
+
28
+ This component does not include any special accessibility features.
29
+
30
+ ## Development considerations
31
+
32
+ ### Semantic markup
33
+
34
+ Use the `tag` prop to choose the correct HTML element. Do not pick heading tags only for visual styling.
35
+
36
+ ### Common do's and don'ts
37
+
38
+ - **Do** evaluate correct semantic meaning, e.g. use `tag="p"` for regular paragraphs.
39
+ - **Don't** nest text components.
40
+
41
+ ## API
42
+
43
+ ### Properties
44
+
45
+ | Property | Type | Default | Description |
46
+ | --- | --- | --- | --- |
47
+ | `align` | `'start'` `'center'` `'end'` `'inherit'` | `'start'` | Text alignment of the text. Use 'start' for left-aligned text (in LTR), 'center' for centered, 'end' for right-aligned (in LTR), or 'inherit' to adopt the parent's alignment. |
48
+ | `color` | `'primary'` `'contrast-higher'` `'contrast-high'` `'contrast-medium'` `'success'` `'warning'` `'error'` `'info'` `'inherit'` | `'primary'` | Text color of the text. Use 'primary' for default, 'contrast-higher' / 'contrast-high' / 'contrast-medium' for alternative emphasis levels, 'success' / 'warning' / 'error' / 'info' for status messages, or 'inherit' to adopt the parent's color. |
49
+ | `ellipsis` | `boolean` | `false` | Adds an ellipsis to a single line of text if it overflows the container width. When enabled, the text is truncated to a single line with `text-overflow: ellipsis`. Cannot be combined with multi-line content. |
50
+ | `hyphens` | `'none'` `'manual'` `'auto'` `'inherit'` | `'inherit'` | Controls the hyphenation behavior of the text. Use 'auto' to let the browser automatically hyphenate words at appropriate points, 'manual' to only hyphenate at manually inserted hyphenation points (e.g. `&shy;`), 'none' to disable hyphenation entirely, or 'inherit' to adopt the parent's hyphenation setting. |
51
+ | `size` | `'2xs'` `'xs'` `'sm'` `'md'` `'lg'` `'xl'` `'2xl'` `'3xl'` `'4xl'` `'5xl'` `'inherit'`<br>_deprecated:_ `'xx-small'` `'x-small'` `'small'` `'medium'` `'large'` `'x-large'`<br>`BreakpointCustomizable<TextSize>` | `'sm'` | Size of the text. Also defines the size for specific breakpoints, like {base: "sm", l: "md"}. You always need to provide a base value when doing this. Use 'inherit' to adopt the parent's font size. |
52
+ | `tag` | `'p'` `'span'` `'div'` `'address'` `'blockquote'` `'figcaption'` `'cite'` `'time'` `'legend'` | `'p'` | Sets the HTML tag of the rendered element to ensure correct semantic meaning (e.g. 'p' for paragraphs, 'blockquote' for quotes, 'time' for dates). |
53
+ | `weight` | `'normal'` `'semibold'` `'bold'`<br>_deprecated:_ `'regular'` `'semi-bold'` | `'normal'` | The font weight of the text. Use 'normal' for regular body text, 'semibold' for slightly emphasized text, or 'bold' for strong emphasis. |
54
+
55
+ ### Slots
56
+
57
+ | Slot | Required | Allowed tag names | Description |
58
+ | --- | --- | --- | --- |
59
+ | _(default)_ | no | — | Default slot for the text to render. |
60
+
61
+ ## Examples
62
+
63
+ | Example | When to use | File |
64
+ | --- | --- | --- |
65
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
66
+ | Static Size | There are predefined fluid text sizes for the text component which should cover most use cases. | [./examples/Size.tsx](./examples/Size.tsx) |
67
+ | Responsive Size | The `size` property accepts a breakpoint object to render different text sizes per viewport. | [./examples/SizeResponsive.tsx](./examples/SizeResponsive.tsx) |
68
+ | Semantics | To provide more contextual HTML semantics you can either pass them with the `tag` property or directly inside a slot. | [./examples/Semantics.tsx](./examples/Semantics.tsx) |
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { PTextList, PTextListItem } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PTextList>
8
+ <PTextListItem>
9
+ The quick brown fox jumps over the lazy dog
10
+ </PTextListItem>
11
+ <PTextListItem>
12
+ The quick brown fox jumps over the lazy dog
13
+ <PTextList>
14
+ <PTextListItem>
15
+ The quick brown fox jumps over the lazy dog
16
+ </PTextListItem>
17
+ <PTextListItem>
18
+ The quick brown fox jumps over the lazy dog
19
+ </PTextListItem>
20
+ </PTextList>
21
+ </PTextListItem>
22
+ <PTextListItem>
23
+ The quick brown fox jumps over the lazy dog
24
+ </PTextListItem>
25
+ </PTextList>
26
+ </>
27
+ )
28
+ }