@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,14 @@
1
+ import React from 'react';
2
+ import { PLink } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PLink>
8
+ <a href="https://porsche.com">
9
+ Some label
10
+ </a>
11
+ </PLink>
12
+ </>
13
+ )
14
+ }
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { PLink } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <div className="flex gap-static-sm">
8
+ <PLink href="https://porsche.com" icon="phone">
9
+ Some label
10
+ </PLink>
11
+ <PLink href="https://porsche.com" iconSource="assets/icon-custom-kaixin.svg" hideLabel={true}>
12
+ Some label
13
+ </PLink>
14
+ </div>
15
+ </>
16
+ )
17
+ }
@@ -0,0 +1,101 @@
1
+ # p-link
2
+
3
+ The `p-link` component is essential to perform changes in **page routes**. For an optimal user guidance and dedicated pursuit of business or sales goals, different types of Links (**Primary** and **Secondary**) are available for usage. A Link can be used with or without a label, but it's recommended to keep the **label visible** for better **usability** whenever possible. When used without a label, it is mandatory for **accessibility** to provide a descriptive label text for screen readers. In case you want the user to execute an action, you should select the [Button](../p-button/p-button.md) component instead.
4
+
5
+ You can use native `click`, `focus`, `focusin`, `blur` and `focusout` events on the `p-link`.
6
+
7
+ ## Usage
8
+
9
+ ### Do:
10
+
11
+ - Use a Link to navigate to another page.
12
+ - Use a [Button](../p-button/p-button.md) instead of a Link if you want to change a state (e.g. send form)
13
+ - Use a Primary Link filled for one or two high-priority actions within a page.
14
+ - Use a Secondary Link for all other stand-alone Links that aren't high priority.
15
+ - Use a [Link Pure](../p-link-pure/p-link-pure.md) as a subordinated link version in combination with a filled link (primary or secondary) or stand-alone when the priority of the action is lower compared to all other link actions within the page.
16
+ - Use an Icon and text variant only when appropriate (e.g. external link).
17
+ - Use an Icon-only variant only in cases where the user is fully aware of the link function.
18
+ - Ensure that the link remains legible even in a multiline state by using max. 100 characters per line.
19
+
20
+ ### Don't:
21
+
22
+ - Don't use a Primary Link for all links on a page.
23
+ - Don't use a multiline Link, as it is recommended to keep the text label short and avoid multiline links.
24
+ - Don't use a width that's too wide and makes the link difficult to read.
25
+
26
+ ---
27
+
28
+ ## Related components
29
+
30
+ - [Button](../p-button/p-button.md)
31
+ - [Link Pure](../p-link-pure/p-link-pure.md)
32
+
33
+ ## Accessibility support
34
+
35
+ ### Keyboard
36
+
37
+ | Key / state | Function |
38
+ | --- | --- |
39
+ | `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element. |
40
+ | `Enter` | Activates the link. |
41
+
42
+ ### ARIA enhancements
43
+
44
+ #### External **ARIA** provided by the `aria` property:
45
+
46
+ | ARIA | Usage |
47
+ | --- | --- |
48
+ | `aria-label` | Defines a string value that labels the interactive element. |
49
+ | `aria-description` | Defines a string value that adds a more detailed description of the interactive element. |
50
+ | `aria-current` | Exposes the current state of the link. |
51
+ | `aria-haspopup` | Defines that the link opens a popup (e.g. `dialog`). |
52
+
53
+ #### Internal **ARIA** that is managed by the component:
54
+
55
+ | ARIA | Usage |
56
+ | --- | --- |
57
+ | `aria-hidden="true"` | When the `icon` prop is set, the icon is hidden from the screen reader. |
58
+
59
+ ## Development considerations
60
+
61
+ ### Labelling
62
+
63
+ If the text of a link does not clearly indicate what the link's target is, add a brief, descriptive label using the `aria` property with the `aria-label` value to provide more context for screen reader users. Phrases like "Detail" or "Click" can be unclear when read out of context by a screen reader. In such instances, provide an alternative text that offers more detailed information, such as "Details of product XYZ."
64
+
65
+ ### Common do's and don'ts
66
+
67
+ - **Do** pass ARIA attributes via the `aria` prop, for example `aria="{ 'aria-current': 'page' }"` when indicating the current page.
68
+ - **Do** provide a clear accessible name for icon-only actions via slotted label or `aria` property.
69
+ - **Don't** add native `aria-*` attributes directly on the component host.
70
+ - **Don't** rely on short generic link labels like "Show" or "Add" without context.
71
+
72
+ ## API
73
+
74
+ ### Properties
75
+
76
+ | Property | Type | Default | Description |
77
+ | --- | --- | --- | --- |
78
+ | `aria` | `LinkAriaAttribute` | `undefined` | Sets ARIA attributes on the link element to improve accessibility for screen readers. |
79
+ | `compact` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Reduces the link's padding and height for denser layouts. Supports responsive breakpoint values. |
80
+ | `download` | `string` | `undefined` | Sets the native `download` attribute to trigger a file download. Only applies when `href` is set. |
81
+ | `hideLabel` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Hides the visible label while keeping it accessible to screen readers. Supports responsive breakpoint values. |
82
+ | `href` | `string` | `undefined` | When set, the component renders as an anchor navigating to this URL. Otherwise, provide a slotted anchor element. |
83
+ | `icon` | `'none'`<br>one of 290 icon names — see [icon names](references/icons.md) | `'none'` | Sets the icon displayed next to the link label. Use `none` to show no icon. |
84
+ | `iconSource` | `string` | `undefined` | Sets a path to a custom SVG icon, used instead of the built-in icon set. |
85
+ | `rel` | `string` | `undefined` | Sets the `rel` attribute on the link (e.g. `noopener`). Only applies when `href` is set. |
86
+ | `target` | `'_self'` `'_blank'` `'_parent'` `'_top'` `'string'` | `'_self'` | Specifies where to open the linked URL (e.g. `_self`, `_blank`). Only applies when `href` is set. |
87
+ | `variant` | `'primary'` `'secondary'` | `'primary'` | Sets the visual style variant of the link (`primary` or `secondary`). |
88
+
89
+ ### Slots
90
+
91
+ | Slot | Required | Allowed tag names | Description |
92
+ | --- | --- | --- | --- |
93
+ | _(default)_ | no | — | Default slot to render the link label. This slot can be used to slot an anchor tag instead of using the href prop. |
94
+
95
+ ## Examples
96
+
97
+ | Example | When to use | File |
98
+ | --- | --- | --- |
99
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
100
+ | Framework routing (anchor nesting) | To support custom anchor tags (e.g. framework specific routing) you can provide them as a **slotted element** of the component. | [./examples/FrameworkRouting.tsx](./examples/FrameworkRouting.tsx) |
101
+ | Link with specific icon | If an icon needs to be implemented, just set another predefined icon. | [./examples/Icon.tsx](./examples/Icon.tsx) |
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { PLinkPure } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PLinkPure href="https://porsche.com" className="p-static-md">
8
+ Some label
9
+ </PLinkPure>
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { PLinkPure } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PLinkPure href="https://porsche.com">
8
+ Some label
9
+ </PLinkPure>
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { PLinkPure } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PLinkPure>
8
+ <a href="https://porsche.com">
9
+ Some label
10
+ </a>
11
+ </PLinkPure>
12
+ </>
13
+ )
14
+ }
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { PLinkPure } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <div className="flex gap-static-sm">
8
+ <PLinkPure href="https://porsche.com" icon="phone">
9
+ Some label
10
+ </PLinkPure>
11
+ <PLinkPure href="https://porsche.com" iconSource="assets/icon-custom-kaixin.svg" hideLabel={true}>
12
+ Some label
13
+ </PLinkPure>
14
+ </div>
15
+ </>
16
+ )
17
+ }
@@ -0,0 +1,110 @@
1
+ # p-link-pure
2
+
3
+ The `p-link-pure` component is essential for performing changes in **page routes**. A Link Pure can be used with or without a label, but it's recommended to keep the **label visible** for better **usability** whenever possible. When used without a label, it is mandatory for **accessibility** to provide a descriptive label text for screen readers.
4
+
5
+ In case you want the user to execute an action, you should select the [Button](../p-button/p-button.md) or [Button Pure](../p-button-pure/p-button-pure.md) component instead.
6
+
7
+ You can use native `click`, `focus`, `focusin`, `blur` and `focusout` events on the `p-link-pure`.
8
+
9
+ ## Usage
10
+
11
+ ### Do:
12
+
13
+ - Use a Link Pure as a more subtle call to action compared to the normal Link.
14
+ - Use a [Button Pure](../p-button-pure/p-button-pure.md) instead of a Link Pure if you want to change a state (e.g. send form)
15
+ - Use a Link Pure to navigate the user to another page.
16
+ - Use the Icon and Text variant of Link Pure whenever possible as icons should preferably always be paired with text for better comprehensibility and accessibility.
17
+ - Use the Text only variant when the use of icons causes interference (e.g. in-text placement, no matching icon, complex lists or tables, alignment to elements, navigation).
18
+ - Use the Text only variant with an underline to ensure intuitive clickability.
19
+ - Use the Icon only variant only when an icon alone is sufficient to indicate the action and the user is fully aware of the function due to an expressive and internationally comprehensible icon.
20
+ - Use the stretch variant only on small viewports or areas (e.g. mobile views or sidebars).
21
+ - Use the default arrow-right-icon in most cases but replace it with another symbol if it is more appropriate.
22
+ - Use short and descriptive text labels within a link.
23
+
24
+ ### Don't:
25
+
26
+ - Don't use Link Pure as the main call to action if you need to draw more attention to the link.
27
+ - Don't use Link Pure on images unless it is necessary, e.g. when using it as an additional link on image sliders or teaser images that are clickable themselves.
28
+ - Don't group more than two Links Pure in a row to ensure scannability and legibility.
29
+
30
+ ---
31
+
32
+ ## Related components
33
+
34
+ - [Button Pure](../p-button-pure/p-button-pure.md)
35
+
36
+ ## Accessibility support
37
+
38
+ ### Keyboard
39
+
40
+ | Key / state | Function |
41
+ | --- | --- |
42
+ | `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element. |
43
+ | `Enter` | Activates the link. |
44
+
45
+ ### ARIA enhancements
46
+
47
+ #### External **ARIA** provided by the `aria` property:
48
+
49
+ | ARIA | Usage |
50
+ | --- | --- |
51
+ | `aria-label` | Defines a string value that labels the interactive element. |
52
+ | `aria-description` | Defines a string value that adds a more detailed description of the interactive element. |
53
+ | `aria-current` | Exposes the current state of the link. |
54
+ | `aria-haspopup` | Defines that the link opens a popup (e.g. `dialog`). |
55
+
56
+ #### Internal **ARIA** that is managed by the component:
57
+
58
+ | ARIA | Usage |
59
+ | --- | --- |
60
+ | `aria-hidden="true"` | When the `icon` prop is set, the icon is hidden from the screen reader. |
61
+
62
+ ## Development considerations
63
+
64
+ ### Labelling
65
+
66
+ If the text of a link does not clearly indicate what the link's target is, add a brief, descriptive label using the `aria` property with the `aria-label` value to provide more context for screen reader users. Phrases like "Detail" or "Click" can be unclear when read out of context by a screen reader. In such instances, provide an alternative text that offers more detailed information, such as "Details of product XYZ."
67
+
68
+ ### Common do's and don'ts
69
+
70
+ - **Do** pass ARIA attributes via the `aria` prop, for example `aria="{ 'aria-current': 'page' }"` when indicating the current page.
71
+ - **Do** provide a clear accessible name for icon-only actions via slotted label or `aria` property.
72
+ - **Don't** add native `aria-*` attributes directly on the component host.
73
+ - **Don't** rely on short generic link labels like "Show" or "Add" without context.
74
+
75
+ ## API
76
+
77
+ ### Properties
78
+
79
+ | Property | Type | Default | Description |
80
+ | --- | --- | --- | --- |
81
+ | `active` | `boolean` | `false` | Visually marks the link as the currently active navigation item, e.g. the current page. |
82
+ | `alignLabel` | `'start'` `'end'`<br>`BreakpointCustomizable<LinkPureAlignLabel>` | `'end'` | Sets the label position relative to the icon — `start` places it before, `end` places it after. Supports responsive breakpoint values. |
83
+ | `aria` | `LinkPureAriaAttribute` | `undefined` | Sets ARIA attributes on the link element to improve accessibility for screen readers. |
84
+ | `color` | `'primary'` `'contrast-higher'` `'contrast-high'` `'contrast-medium'` `'inherit'` | `'primary'` | Sets the foreground color of the link's icon and label text. |
85
+ | `download` | `string` | `undefined` | Sets the native `download` attribute to trigger a file download. Only applies when `href` is set. |
86
+ | `hideLabel` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Hides the visible label while keeping it accessible to screen readers. Supports responsive breakpoint values. |
87
+ | `href` | `string` | `undefined` | When set, the component renders as an anchor navigating to this URL. Otherwise, provide a slotted anchor element. |
88
+ | `icon` | `''`<br>one of 290 icon names — see [icon names](references/icons.md) | `'arrow-right'` | Sets the icon displayed next to the label. |
89
+ | `iconSource` | `string` | `undefined` | Sets a path to a custom SVG icon, used instead of the built-in icon set. |
90
+ | `rel` | `string` | `undefined` | Sets the `rel` attribute on the link (e.g. `noopener`). Only applies when `href` is set. |
91
+ | `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<LinkPureSize>` | `'sm'` | Sets the font size of the link label. Supports responsive breakpoint values. |
92
+ | `stretch` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Expands the space between icon and label to fill the full container width. Supports responsive breakpoint values. |
93
+ | `target` | `'_self'` `'_blank'` `'_parent'` `'_top'` `'string'` | `'_self'` | Specifies where to open the linked URL (e.g. `_self`, `_blank`). Only applies when `href` is set. |
94
+ | `underline` | `boolean` | `false` | Adds a text underline to the label to reinforce its link-like appearance. |
95
+
96
+ ### Slots
97
+
98
+ | Slot | Required | Allowed tag names | Description |
99
+ | --- | --- | --- | --- |
100
+ | _(default)_ | no | — | Default slot to render the link label. |
101
+
102
+ ## Examples
103
+
104
+ | Example | When to use | File |
105
+ | --- | --- | --- |
106
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
107
+ | Link with specific icon | If another icon needs to be implemented, just replace the default icon with another predefined icon. | [./examples/Icon.tsx](./examples/Icon.tsx) |
108
+ | Framework routing (anchor nesting) | To support custom anchor tags (e.g. framework specific routing) you can provide them as a **slotted element** (recommended) of the component. | [./examples/FrameworkRouting.tsx](./examples/FrameworkRouting.tsx) |
109
+ | Framework specific router with "active state" support | Examples how to use the component together with a framework specific router with "active state" support. | — |
110
+ | Link Pure with custom clickable/focusable area | Sometimes it might be useful to enlarge the clickable/focusable area of a link to fulfill accessibility guidelines. | [./examples/CustomClickableArea.tsx](./examples/CustomClickableArea.tsx) |
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { PLinkTile, PTag } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PLinkTile href="https://porsche.com" label="Some label" description="Some Description" gradient={true}>
8
+ <PTag slot="header" color="background-frosted" compact={true} style={{'colorScheme': 'only light'}}>
9
+ Some tag
10
+ </PTag>
11
+ <img src="assets/lights.jpg" alt="Some image description" />
12
+ </PLinkTile>
13
+ </>
14
+ )
15
+ }
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { PLinkTile, PTag, PText } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PLinkTile href="https://porsche.com" label="Some label" description="Some Description" gradient={true}>
8
+ <PTag slot="header" color="background-frosted" compact={true}>
9
+ Some tag
10
+ </PTag>
11
+ <img src="assets/lights.jpg" alt="Some image description" />
12
+ <PText slot="footer">
13
+ Some footer text
14
+ </PText>
15
+ </PLinkTile>
16
+ </>
17
+ )
18
+ }
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import { PLinkTile, PTag, PText } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <div className="grid grid-cols-2 gap-static-md">
8
+ <PLinkTile href="https://porsche.com" label="Some label" description="Some Description">
9
+ <PTag slot="header" color="background-frosted" compact={true}>
10
+ Some tag
11
+ </PTag>
12
+ <img src="assets/lights.jpg" alt="Some image description" />
13
+ <PText slot="footer">
14
+ Some footer text
15
+ </PText>
16
+ </PLinkTile>
17
+ <PLinkTile href="https://porsche.com" label="Some label" description="Some Description" compact={true}>
18
+ <PTag slot="header" color="background-frosted" compact={true}>
19
+ Some tag
20
+ </PTag>
21
+ <img src="assets/lights.jpg" alt="Some image description" />
22
+ <PText slot="footer">
23
+ Some footer text
24
+ </PText>
25
+ </PLinkTile>
26
+ </div>
27
+ </>
28
+ )
29
+ }
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import { PLinkTile, PSelect, PSelectOption, SelectChangeEventDetail } from '@porsche-design-system/components-react';
3
+ import { Property } from 'csstype';
4
+ import { useState } from 'react';
5
+
6
+ export const Example = () => {
7
+ const [hyphens, setHyphens] = useState<Property.Hyphens>('auto');
8
+
9
+ const onChange = (e: CustomEvent<SelectChangeEventDetail>) => {
10
+ setHyphens(e.detail.value as Property.Hyphens);
11
+ };
12
+
13
+ return (
14
+ <>
15
+ <PSelect label="Select hyphens" name="hyphens" value={hyphens} onChange={onChange}>
16
+ <PSelectOption value="auto">style="hyphens: auto;"</PSelectOption>
17
+ <PSelectOption value="manual">style="hyphens: manual;"</PSelectOption>
18
+ <PSelectOption value="none">style="hyphens: none;"</PSelectOption>
19
+ </PSelect>
20
+
21
+ <PLinkTile
22
+ href="https://porsche.com"
23
+ label="Some label"
24
+ description="An extra&shy;ordinarily Porsche"
25
+ compact={true}
26
+ size="inherit"
27
+ style={{ colorScheme: 'dark', maxWidth: '400px', fontSize: '45px', hyphens }}
28
+ className="mt-fluid-sm"
29
+ >
30
+ <img src="assets/lights.jpg" alt="Some image description" />
31
+ </PLinkTile>
32
+ </>
33
+ );
34
+ };
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { PLinkTile, PTag } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <div className="grid grid-cols-2 gap-static-md">
8
+ <PLinkTile aspectRatio="4/3" href="#" label="Some Label" size="large" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.">
9
+ <PTag slot="header" color="background-frosted" compact={true}>
10
+ 4/3
11
+ </PTag>
12
+ <img src="assets/lights.jpg" alt="Some image description" />
13
+ </PLinkTile>
14
+ <PLinkTile aspectRatio="4/3" href="#" label="Some Label" description="Some description">
15
+ <PTag slot="header" color="background-frosted" compact="true">
16
+ 4/3
17
+ </PTag>
18
+ <img src="assets/lights.jpg" alt="Some image description" />
19
+ </PLinkTile>
20
+ <PLinkTile aspectRatio="1/1" href="#" label="Some Label" description="Some description">
21
+ <PTag slot="header" color="background-frosted" compact="true">
22
+ 1/1
23
+ </PTag>
24
+ <img src="assets/lights.jpg" alt="Some image description" />
25
+ </PLinkTile>
26
+ <PLinkTile aspectRatio="9/16" href="#" label="Some Label" description="Some description">
27
+ <PTag slot="header" color="background-frosted" compact="true">
28
+ 9/16
29
+ </PTag>
30
+ <img src="assets/lights.jpg" alt="Some image description" />
31
+ </PLinkTile>
32
+ <PLinkTile aspectRatio="1/1" href="#" label="Some Label" description="Some description">
33
+ <PTag slot="header" color="background-frosted" compact="true">
34
+ 1/1
35
+ </PTag>
36
+ <img src="assets/lights.jpg" alt="Some image description" />
37
+ </PLinkTile>
38
+ </div>
39
+ </>
40
+ )
41
+ }
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { PLinkTile, PTag } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PLinkTile href="https://porsche.com" label="Some label" description="Some Description">
8
+ <PTag slot="header" color="background-frosted" compact={true}>
9
+ Some tag
10
+ </PTag>
11
+ <video poster="assets/ocean.jpg" src="assets/ocean.mp4" loop={true} muted={true} autoPlay={true} aria-label="Some video description"></video>
12
+ </PLinkTile>
13
+ </>
14
+ )
15
+ }
@@ -0,0 +1,105 @@
1
+ # p-link-tile
2
+
3
+ The `p-link-tile` is a navigational component that displays a provided image to tease content and navigate to further information within one container. In case you want the user to execute an action, you should select the [Button Tile](../p-button-tile/p-button-tile.md) component instead.
4
+
5
+ **Note:** The component does not take care of processing and aligning the image.
6
+
7
+ An `<img/>`, `<picture/>` or `<video/>` tag has to be provided as default slot.
8
+
9
+ Additionally, the properties `href`, `description` and `label` are required. The `description` property is used as a teaser with a more detailed description of the link and where it leads to.
10
+
11
+ The `label` property is used to describe the anchor.
12
+
13
+ ## Usage
14
+
15
+ ### Do:
16
+
17
+ - Use Link-Tile for prominent links with appropriate aspect ratios and short descriptions (80 characters or fewer).
18
+ - Use [Button-Tile](../p-button-tile/p-button-tile.md) instead if you want on-page interactivity.
19
+ - Use basic Link-Tile for better perception tests and compact Link-Tile for improved spacing (especially on mobile).
20
+ - Use gradient Link-Tile when image contrast is insufficient and select images with natural contrast.
21
+ - Use font size for visual hierarchy and customize image type and font size for responsiveness.
22
+ - Use engaging verbs and product names in compact Link Tile. Create assets upfront for image processing.
23
+
24
+ ### Don't:
25
+
26
+ - Don't manipulate images. Keep them natural and ensure sufficient contrast.
27
+ - Don't write long descriptions that overflow content (especially on mobile).
28
+
29
+ ---
30
+
31
+ ## Related components
32
+
33
+ - [Button Tile](../p-button-tile/p-button-tile.md)
34
+
35
+ ## Accessibility support
36
+
37
+ ### Keyboard
38
+
39
+ | Key / state | Function |
40
+ | --- | --- |
41
+ | `Tab`, `Shift-Tab` | Moves focus to the next (or previous) focusable element. |
42
+ | `Enter` | Activates the link. |
43
+
44
+ ### ARIA enhancements
45
+
46
+ #### External **ARIA** provided by the `aria` property:
47
+
48
+ | ARIA | Usage |
49
+ | --- | --- |
50
+ | `aria-label` | Defines a string value that labels the interactive element. |
51
+ | `aria-description` | Defines a string value that adds a more detailed description of the interactive element. |
52
+ | `aria-current` | Exposes the current state of the link. |
53
+ | `aria-haspopup` | Defines that the link opens a popup (e.g. `dialog`). |
54
+
55
+ ## Development considerations
56
+
57
+ ### Labelling
58
+
59
+ If the text of a link does not clearly indicate what the link's target is, add a brief, descriptive label using the `aria` property with the `aria-label` value to provide more context for screen reader users. Phrases like "Detail" or "Click" can be unclear when read out of context by a screen reader. In such instances, provide an alternative text that offers more detailed information, such as "Details of product XYZ."
60
+
61
+ ### Common do's and don'ts
62
+
63
+ - **Do** pass ARIA attributes via the `aria` prop when the visible label needs more context.
64
+ - **Do** provide a descriptive `label` that explains the link destination.
65
+ - **Do** add `aria-label` on slotted `<video>` elements used as backgrounds.
66
+ - **Don't** add native `aria-*` attributes directly on the component host.
67
+
68
+ ## API
69
+
70
+ ### Properties
71
+
72
+ | Property | Type | Default | Description |
73
+ | --- | --- | --- | --- |
74
+ | `align` | `'top'` `'bottom'` | `'bottom'` | Controls the vertical placement of the description and link — `top` or `bottom`. |
75
+ | `aria` | `LinkTileAriaAttribute` | `undefined` | Sets ARIA attributes on the tile's anchor element to improve accessibility for screen readers. |
76
+ | `aspectRatio` | `'1/1'` `'4/3'` `'3/4'` `'16/9'` `'9/16'` `'auto'`<br>`BreakpointCustomizable<LinkTileAspectRatio>` | `'4/3'` | Sets the width-to-height ratio of the tile media area. Supports responsive breakpoint values. |
77
+ | `compact` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Renders only the icon link without the full label. Supports responsive breakpoint values. |
78
+ | `description` _(required)_ | `string` | `undefined` | Sets the description text displayed in the tile's content area. |
79
+ | `download` | `string` | `undefined` | Sets the native `download` attribute to trigger a file download. |
80
+ | `gradient` | `boolean` | `false` | Shows a gradient overlay over the media slot to improve text legibility on bright images or videos. |
81
+ | `href` _(required)_ | `string` | `undefined` | Sets the URL the tile's anchor element navigates to when clicked. |
82
+ | `label` _(required)_ | `string` | `undefined` | Sets the accessible label text of the link rendered inside the tile. |
83
+ | `rel` | `string` | `undefined` | Sets the `rel` attribute on the link (e.g. `noopener`). |
84
+ | `size` | `'medium'` `'large'` `'inherit'`<br>`BreakpointCustomizable<LinkTileSize>` | `'medium'` | Sets the font size of the description text in the tile content area. Supports responsive breakpoint values. |
85
+ | `target` | `'_self'` `'_blank'` `'_parent'` `'_top'` `'string'` | `'_self'` | Specifies where to open the linked URL (e.g. `_self`, `_blank`). |
86
+ | `weight` | `'regular'` `'semi-bold'`<br>`BreakpointCustomizable<LinkTileWeight>` | `'semi-bold'` | Sets the font weight of the description text in the tile content area. Supports responsive breakpoint values. |
87
+
88
+ ### Slots
89
+
90
+ | Slot | Required | Allowed tag names | Description |
91
+ | --- | --- | --- | --- |
92
+ | `header` | no | — | Renders a header section above the content area. |
93
+ | _(default)_ | no | — | Default slot for the img or picture tag. |
94
+ | `footer` | no | — | Renders a footer section below the description. |
95
+
96
+ ## Examples
97
+
98
+ | Example | When to use | File |
99
+ | --- | --- | --- |
100
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
101
+ | With video | With video | [./examples/WithVideo.tsx](./examples/WithVideo.tsx) |
102
+ | UI behaviour | The component is able to break out of its aspect ratio in case content overflows to be accessibility compliant (see first row in example). | [./examples/UiBehaviour.tsx](./examples/UiBehaviour.tsx) |
103
+ | Hyphens | It is possible to overwrite the hyphens style on the host element and use 'soft' hyphens. | [./examples/Hyphens.tsx](./examples/Hyphens.tsx) |
104
+ | Footer slot | You can also use a `footer` slot to display additional text below the description, providing more flexibility for custom content. | [./examples/FooterSlot.tsx](./examples/FooterSlot.tsx) |
105
+ | Color scheme | The component defines `color-scheme: dark` internally, independently of the scheme defined globally or on an ancestor outside the Link Tile. | [./examples/ColorScheme.tsx](./examples/ColorScheme.tsx) |
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { useState } from 'react';
3
+ import { PLinkTileProduct, PTag, type LinkTileProductLikeEvent } from '@porsche-design-system/components-react';
4
+
5
+ export const Example = () => {
6
+ const [liked, setLiked] = useState(false);
7
+
8
+ const onLike = (e: CustomEvent<LinkTileProductLikeEvent>) => {
9
+ setLiked(!e.detail.liked);
10
+ }
11
+
12
+ return (
13
+ <>
14
+ <PLinkTileProduct liked={liked} heading="Some product" price="718,00 €" priceOriginal="911,00 €" description="Some description" href="https://porsche.com" onLike={onLike}>
15
+ <PTag slot="header" color="background-base">
16
+ New
17
+ </PTag>
18
+ <img src="assets/placeholder_800x900.svg" width={800} height={900} alt="Some alt text" />
19
+ </PLinkTileProduct>
20
+ </>
21
+ )
22
+ }
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { useState } from 'react';
3
+ import { PLinkTileProduct, type LinkTileProductLikeEvent } from '@porsche-design-system/components-react';
4
+
5
+ export const Example = () => {
6
+ const [liked, setLiked] = useState(false);
7
+
8
+ const onLike = (e: CustomEvent<LinkTileProductLikeEvent>) => {
9
+ setLiked(!e.detail.liked);
10
+ }
11
+
12
+ return (
13
+ <>
14
+ <PLinkTileProduct liked={liked} heading="Some product" price="718,00 €" priceOriginal="911,00 €" description="Some description" onLike={onLike}>
15
+ <a slot="anchor" href="https://porsche.com">
16
+ Weekender, sale price 718,00 €, original price
17
+ <s>
18
+ 911,00 €
19
+ </s>
20
+ </a>
21
+ <img src="assets/placeholder_800x900.svg" width={800} height={900} alt="Some alt text" />
22
+ </PLinkTileProduct>
23
+ </>
24
+ )
25
+ }