@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,91 @@
1
+ # p-canvas
2
+
3
+ > **Experimental:** This component is experimental — its API may change in any release. Avoid relying on it in production.
4
+
5
+ The `p-canvas` is an experimental layout component for productive web applications.
6
+
7
+ The canvas component provides a CSS utility class which comes with a basic 12 columns [CSS grid](https://css-tricks.com/snippets/css/complete-guide-grid) and [CSS container-type](https://css-tricks.com/css-container-queries). The utility class can be used in default or footer slot to align its content.
8
+
9
+ ```scss
10
+ .-p-canvas-grid // experimental, might be removed in a future release
11
+ ```
12
+
13
+ The canvas component has some values which can be overwritten by **CSS Variables**.
14
+
15
+ ```scss
16
+ --p-canvas-sidebar-start-width: 220px;
17
+ --p-canvas-sidebar-end-width: 180px;
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ The following section provides guidance for designers and developers on how to use the p-canvas layout component in different application contexts.
23
+
24
+ ### Do:
25
+
26
+ - Use p-canvas to structure complex application layouts with sidebars, headers, and footers in a consistent, responsive manner.
27
+ - Use named slots (sidebar-start, sidebar-end, header-start, footer, etc.) to separate concerns and improve maintainability.
28
+ - Use the -p-canvas-grid utility class to create a 12-column layout inside the canvas content or footer areas.
29
+ - Combine p-canvas with CSS Grid column helpers (e.g. grid-column: span 4) to align content efficiently.
30
+ - Use the sidebarStartOpen and sidebarEndOpen bindings to dynamically control sidebar behavior based on viewport size or user actions.
31
+ - Customize layout widths via CSS variables like --p-canvas-sidebar-start-width and --p-canvas-sidebar-end-width to match your design needs.
32
+ - Use slot="background" for decorative media like images or videos that sit below the main content, enhancing visual appeal.
33
+ - Consider keyboard and focus management when using dynamic flyouts or sidebars, especially on mobile.
34
+
35
+ ### Don’t:
36
+
37
+ - Don’t use p-canvas for simple or static content pages where a standard layout is sufficient.
38
+ - Don’t place critical content only inside sidebars or sticky areas without providing access via the main layout.
39
+ - Don’t rely solely on custom styling; instead, use provided slots and layout classes to maintain consistency.
40
+ - Don’t nest p-canvas within another p-canvas; this may lead to unpredictable layout behavior.
41
+ - Don’t overload the p-canvas with too many sticky elements that compete for screen space, especially on smaller viewports.
42
+ - Don’t use -p-canvas-grid outside of canvas slots—it is experimental and might be removed in future releases.
43
+ - Don’t override CSS variables globally without scoping, as this can break other usages in your application.
44
+
45
+ ## Accessibility support
46
+
47
+ Not yet considered due to experimental state.
48
+
49
+ ## API
50
+
51
+ ### Properties
52
+
53
+ | Property | Type | Default | Description |
54
+ | --- | --- | --- | --- |
55
+ | `background` | `'canvas'` `'surface'` | `'canvas'` | Sets the background color of the main content area and automatically applies a matching color to the sidebar. |
56
+ | `sidebarEndOpen` | `boolean` | `false` | Controls whether the utility sidebar on the end side (right in LTR) is open or collapsed. |
57
+ | `sidebarStartOpen` | `boolean` | `false` | Controls whether the navigation sidebar on the start side (left in LTR) is open or collapsed. |
58
+
59
+ ### Events
60
+
61
+ | Event | Type | Description |
62
+ | --- | --- | --- |
63
+ | `sidebarEndDismiss` | `CustomEvent<void>` | Emitted when the user dismisses the end sidebar via the close button. |
64
+ | `sidebarStartUpdate` | `CustomEvent<CanvasSidebarStartUpdateEventDetail>`<br>`{ open: boolean }` | Emitted when the user toggles the start sidebar, with the new open state in the event detail. |
65
+
66
+ ### Slots
67
+
68
+ | Slot | Required | Allowed tag names | Description |
69
+ | --- | --- | --- | --- |
70
+ | `title` | no | — | Renders the application name in the header section of the sidebar start area. |
71
+ | `header-start` | no | — | Renders a **sticky** header section above the content area on the **start** side (**left** in **LTR** mode / **right** in **RTL** mode). |
72
+ | `header-end` | no | — | Renders a **sticky** header section above the content area on the **end** side (**right** in **LTR** mode / **left** in **RTL** mode). |
73
+ | _(default)_ | no | — | Default slot for the main content. |
74
+ | `footer` | no | — | Renders a **sticky** footer section underneath the main content. |
75
+ | `sidebar-start` | no | — | Renders a sidebar area on the **start** side (**left** in **LTR** mode / **right** in **RTL** mode). On mobile view it transforms into a flyout. |
76
+ | `sidebar-end` | no | — | Renders a sidebar area on the **end** side (**right** in **LTR** mode / **left** in **RTL** mode). On mobile view it transforms into a flyout. |
77
+ | `sidebar-end-header` | no | — | Renders in the header section of the sidebar end area. |
78
+ | `background` | no | — | Can be used to pass a sticky media element <img/> or <video/> placed underneath the main content. |
79
+
80
+ ### CSS Variables
81
+
82
+ | CSS Variable | Default | Description |
83
+ | --- | --- | --- |
84
+ | `--p-canvas-sidebar-start-width` | `320px` | Width of the sidebar start. |
85
+ | `--p-canvas-sidebar-end-width` | `320px` | Width of the sidebar end. |
86
+
87
+ ## Examples
88
+
89
+ | Example | When to use | File |
90
+ | --- | --- | --- |
91
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { PCarousel } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PCarousel heading="Some heading" trimSpace={true} pagination={true} rewind={true}>
8
+ <div className="grid place-content-center h-[150px] bg-surface prose-text-sm">
9
+ Slide 1
10
+ </div>
11
+ <div className="grid place-content-center h-[150px] bg-surface prose-text-sm">
12
+ Slide 2
13
+ </div>
14
+ <div className="grid place-content-center h-[150px] bg-surface prose-text-sm">
15
+ Slide 3
16
+ </div>
17
+ <div className="grid place-content-center h-[150px] bg-surface prose-text-sm">
18
+ Slide 4
19
+ </div>
20
+ </PCarousel>
21
+ </>
22
+ )
23
+ }
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import { PButton, PCarousel } from '@porsche-design-system/components-react';
3
+ import { useCallback, useState } from 'react';
4
+
5
+ export const Example = () => {
6
+ const [amountOfSlides, setAmountOfSlides] = useState(3);
7
+ const onAddClick = useCallback(() => setAmountOfSlides((prev) => prev + 1), []);
8
+ const onRemoveClick = useCallback(() => setAmountOfSlides((prev) => (prev === 0 ? 0 : prev - 1)), []);
9
+
10
+ const slideStyle = {
11
+ display: 'flex',
12
+ alignItems: 'center',
13
+ justifyContent: 'center',
14
+ background: '#00b0f4',
15
+ height: '150px',
16
+ };
17
+
18
+ return (
19
+ <>
20
+ <PCarousel slidesPerPage={2} heading="Some Heading">
21
+ {Array.from(Array(amountOfSlides)).map((_, i) => (
22
+ <div style={slideStyle} key={i} children={`Slide ${i + 1}`} />
23
+ ))}
24
+ </PCarousel>
25
+
26
+ <div className="flex gap-fluid-sm mt-fluid-sm">
27
+ <PButton type="button" onClick={onAddClick} children="Add slide" />
28
+ <PButton type="button" onClick={onRemoveClick} children="Remove last slide" />
29
+ </div>
30
+ </>
31
+ );
32
+ };
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import { PCarousel } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PCarousel heading="Some heading" slidesPerPage="auto" trimSpace={true} pagination={true} rewind={true}>
8
+ <div className="grid place-content-center w-[10vw] h-[150px] bg-surface prose-text-sm">
9
+ 10vw
10
+ </div>
11
+ <div className="grid place-content-center w-[200px] h-[150px] bg-surface prose-text-sm">
12
+ 200px
13
+ </div>
14
+ <div className="grid place-content-center w-[100px] h-[150px] bg-surface prose-text-sm">
15
+ 100px
16
+ </div>
17
+ <div className="grid place-content-center w-[40vw] h-[150px] bg-surface prose-text-sm">
18
+ 40vw
19
+ </div>
20
+ <div className="grid place-content-center w-[150px] h-[150px] bg-surface prose-text-sm">
21
+ 150px
22
+ </div>
23
+ <div className="grid place-content-center w-[50vw] h-[150px] bg-surface prose-text-sm">
24
+ 50vw
25
+ </div>
26
+ </PCarousel>
27
+ </>
28
+ )
29
+ }
@@ -0,0 +1,56 @@
1
+ import React from 'react';
2
+ import { PCarousel } from '@porsche-design-system/components-react';
3
+ import { useState } from 'react';
4
+
5
+ export const Example = () => {
6
+ const [activeSlideIndex, setActiveSlideIndex] = useState(0);
7
+
8
+ const slideStyles = {
9
+ base: {
10
+ display: 'flex',
11
+ alignItems: 'center',
12
+ justifyContent: 'center',
13
+ background: '#00b0f4',
14
+ height: '150px',
15
+ transition: 'background 0.3s ease',
16
+ },
17
+ active: {
18
+ background: '#fc4040',
19
+ },
20
+ prevNext: {
21
+ background: '#f7cb47',
22
+ },
23
+ };
24
+
25
+ const getSlideStyle = (index: number) => {
26
+ if (index === activeSlideIndex) {
27
+ return { ...slideStyles.base, ...slideStyles.active };
28
+ }
29
+ if (index === activeSlideIndex - 1 || index === activeSlideIndex + 1) {
30
+ return { ...slideStyles.base, ...slideStyles.prevNext };
31
+ }
32
+ return slideStyles.base;
33
+ };
34
+
35
+ const onCarouselUpdate = (newIndex: number) => {
36
+ setActiveSlideIndex(newIndex);
37
+ };
38
+ return (
39
+ <PCarousel
40
+ slidesPerPage={3}
41
+ heading="Some Heading"
42
+ onUpdate={(e) => onCarouselUpdate(e.detail.activeIndex)}
43
+ focusOnCenterSlide
44
+ trimSpace={false}
45
+ gradient={true}
46
+ // @ts-expect-error: ignore unknown property (TS2353)
47
+ style={{ '--p-gradient-color-width': '25%' }}
48
+ >
49
+ {Array.from({ length: 6 }).map((_, i) => (
50
+ <div style={getSlideStyle(i)} key={i}>
51
+ {`Slide ${i + 1}`}
52
+ </div>
53
+ ))}
54
+ </PCarousel>
55
+ );
56
+ };
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { PCarousel } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PCarousel heading="Some heading" intl={{'slideLabel': 'Slide %s von %s', 'prev': 'Vorheriger Slide', 'next': 'Nchster Slide', 'first': 'Zum ersten Slide', 'last': 'Zum letzten Slide'}}>
8
+ <div className="grid place-content-center h-[150px] bg-surface prose-text-sm">
9
+ Slide 1
10
+ </div>
11
+ <div className="grid place-content-center h-[150px] bg-surface prose-text-sm">
12
+ Slide 2
13
+ </div>
14
+ <div className="grid place-content-center h-[150px] bg-surface prose-text-sm">
15
+ Slide 3
16
+ </div>
17
+ </PCarousel>
18
+ </>
19
+ )
20
+ }
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import { type CarouselUpdateEventDetail, PButton, PCarousel } from '@porsche-design-system/components-react';
3
+ import { type MouseEvent, useCallback, useState } from 'react';
4
+
5
+ export const Example = () => {
6
+ const [activeSlideIndex, setActiveSlideIndex] = useState(1);
7
+ const onUpdate = useCallback(
8
+ (e: CustomEvent<CarouselUpdateEventDetail>) => setActiveSlideIndex(e.detail.activeIndex),
9
+ []
10
+ );
11
+ const onButtonClick = useCallback(
12
+ (e: MouseEvent<HTMLButtonElement> & { target: HTMLButtonElement }) =>
13
+ setActiveSlideIndex(parseInt(e.target.innerText) - 1),
14
+ []
15
+ );
16
+
17
+ const slideStyle = {
18
+ display: 'flex',
19
+ alignItems: 'center',
20
+ justifyContent: 'center',
21
+ background: '#00b0f4',
22
+ height: '150px',
23
+ };
24
+
25
+ return (
26
+ <>
27
+ <PCarousel heading="Some Heading" activeSlideIndex={activeSlideIndex} onUpdate={onUpdate}>
28
+ <div style={slideStyle}>Slide 1</div>
29
+ <div style={slideStyle}>Slide 2</div>
30
+ <div style={slideStyle}>Slide 3</div>
31
+ </PCarousel>
32
+
33
+ <div className="flex gap-fluid-sm mt-fluid-sm">
34
+ {Array.from(Array(3)).map((_, i) => (
35
+ <PButton key={i} type="button" onClick={onButtonClick} disabled={activeSlideIndex === i}>
36
+ {i + 1}
37
+ </PButton>
38
+ ))}
39
+ </div>
40
+ </>
41
+ );
42
+ };
@@ -0,0 +1,142 @@
1
+ # p-carousel
2
+
3
+ The `p-carousel` component allows related or similar content to be consumed on a step by step basis with a better overview than just showing them in a grid or as a list. The reason for this is, that only a certain amount of slides is visible at the same time.
4
+
5
+ Therefore, the `p-carousel`'s content has to be divided into multiple parts or slides. The amount of slides visible can be specified on a per-breakpoint basis.
6
+
7
+ > **Layout hint**
8
+ >
9
+ > When using the `width` prop to align with the **[Porsche Grid](../../styles/tailwindcss.md)**, the component must span the full viewport width.
10
+ >
11
+ > When using the `--p-carousel-px` CSS variable, the component can be placed within any container, allowing you to customize the horizontal padding that reveals parts of the next/previous slide.
12
+ >
13
+ > When using the `--p-carousel-ps` and `--p-carousel-pe` CSS variables, the component can be placed within any container, allowing you to customize the horizontal padding asymmetric that reveals parts of the next/previous slide.
14
+
15
+ > **Dynamic changes**
16
+ >
17
+ > This component has limited support for dynamic property changes due to the way it is implemented.
18
+ >
19
+ > If you need to use a specific property dynamically, please open a [feature request](https://designsystem.porsche.com/help/feature-request/).
20
+
21
+ ## Usage
22
+
23
+ ### Do:
24
+
25
+ - Use to showcase a group of related featured content in a row, such as images or cards.
26
+ - Use when you have five or fewer items of the same style to display.
27
+ - Use when there is insufficient content space to display all items without overlapping or cluttering.
28
+ - Keep the number of slides within the carousel to a minimum, preferably five or fewer.
29
+ - Use specify the number of slides visible at the same time, either static or for each breakpoint individually.
30
+
31
+ ### Don't:
32
+
33
+ - Don't vary the size of the items in its height.
34
+ - Don't maintain the same layout or at least the same content structure with every item.
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. - Supports cycling through all items. - Activates "Skip" link (if set through `skipLinkTarget`). |
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 carousel. |
51
+
52
+ #### Internal **ARIA** that is managed by the component:
53
+
54
+ | ARIA | Usage |
55
+ | --- | --- |
56
+ | `aria-label="STRING"` | Defines a string value that labels prev/next and carousel items. |
57
+ | `role="region"` | Defines the carousel as a semantic region. |
58
+ | `role="group"` | Defines the carousel item as a semantic group. |
59
+ | `aria-labelledby="IDREF"` | References the accessible name. |
60
+ | `aria-roledescription="carousel"` | Specifies the role as "carousel". |
61
+ | `aria-roledescription="slide"` | Specifies the role of the carousel item as "slide". |
62
+ | `aria-live="polite"` | Announces current active slide item. |
63
+
64
+ ## Development considerations
65
+
66
+ ### Skip Carousel Entries
67
+
68
+ Through the `skipLinkTarget` property, a skip link for keyboard users can be provided to give the possibility to skip over all carousel entries. The skip link is only visible when it receives focus from the keyboard.
69
+
70
+ - Use the `skipLinkTarget` property if you have >5 carousel items
71
+ - The target of the skip link should point to the next heading or element right after the carousel
72
+
73
+ ### Common do's and don'ts
74
+
75
+ - **Do** configure `skip-link-target` for larger carousels or repeated content sections.
76
+ - **Do** ensure the skip target points to the next meaningful section.
77
+ - **Do** provide a descriptive carousel label via the `aria` property.
78
+ - **Don't** force keyboard users to tab through every slide control when a skip path is needed.
79
+ - **Don't** use vague labels that do not communicate carousel context.
80
+
81
+ ## API
82
+
83
+ ### Properties
84
+
85
+ | Property | Type | Default | Description |
86
+ | --- | --- | --- | --- |
87
+ | `activeSlideIndex` | `number` | `0` | Sets the zero-based index of the currently visible slide. Update this to navigate programmatically. |
88
+ | `alignControls` | `'start'` `'center'` `'auto'` | `'auto'` | Controls the alignment of custom slotted controls within the header area. |
89
+ | `alignHeader` | `'start'` `'center'` | `'start'` | Controls the horizontal alignment of the heading and description. |
90
+ | `aria` | `CarouselAriaAttribute` | `undefined` | Sets ARIA attributes on the carousel region element for improved accessibility. |
91
+ | `description` | `string` | `undefined` | Sets the description text displayed below the heading for additional context. |
92
+ | `focusOnCenterSlide` | `boolean` | `false` | When enabled, each slide is individually focusable and the carousel navigates one slide at a time instead of one page. |
93
+ | `gradient` | `boolean` | `false` | Shows a gradient fade at the start and end edges to visually indicate more slides beyond the viewport. |
94
+ | `heading` | `string` | `undefined` | Sets the heading text displayed above the carousel. Also used as the accessible label when no `aria` prop is set. |
95
+ | `headingSize` | `'x-large'` `'xx-large'` | `'x-large'` | Sets the font size of the carousel heading. |
96
+ | `intl` | `CarouselInternationalization` | `undefined` | Overrides the default label strings used for the previous, next, and page indicators — useful for localization. |
97
+ | `pagination` | `boolean`<br>`BreakpointCustomizable<boolean>` | `false` | Shows pagination dot indicators below the carousel. Supports responsive breakpoint values. |
98
+ | `rewind` | `boolean` | `false` | Enables infinite looping — navigating past the last slide wraps back to the first, and vice versa. |
99
+ | `skipLinkTarget` | `string` | `undefined` | Sets the `href` of an in-page skip link that lets keyboard users jump past the carousel slides. |
100
+ | `slidesPerPage` | `'auto'` `1` `2` `3` `4` `5` `6` `7` `8` `9` `10`<br>`BreakpointCustomizable<CarouselSlidesPerPage>` | `1` | Sets how many slides are visible at once. Use `auto` to control each slide's width via CSS. Supports responsive breakpoint values. |
101
+ | `trimSpace` | `boolean` | `false` | Removes whitespace before the first and after the last slide when `focusOnCenterSlide` is enabled. |
102
+ | `width` | `'basic'` `'extended'` `'wide'` `'full'` | `'basic'` | Sets the maximum width and outer spacing of the carousel, aligned to PDS grid widths. |
103
+
104
+ ### Events
105
+
106
+ | Event | Type | Description |
107
+ | --- | --- | --- |
108
+ | `update` | `CustomEvent<CarouselUpdateEventDetail>`<br>`{ activeIndex: number; previousIndex: number }` | Emitted when the carousel navigates to a new slide, with the active and previous slide indexes in the event detail. |
109
+
110
+ ### Controlled properties
111
+
112
+ - `activeSlideIndex` — a controlled prop, but the component also updates it internally. Listen for the `update` event to observe changes; you do not have to write the value back.
113
+
114
+ ### Slots
115
+
116
+ | Slot | Required | Allowed tag names | Description |
117
+ | --- | --- | --- | --- |
118
+ | `heading` | no | — | Renders a heading above the carousel. |
119
+ | `description` | no | — | Renders descriptive content below the heading. |
120
+ | `controls` | no | — | Renders custom controls such as navigation buttons or indicators. |
121
+ | _(default)_ | no | — | Default slot for the carousel slides. |
122
+
123
+ ### CSS Variables
124
+
125
+ | CSS Variable | Default | Description |
126
+ | --- | --- | --- |
127
+ | `--p-carousel-px` | — | Defines the logical inline start and end padding of the carousel, the extra space is used to show parts of the next/previous slide. When used then the prop `width` has no effect anymore. |
128
+ | `--p-carousel-ps` | — | Defines the logical inline start padding of the carousel, the extra space is used to show parts of the next/previous slide. Needs to be used in combination with `--p-carousel-px` or `--p-carousel-pe`. When used then the prop `width` has no effect anymore. |
129
+ | `--p-carousel-pe` | — | Defines the logical inline end padding of the carousel, the extra space is used to show parts of the next/previous slide. Needs to be used in combination with `--p-carousel-px` or `--p-carousel-ps`. When used then the prop `width` has no effect anymore. |
130
+ | `--p-carousel-prev-next-color-scheme` | — | Color Scheme applied to the navigation (prev/next buttons) |
131
+ | `--p-carousel-border-radius` | `var(--p-radius-large, var(--p-radius-4xl))` | Sets the border radius of each carousel slide. |
132
+
133
+ ## Examples
134
+
135
+ | Example | When to use | File |
136
+ | --- | --- | --- |
137
+ | Default | Minimal default configuration. | [./examples/Default.tsx](./examples/Default.tsx) |
138
+ | Slides with flexible widths | In case you want to have slides with different widths you can use `slidesPerPage` with a value of `auto`. | [./examples/FlexibleWidths.tsx](./examples/FlexibleWidths.tsx) |
139
+ | Jump to slide (activeSlideIndex) | To control the `p-carousel` from the outside you can specify its `activeSlideIndex` initially but also later. | [./examples/JumpToSlide.tsx](./examples/JumpToSlide.tsx) |
140
+ | Add/remove slides | Slides can be added and removed dynamically. | [./examples/DynamicSlides.tsx](./examples/DynamicSlides.tsx) |
141
+ | Centered Slide and Gradient Customization | The carousel centers the active slide and loops through slides individually rather than by page when multiple slides are visible. | [./examples/FocusOnCenterSlide.tsx](./examples/FocusOnCenterSlide.tsx) |
142
+ | Internationalization (i18n) | Default wordings for screen readers can be overridden or translated by passing an object to the `intl` property. | [./examples/Intl.tsx](./examples/Intl.tsx) |
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { PCheckbox } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <PCheckbox label="Some label" name="some-name"></PCheckbox>
8
+ </>
9
+ )
10
+ }
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import {
3
+ type CheckboxChangeEventDetail,
4
+ PButton,
5
+ PCheckbox,
6
+ PCheckboxProps,
7
+ PText,
8
+ } from '@porsche-design-system/components-react';
9
+ import { FormEvent, useState } from 'react';
10
+
11
+ export const Example = () => {
12
+ const [form, setForm] = useState({ myCheckbox: false });
13
+ const [lastSubmittedData, setLastSubmittedData] = useState<any>();
14
+
15
+ const onChange = (e: CustomEvent<CheckboxChangeEventDetail>) => {
16
+ const { name, checked } = e.target as HTMLElement & PCheckboxProps;
17
+ setForm((prev) => ({
18
+ ...prev,
19
+ [name]: checked,
20
+ }));
21
+ };
22
+
23
+ const onSubmit = (e: FormEvent<HTMLFormElement>) => {
24
+ e.preventDefault();
25
+ setLastSubmittedData(JSON.stringify(form));
26
+ };
27
+
28
+ const onReset = (e: FormEvent<HTMLFormElement>) => {
29
+ e.preventDefault();
30
+ setForm({ myCheckbox: false });
31
+ };
32
+
33
+ return (
34
+ <>
35
+ <form onSubmit={onSubmit} onReset={onReset} className="flex flex-col gap-fluid-sm">
36
+ <PCheckbox name="myCheckbox" label="Some Label" checked={form['myCheckbox']} onChange={onChange} />
37
+ <div className="flex gap-fluid-sm">
38
+ <PButton type="submit">Submit</PButton>
39
+ <PButton type="reset">Reset</PButton>
40
+ </div>
41
+ <PText>Last submitted data: {lastSubmittedData}</PText>
42
+ </form>
43
+ </>
44
+ );
45
+ };
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { PCheckbox } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <div className="flex flex-col gap-static-sm">
8
+ <PCheckbox label="Some label" indeterminate={true}></PCheckbox>
9
+ <PCheckbox label="Some label" indeterminate={true} checked={true}></PCheckbox>
10
+ </div>
11
+ </>
12
+ )
13
+ }
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+ import { PCheckbox, PPopover } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ return (
6
+ <>
7
+ <div className="flex flex-col gap-static-sm">
8
+ <PCheckbox name="some-name">
9
+ <span slot="label">
10
+ <img src="assets/911.png" alt="" className="object-contain inline-block align-middle -mt-2 me-static-sm w-[70px]" />
11
+ Some slotted label with custom content and a "label-after" slot
12
+ </span>
13
+ <PPopover slot="label-after">
14
+ Some label with a
15
+ <a href="https://designsystem.porsche.com" className="underline">
16
+ link
17
+ </a>
18
+ </PPopover>
19
+ </PCheckbox>
20
+ <PCheckbox name="some-name">
21
+ <span slot="label">
22
+ Some slotted label
23
+ </span>
24
+ </PCheckbox>
25
+ <PCheckbox name="some-name" disabled="true">
26
+ <span slot="label">
27
+ Disabled slotted label, a nested
28
+ <a href="https://www.porsche.com" className="underline" tabindex="-1">
29
+ link
30
+ </a>
31
+ and a label-after slot.
32
+ </span>
33
+ <PPopover slot="label-after">
34
+ Some information about the disabled state.
35
+ </PPopover>
36
+ </PCheckbox>
37
+ <PCheckbox name="some-name" state="error">
38
+ <span slot="label">
39
+ Some slotted label with a nested
40
+ <a href="https://www.porsche.com" className="underline">
41
+ link
42
+ </a>
43
+ </span>
44
+ <span slot="message">
45
+ Some slotted error message with a
46
+ <a href="https://designsystem.porsche.com" className="underline">
47
+ link
48
+ </a>
49
+ </span>
50
+ </PCheckbox>
51
+ </div>
52
+ </>
53
+ )
54
+ }
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { PCheckbox, PPopover } from '@porsche-design-system/components-react';
3
+
4
+ export const Example = () => {
5
+ const onClick = () => {
6
+ setChecked(true);
7
+ }
8
+
9
+ return (
10
+ <>
11
+ <div className="flex items-start w-64 border-2 border-contrast-lower rounded-md hover:border-primary transition-colors">
12
+ <label className="inline-flex flex-col p-fluid-xs gap-static-xs prose-text-sm cursor-pointer hover:[--p-checkbox-border-color:var(--color-primary)]" onClick={onClick}>
13
+ <span>
14
+ Some wrapped custom label besides a popover
15
+ </span>
16
+ <PCheckbox checked={false}></PCheckbox>
17
+ </label>
18
+ <PPopover className="mr-static-xs mt-static-xs">
19
+ Some additional content.
20
+ </PPopover>
21
+ </div>
22
+ </>
23
+ )
24
+ }