@primereact/mcp 11.0.0-rc.2
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.
- package/LICENSE.md +45 -0
- package/README.md +94 -0
- package/data/llms/headless/add-ons/introduction.md +16 -0
- package/data/llms/headless/components/accordion/api.json +252 -0
- package/data/llms/headless/components/accordion.md +196 -0
- package/data/llms/headless/components/animateonscroll/api.json +88 -0
- package/data/llms/headless/components/animateonscroll.md +141 -0
- package/data/llms/headless/components/autocomplete/api.json +787 -0
- package/data/llms/headless/components/autocomplete.md +249 -0
- package/data/llms/headless/components/avatar/api.json +154 -0
- package/data/llms/headless/components/avatar.md +149 -0
- package/data/llms/headless/components/badge/api.json +68 -0
- package/data/llms/headless/components/badge.md +150 -0
- package/data/llms/headless/components/breadcrumb/api.json +142 -0
- package/data/llms/headless/components/breadcrumb.md +149 -0
- package/data/llms/headless/components/button/api.json +62 -0
- package/data/llms/headless/components/button.md +73 -0
- package/data/llms/headless/components/card/api.json +36 -0
- package/data/llms/headless/components/card.md +96 -0
- package/data/llms/headless/components/carousel/api.json +793 -0
- package/data/llms/headless/components/carousel.md +196 -0
- package/data/llms/headless/components/checkbox/api.json +593 -0
- package/data/llms/headless/components/checkbox.md +184 -0
- package/data/llms/headless/components/chip/api.json +107 -0
- package/data/llms/headless/components/chip.md +141 -0
- package/data/llms/headless/components/collapsible/api.json +301 -0
- package/data/llms/headless/components/collapsible.md +136 -0
- package/data/llms/headless/components/compare/api.json +533 -0
- package/data/llms/headless/components/compare.md +142 -0
- package/data/llms/headless/components/contextmenu/api.json +495 -0
- package/data/llms/headless/components/contextmenu.md +282 -0
- package/data/llms/headless/components/datatable/api.json +1680 -0
- package/data/llms/headless/components/datatable.md +258 -0
- package/data/llms/headless/components/dataview/api.json +199 -0
- package/data/llms/headless/components/dataview.md +147 -0
- package/data/llms/headless/components/datepicker/api.json +2796 -0
- package/data/llms/headless/components/datepicker.md +456 -0
- package/data/llms/headless/components/dialog/api.json +626 -0
- package/data/llms/headless/components/dialog.md +280 -0
- package/data/llms/headless/components/divider/api.json +130 -0
- package/data/llms/headless/components/divider.md +92 -0
- package/data/llms/headless/components/drawer/api.json +425 -0
- package/data/llms/headless/components/drawer.md +220 -0
- package/data/llms/headless/components/fieldset/api.json +195 -0
- package/data/llms/headless/components/fieldset.md +154 -0
- package/data/llms/headless/components/fileupload/api.json +905 -0
- package/data/llms/headless/components/fileupload.md +323 -0
- package/data/llms/headless/components/floatlabel/api.json +36 -0
- package/data/llms/headless/components/floatlabel.md +19 -0
- package/data/llms/headless/components/fluid/api.json +36 -0
- package/data/llms/headless/components/fluid.md +19 -0
- package/data/llms/headless/components/focustrap/api.json +135 -0
- package/data/llms/headless/components/focustrap.md +125 -0
- package/data/llms/headless/components/gallery/api.json +1349 -0
- package/data/llms/headless/components/gallery.md +355 -0
- package/data/llms/headless/components/iconfield/api.json +62 -0
- package/data/llms/headless/components/iconfield.md +19 -0
- package/data/llms/headless/components/iftalabel/api.json +62 -0
- package/data/llms/headless/components/iftalabel.md +19 -0
- package/data/llms/headless/components/inplace/api.json +340 -0
- package/data/llms/headless/components/inplace.md +153 -0
- package/data/llms/headless/components/inputcolor/api.json +469 -0
- package/data/llms/headless/components/inputcolor.md +253 -0
- package/data/llms/headless/components/inputgroup/api.json +62 -0
- package/data/llms/headless/components/inputgroup.md +19 -0
- package/data/llms/headless/components/inputnumber/api.json +554 -0
- package/data/llms/headless/components/inputnumber.md +167 -0
- package/data/llms/headless/components/inputotp/api.json +276 -0
- package/data/llms/headless/components/inputotp.md +130 -0
- package/data/llms/headless/components/inputpassword/api.json +180 -0
- package/data/llms/headless/components/inputpassword.md +117 -0
- package/data/llms/headless/components/inputtags/api.json +497 -0
- package/data/llms/headless/components/inputtags.md +298 -0
- package/data/llms/headless/components/inputtext/api.json +81 -0
- package/data/llms/headless/components/inputtext.md +109 -0
- package/data/llms/headless/components/knob/api.json +429 -0
- package/data/llms/headless/components/knob.md +151 -0
- package/data/llms/headless/components/label/api.json +62 -0
- package/data/llms/headless/components/label.md +19 -0
- package/data/llms/headless/components/listbox/api.json +814 -0
- package/data/llms/headless/components/listbox.md +194 -0
- package/data/llms/headless/components/menu/api.json +1247 -0
- package/data/llms/headless/components/menu.md +283 -0
- package/data/llms/headless/components/message/api.json +131 -0
- package/data/llms/headless/components/message.md +143 -0
- package/data/llms/headless/components/metergroup/api.json +266 -0
- package/data/llms/headless/components/metergroup.md +129 -0
- package/data/llms/headless/components/motion/api.json +237 -0
- package/data/llms/headless/components/motion.md +160 -0
- package/data/llms/headless/components/navigationmenu/api.json +220 -0
- package/data/llms/headless/components/navigationmenu.md +166 -0
- package/data/llms/headless/components/orderlist/api.json +196 -0
- package/data/llms/headless/components/orderlist.md +221 -0
- package/data/llms/headless/components/organizationchart/api.json +372 -0
- package/data/llms/headless/components/organizationchart.md +254 -0
- package/data/llms/headless/components/paginator/api.json +311 -0
- package/data/llms/headless/components/paginator.md +187 -0
- package/data/llms/headless/components/panel/api.json +195 -0
- package/data/llms/headless/components/panel.md +150 -0
- package/data/llms/headless/components/picklist/api.json +293 -0
- package/data/llms/headless/components/picklist.md +270 -0
- package/data/llms/headless/components/popover/api.json +405 -0
- package/data/llms/headless/components/popover.md +301 -0
- package/data/llms/headless/components/portal/api.json +56 -0
- package/data/llms/headless/components/portal.md +102 -0
- package/data/llms/headless/components/positioner/api.json +165 -0
- package/data/llms/headless/components/positioner.md +181 -0
- package/data/llms/headless/components/progressbar/api.json +87 -0
- package/data/llms/headless/components/progressbar.md +122 -0
- package/data/llms/headless/components/progressspinner/api.json +337 -0
- package/data/llms/headless/components/progressspinner.md +128 -0
- package/data/llms/headless/components/radiobutton/api.json +569 -0
- package/data/llms/headless/components/radiobutton.md +195 -0
- package/data/llms/headless/components/rating/api.json +347 -0
- package/data/llms/headless/components/rating.md +181 -0
- package/data/llms/headless/components/scrollarea/api.json +730 -0
- package/data/llms/headless/components/scrollarea.md +232 -0
- package/data/llms/headless/components/select/api.json +829 -0
- package/data/llms/headless/components/select.md +262 -0
- package/data/llms/headless/components/sidebar/api.json +433 -0
- package/data/llms/headless/components/sidebar.md +266 -0
- package/data/llms/headless/components/skeleton/api.json +68 -0
- package/data/llms/headless/components/skeleton.md +95 -0
- package/data/llms/headless/components/slider/api.json +559 -0
- package/data/llms/headless/components/slider.md +158 -0
- package/data/llms/headless/components/speeddial/api.json +459 -0
- package/data/llms/headless/components/speeddial.md +181 -0
- package/data/llms/headless/components/splitter/api.json +582 -0
- package/data/llms/headless/components/splitter.md +159 -0
- package/data/llms/headless/components/stepper/api.json +385 -0
- package/data/llms/headless/components/stepper.md +183 -0
- package/data/llms/headless/components/styleclass/api.json +134 -0
- package/data/llms/headless/components/styleclass.md +129 -0
- package/data/llms/headless/components/tabs/api.json +336 -0
- package/data/llms/headless/components/tabs.md +158 -0
- package/data/llms/headless/components/tag/api.json +62 -0
- package/data/llms/headless/components/tag.md +121 -0
- package/data/llms/headless/components/terminal/api.json +117 -0
- package/data/llms/headless/components/terminal.md +183 -0
- package/data/llms/headless/components/textarea/api.json +81 -0
- package/data/llms/headless/components/textarea.md +110 -0
- package/data/llms/headless/components/timeline/api.json +270 -0
- package/data/llms/headless/components/timeline.md +117 -0
- package/data/llms/headless/components/toast/api.json +455 -0
- package/data/llms/headless/components/toast.md +277 -0
- package/data/llms/headless/components/togglebutton/api.json +357 -0
- package/data/llms/headless/components/togglebutton.md +183 -0
- package/data/llms/headless/components/toggleswitch/api.json +326 -0
- package/data/llms/headless/components/toggleswitch.md +164 -0
- package/data/llms/headless/components/toolbar/api.json +68 -0
- package/data/llms/headless/components/toolbar.md +96 -0
- package/data/llms/headless/components/tooltip/api.json +478 -0
- package/data/llms/headless/components/tooltip.md +233 -0
- package/data/llms/headless/components/tree/api.json +1297 -0
- package/data/llms/headless/components/tree.md +297 -0
- package/data/llms/headless/components/treetable/api.json +1680 -0
- package/data/llms/headless/components/treetable.md +177 -0
- package/data/llms/headless/guides/ai/llms.md +25 -0
- package/data/llms/headless/guides/installation.md +126 -0
- package/data/llms/headless/guides/introduction.md +20 -0
- package/data/llms/headless/guides/misc/accessibility.md +228 -0
- package/data/llms/headless/llms.md +25 -0
- package/data/llms/headless/resources/introduction.md +15 -0
- package/data/llms/hooks/gettingstarted/introduction.md +34 -0
- package/data/llms/hooks/gettingstarted/setup.md +54 -0
- package/data/llms/hooks/use-attr-selector.md +25 -0
- package/data/llms/hooks/use-controlled-state.md +31 -0
- package/data/llms/hooks/use-event-listener.md +37 -0
- package/data/llms/hooks/use-filter.md +312 -0
- package/data/llms/hooks/use-hot-key.md +40 -0
- package/data/llms/hooks/use-id.md +24 -0
- package/data/llms/hooks/use-intersection-observer.md +42 -0
- package/data/llms/hooks/use-is-mobile.md +24 -0
- package/data/llms/hooks/use-key-filter.md +139 -0
- package/data/llms/hooks/use-local-storage.md +28 -0
- package/data/llms/hooks/use-mask.md +53 -0
- package/data/llms/hooks/use-match-media.md +28 -0
- package/data/llms/hooks/use-mount-effect.md +25 -0
- package/data/llms/hooks/use-mounted.md +36 -0
- package/data/llms/hooks/use-number-formatter.md +48 -0
- package/data/llms/hooks/use-presence.md +44 -0
- package/data/llms/hooks/use-previous.md +28 -0
- package/data/llms/hooks/use-props.md +37 -0
- package/data/llms/hooks/use-queue-task.md +29 -0
- package/data/llms/hooks/use-scrolltop.md +87 -0
- package/data/llms/hooks/use-sortable-list.md +226 -0
- package/data/llms/hooks/use-tree-filter.md +216 -0
- package/data/llms/hooks/use-unmount-effect.md +23 -0
- package/data/llms/hooks/use-update-effect.md +27 -0
- package/data/llms/hooks/use-view-transition.md +31 -0
- package/data/llms/hooks/use-visibility-change.md +30 -0
- package/data/llms/llms-full.txt +125291 -0
- package/data/llms/llms.txt +379 -0
- package/data/llms/manifest.json +12409 -0
- package/data/llms/mcp-data.json +14481 -0
- package/data/llms/primitive/add-ons/introduction.md +16 -0
- package/data/llms/primitive/components/accordion/api.json +1411 -0
- package/data/llms/primitive/components/accordion.md +231 -0
- package/data/llms/primitive/components/animateonscroll/api.json +193 -0
- package/data/llms/primitive/components/animateonscroll.md +91 -0
- package/data/llms/primitive/components/autocomplete/api.json +3167 -0
- package/data/llms/primitive/components/autocomplete.md +344 -0
- package/data/llms/primitive/components/avatar/api.json +703 -0
- package/data/llms/primitive/components/avatar.md +134 -0
- package/data/llms/primitive/components/badge/api.json +363 -0
- package/data/llms/primitive/components/badge.md +118 -0
- package/data/llms/primitive/components/breadcrumb/api.json +1162 -0
- package/data/llms/primitive/components/breadcrumb.md +196 -0
- package/data/llms/primitive/components/button/api.json +246 -0
- package/data/llms/primitive/components/button.md +114 -0
- package/data/llms/primitive/components/buttongroup/api.json +168 -0
- package/data/llms/primitive/components/buttongroup.md +43 -0
- package/data/llms/primitive/components/card/api.json +1252 -0
- package/data/llms/primitive/components/card.md +159 -0
- package/data/llms/primitive/components/carousel/api.json +1374 -0
- package/data/llms/primitive/components/carousel.md +220 -0
- package/data/llms/primitive/components/checkbox/api.json +697 -0
- package/data/llms/primitive/components/checkbox.md +160 -0
- package/data/llms/primitive/components/checkboxgroup/api.json +252 -0
- package/data/llms/primitive/components/checkboxgroup.md +58 -0
- package/data/llms/primitive/components/chip/api.json +853 -0
- package/data/llms/primitive/components/chip.md +135 -0
- package/data/llms/primitive/components/collapsible/api.json +581 -0
- package/data/llms/primitive/components/collapsible.md +133 -0
- package/data/llms/primitive/components/compare/api.json +909 -0
- package/data/llms/primitive/components/compare.md +156 -0
- package/data/llms/primitive/components/contextmenu/api.json +3454 -0
- package/data/llms/primitive/components/contextmenu.md +483 -0
- package/data/llms/primitive/components/datatable/api.json +7832 -0
- package/data/llms/primitive/components/datatable.md +561 -0
- package/data/llms/primitive/components/dataview/api.json +819 -0
- package/data/llms/primitive/components/dataview.md +163 -0
- package/data/llms/primitive/components/datepicker/api.json +9055 -0
- package/data/llms/primitive/components/datepicker.md +760 -0
- package/data/llms/primitive/components/dialog/api.json +2491 -0
- package/data/llms/primitive/components/dialog.md +276 -0
- package/data/llms/primitive/components/divider/api.json +214 -0
- package/data/llms/primitive/components/divider.md +96 -0
- package/data/llms/primitive/components/drawer/api.json +1879 -0
- package/data/llms/primitive/components/drawer.md +220 -0
- package/data/llms/primitive/components/fieldset/api.json +1116 -0
- package/data/llms/primitive/components/fieldset.md +183 -0
- package/data/llms/primitive/components/fileupload/api.json +2445 -0
- package/data/llms/primitive/components/fileupload.md +282 -0
- package/data/llms/primitive/components/floatlabel/api.json +176 -0
- package/data/llms/primitive/components/floatlabel.md +47 -0
- package/data/llms/primitive/components/focustrap/api.json +241 -0
- package/data/llms/primitive/components/focustrap.md +93 -0
- package/data/llms/primitive/components/gallery/api.json +3622 -0
- package/data/llms/primitive/components/gallery.md +387 -0
- package/data/llms/primitive/components/iconfield/api.json +322 -0
- package/data/llms/primitive/components/iconfield.md +53 -0
- package/data/llms/primitive/components/iftalabel/api.json +177 -0
- package/data/llms/primitive/components/iftalabel.md +47 -0
- package/data/llms/primitive/components/inplace/api.json +783 -0
- package/data/llms/primitive/components/inplace.md +141 -0
- package/data/llms/primitive/components/inputcolor/api.json +2211 -0
- package/data/llms/primitive/components/inputcolor.md +295 -0
- package/data/llms/primitive/components/inputnumber/api.json +469 -0
- package/data/llms/primitive/components/inputnumber.md +99 -0
- package/data/llms/primitive/components/inputotp/api.json +469 -0
- package/data/llms/primitive/components/inputotp.md +121 -0
- package/data/llms/primitive/components/inputpassword/api.json +278 -0
- package/data/llms/primitive/components/inputpassword.md +84 -0
- package/data/llms/primitive/components/inputtags/api.json +407 -0
- package/data/llms/primitive/components/inputtags.md +243 -0
- package/data/llms/primitive/components/inputtext/api.json +207 -0
- package/data/llms/primitive/components/inputtext.md +81 -0
- package/data/llms/primitive/components/knob/api.json +841 -0
- package/data/llms/primitive/components/knob.md +148 -0
- package/data/llms/primitive/components/label/api.json +177 -0
- package/data/llms/primitive/components/label.md +44 -0
- package/data/llms/primitive/components/listbox/api.json +1741 -0
- package/data/llms/primitive/components/listbox.md +206 -0
- package/data/llms/primitive/components/menu/api.json +3836 -0
- package/data/llms/primitive/components/menu.md +479 -0
- package/data/llms/primitive/components/message/api.json +863 -0
- package/data/llms/primitive/components/message.md +151 -0
- package/data/llms/primitive/components/metergroup/api.json +1222 -0
- package/data/llms/primitive/components/metergroup.md +209 -0
- package/data/llms/primitive/components/motion.md +112 -0
- package/data/llms/primitive/components/navigationmenu/api.json +298 -0
- package/data/llms/primitive/components/navigationmenu.md +184 -0
- package/data/llms/primitive/components/organizationchart.md +133 -0
- package/data/llms/primitive/components/paginator/api.json +1637 -0
- package/data/llms/primitive/components/paginator.md +223 -0
- package/data/llms/primitive/components/panel/api.json +1270 -0
- package/data/llms/primitive/components/panel.md +186 -0
- package/data/llms/primitive/components/popover/api.json +2281 -0
- package/data/llms/primitive/components/popover.md +277 -0
- package/data/llms/primitive/components/portal/api.json +176 -0
- package/data/llms/primitive/components/portal.md +79 -0
- package/data/llms/primitive/components/progressbar/api.json +857 -0
- package/data/llms/primitive/components/progressbar.md +153 -0
- package/data/llms/primitive/components/progressspinner/api.json +725 -0
- package/data/llms/primitive/components/progressspinner.md +133 -0
- package/data/llms/primitive/components/radiobutton/api.json +929 -0
- package/data/llms/primitive/components/radiobutton.md +201 -0
- package/data/llms/primitive/components/rating/api.json +878 -0
- package/data/llms/primitive/components/rating.md +160 -0
- package/data/llms/primitive/components/scrollarea/api.json +1187 -0
- package/data/llms/primitive/components/scrollarea.md +255 -0
- package/data/llms/primitive/components/select/api.json +3167 -0
- package/data/llms/primitive/components/select.md +351 -0
- package/data/llms/primitive/components/sidebar/api.json +3699 -0
- package/data/llms/primitive/components/sidebar.md +444 -0
- package/data/llms/primitive/components/skeleton/api.json +213 -0
- package/data/llms/primitive/components/skeleton.md +80 -0
- package/data/llms/primitive/components/slider/api.json +1066 -0
- package/data/llms/primitive/components/slider.md +161 -0
- package/data/llms/primitive/components/speeddial/api.json +1002 -0
- package/data/llms/primitive/components/speeddial.md +197 -0
- package/data/llms/primitive/components/splitter/api.json +901 -0
- package/data/llms/primitive/components/splitter.md +137 -0
- package/data/llms/primitive/components/stepper/api.json +2102 -0
- package/data/llms/primitive/components/stepper.md +253 -0
- package/data/llms/primitive/components/styleclass.md +399 -0
- package/data/llms/primitive/components/tabs/api.json +1705 -0
- package/data/llms/primitive/components/tabs.md +200 -0
- package/data/llms/primitive/components/tag/api.json +189 -0
- package/data/llms/primitive/components/tag.md +100 -0
- package/data/llms/primitive/components/terminal/api.json +1709 -0
- package/data/llms/primitive/components/terminal.md +227 -0
- package/data/llms/primitive/components/textarea/api.json +213 -0
- package/data/llms/primitive/components/textarea.md +83 -0
- package/data/llms/primitive/components/timeline/api.json +1180 -0
- package/data/llms/primitive/components/timeline.md +185 -0
- package/data/llms/primitive/components/toast/api.json +2102 -0
- package/data/llms/primitive/components/toast.md +291 -0
- package/data/llms/primitive/components/togglebutton/api.json +433 -0
- package/data/llms/primitive/components/togglebutton.md +161 -0
- package/data/llms/primitive/components/togglebuttongroup/api.json +276 -0
- package/data/llms/primitive/components/togglebuttongroup.md +61 -0
- package/data/llms/primitive/components/toggleswitch/api.json +681 -0
- package/data/llms/primitive/components/toggleswitch.md +149 -0
- package/data/llms/primitive/components/toolbar/api.json +646 -0
- package/data/llms/primitive/components/toolbar.md +126 -0
- package/data/llms/primitive/components/tooltip/api.json +1534 -0
- package/data/llms/primitive/components/tooltip.md +202 -0
- package/data/llms/primitive/components/tree/api.json +2952 -0
- package/data/llms/primitive/components/tree.md +292 -0
- package/data/llms/primitive/components/treetable.md +187 -0
- package/data/llms/primitive/components/visuallyhidden/api.json +186 -0
- package/data/llms/primitive/components/visuallyhidden.md +87 -0
- package/data/llms/primitive/guides/ai/llms.md +25 -0
- package/data/llms/primitive/guides/icons/customicons.md +47 -0
- package/data/llms/primitive/guides/icons/primeicons.md +112 -0
- package/data/llms/primitive/guides/installation.md +115 -0
- package/data/llms/primitive/guides/introduction.md +20 -0
- package/data/llms/primitive/guides/misc/accessibility.md +215 -0
- package/data/llms/primitive/guides/misc/passthrough.md +95 -0
- package/data/llms/primitive/guides/misc/rtl.md +27 -0
- package/data/llms/primitive/llms.md +25 -0
- package/data/llms/primitive/resources/introduction.md +15 -0
- package/data/llms/styled/add-ons/introduction.md +16 -0
- package/data/llms/styled/components/accordion.md +735 -0
- package/data/llms/styled/components/animateonscroll.md +264 -0
- package/data/llms/styled/components/autocomplete.md +1597 -0
- package/data/llms/styled/components/avatar.md +313 -0
- package/data/llms/styled/components/badge.md +213 -0
- package/data/llms/styled/components/breadcrumb.md +461 -0
- package/data/llms/styled/components/button/api.json +246 -0
- package/data/llms/styled/components/button.md +641 -0
- package/data/llms/styled/components/buttongroup.md +614 -0
- package/data/llms/styled/components/card.md +228 -0
- package/data/llms/styled/components/carousel.md +388 -0
- package/data/llms/styled/components/checkbox.md +329 -0
- package/data/llms/styled/components/checkboxgroup.md +619 -0
- package/data/llms/styled/components/chip.md +300 -0
- package/data/llms/styled/components/compare.md +271 -0
- package/data/llms/styled/components/contextmenu.md +550 -0
- package/data/llms/styled/components/datatable.md +8259 -0
- package/data/llms/styled/components/dataview.md +907 -0
- package/data/llms/styled/components/datepicker.md +2807 -0
- package/data/llms/styled/components/dialog.md +1047 -0
- package/data/llms/styled/components/divider.md +207 -0
- package/data/llms/styled/components/drawer.md +470 -0
- package/data/llms/styled/components/fieldset.md +334 -0
- package/data/llms/styled/components/fileupload.md +747 -0
- package/data/llms/styled/components/floatlabel/api.json +210 -0
- package/data/llms/styled/components/floatlabel.md +231 -0
- package/data/llms/styled/components/fluid/api.json +204 -0
- package/data/llms/styled/components/fluid.md +177 -0
- package/data/llms/styled/components/focustrap.md +203 -0
- package/data/llms/styled/components/gallery.md +553 -0
- package/data/llms/styled/components/iconfield/api.json +382 -0
- package/data/llms/styled/components/iconfield.md +385 -0
- package/data/llms/styled/components/iftalabel/api.json +237 -0
- package/data/llms/styled/components/iftalabel.md +158 -0
- package/data/llms/styled/components/inplace.md +312 -0
- package/data/llms/styled/components/inputcolor.md +674 -0
- package/data/llms/styled/components/inputgroup/api.json +399 -0
- package/data/llms/styled/components/inputgroup.md +604 -0
- package/data/llms/styled/components/inputmask.md +282 -0
- package/data/llms/styled/components/inputnumber.md +563 -0
- package/data/llms/styled/components/inputotp.md +335 -0
- package/data/llms/styled/components/inputpassword.md +630 -0
- package/data/llms/styled/components/inputtags.md +727 -0
- package/data/llms/styled/components/inputtext.md +190 -0
- package/data/llms/styled/components/keyfilter.md +289 -0
- package/data/llms/styled/components/knob.md +305 -0
- package/data/llms/styled/components/label/api.json +237 -0
- package/data/llms/styled/components/label.md +224 -0
- package/data/llms/styled/components/listbox.md +807 -0
- package/data/llms/styled/components/menu.md +1175 -0
- package/data/llms/styled/components/message.md +570 -0
- package/data/llms/styled/components/metergroup.md +449 -0
- package/data/llms/styled/components/navigationmenu.md +926 -0
- package/data/llms/styled/components/orderlist.md +519 -0
- package/data/llms/styled/components/organizationchart/api.json +1457 -0
- package/data/llms/styled/components/organizationchart.md +791 -0
- package/data/llms/styled/components/overlaymanager.md +519 -0
- package/data/llms/styled/components/paginator.md +506 -0
- package/data/llms/styled/components/panel.md +394 -0
- package/data/llms/styled/components/picklist.md +1004 -0
- package/data/llms/styled/components/popover.md +372 -0
- package/data/llms/styled/components/progressbar.md +438 -0
- package/data/llms/styled/components/progressspinner.md +128 -0
- package/data/llms/styled/components/radiobutton.md +488 -0
- package/data/llms/styled/components/rating/api.json +766 -0
- package/data/llms/styled/components/rating.md +518 -0
- package/data/llms/styled/components/scrollarea.md +627 -0
- package/data/llms/styled/components/select.md +2122 -0
- package/data/llms/styled/components/sidebar.md +1587 -0
- package/data/llms/styled/components/skeleton.md +226 -0
- package/data/llms/styled/components/slider.md +453 -0
- package/data/llms/styled/components/speeddial.md +723 -0
- package/data/llms/styled/components/splitter.md +536 -0
- package/data/llms/styled/components/stepper.md +614 -0
- package/data/llms/styled/components/tabs.md +543 -0
- package/data/llms/styled/components/tag.md +263 -0
- package/data/llms/styled/components/terminal.md +543 -0
- package/data/llms/styled/components/textarea.md +257 -0
- package/data/llms/styled/components/timeline.md +620 -0
- package/data/llms/styled/components/toast.md +1013 -0
- package/data/llms/styled/components/togglebutton.md +287 -0
- package/data/llms/styled/components/togglebuttongroup.md +328 -0
- package/data/llms/styled/components/toggleswitch.md +262 -0
- package/data/llms/styled/components/toolbar.md +187 -0
- package/data/llms/styled/components/tooltip.md +430 -0
- package/data/llms/styled/components/tree.md +1386 -0
- package/data/llms/styled/components/treetable.md +6842 -0
- package/data/llms/styled/guides/ai/llms.md +25 -0
- package/data/llms/styled/guides/configuration.md +151 -0
- package/data/llms/styled/guides/icons/customicons.md +47 -0
- package/data/llms/styled/guides/icons/primeicons.md +112 -0
- package/data/llms/styled/guides/installation/astro.md +97 -0
- package/data/llms/styled/guides/installation/manual.md +3 -0
- package/data/llms/styled/guides/installation/nextjs.md +129 -0
- package/data/llms/styled/guides/installation/react-router.md +88 -0
- package/data/llms/styled/guides/installation/tanstack.md +92 -0
- package/data/llms/styled/guides/installation/vite.md +91 -0
- package/data/llms/styled/guides/installation.md +42 -0
- package/data/llms/styled/guides/introduction.md +20 -0
- package/data/llms/styled/guides/misc/accessibility.md +211 -0
- package/data/llms/styled/guides/misc/animations.md +389 -0
- package/data/llms/styled/guides/misc/passthrough.md +95 -0
- package/data/llms/styled/guides/misc/rtl.md +27 -0
- package/data/llms/styled/guides/theming/styled.md +779 -0
- package/data/llms/styled/guides/theming/tailwind.md +473 -0
- package/data/llms/styled/guides/theming/unstyled.md +115 -0
- package/data/llms/styled/resources/introduction.md +15 -0
- package/data/llms/tailwind/add-ons/introduction.md +16 -0
- package/data/llms/tailwind/components/accordion.md +383 -0
- package/data/llms/tailwind/components/autocomplete.md +1346 -0
- package/data/llms/tailwind/components/avatar.md +305 -0
- package/data/llms/tailwind/components/badge.md +207 -0
- package/data/llms/tailwind/components/breadcrumb.md +387 -0
- package/data/llms/tailwind/components/button/api.json +246 -0
- package/data/llms/tailwind/components/button.md +617 -0
- package/data/llms/tailwind/components/buttongroup.md +599 -0
- package/data/llms/tailwind/components/card.md +224 -0
- package/data/llms/tailwind/components/carousel.md +329 -0
- package/data/llms/tailwind/components/checkbox.md +179 -0
- package/data/llms/tailwind/components/checkboxgroup.md +279 -0
- package/data/llms/tailwind/components/chip.md +304 -0
- package/data/llms/tailwind/components/compare.md +295 -0
- package/data/llms/tailwind/components/contextmenu.md +415 -0
- package/data/llms/tailwind/components/datatable.md +4062 -0
- package/data/llms/tailwind/components/dataview.md +864 -0
- package/data/llms/tailwind/components/datepicker.md +823 -0
- package/data/llms/tailwind/components/dialog.md +1216 -0
- package/data/llms/tailwind/components/divider.md +205 -0
- package/data/llms/tailwind/components/drawer.md +500 -0
- package/data/llms/tailwind/components/fieldset.md +326 -0
- package/data/llms/tailwind/components/fluid.md +117 -0
- package/data/llms/tailwind/components/iconfield.md +197 -0
- package/data/llms/tailwind/components/inplace.md +324 -0
- package/data/llms/tailwind/components/inputcolor.md +493 -0
- package/data/llms/tailwind/components/inputgroup.md +375 -0
- package/data/llms/tailwind/components/inputnumber.md +463 -0
- package/data/llms/tailwind/components/inputotp.md +255 -0
- package/data/llms/tailwind/components/inputpassword.md +543 -0
- package/data/llms/tailwind/components/inputtext.md +141 -0
- package/data/llms/tailwind/components/label.md +100 -0
- package/data/llms/tailwind/components/listbox.md +886 -0
- package/data/llms/tailwind/components/menu.md +1049 -0
- package/data/llms/tailwind/components/message.md +575 -0
- package/data/llms/tailwind/components/metergroup.md +510 -0
- package/data/llms/tailwind/components/navigationmenu.md +528 -0
- package/data/llms/tailwind/components/overlaymanager.md +567 -0
- package/data/llms/tailwind/components/paginator.md +306 -0
- package/data/llms/tailwind/components/panel.md +395 -0
- package/data/llms/tailwind/components/popover.md +424 -0
- package/data/llms/tailwind/components/progressbar.md +313 -0
- package/data/llms/tailwind/components/radiobutton.md +366 -0
- package/data/llms/tailwind/components/rating.md +300 -0
- package/data/llms/tailwind/components/scrollarea.md +638 -0
- package/data/llms/tailwind/components/select.md +1220 -0
- package/data/llms/tailwind/components/sidebar.md +1511 -0
- package/data/llms/tailwind/components/skeleton.md +236 -0
- package/data/llms/tailwind/components/slider.md +291 -0
- package/data/llms/tailwind/components/splitter.md +546 -0
- package/data/llms/tailwind/components/tabs.md +462 -0
- package/data/llms/tailwind/components/tag.md +255 -0
- package/data/llms/tailwind/components/textarea.md +170 -0
- package/data/llms/tailwind/components/timeline.md +656 -0
- package/data/llms/tailwind/components/toast.md +246 -0
- package/data/llms/tailwind/components/togglebutton.md +264 -0
- package/data/llms/tailwind/components/togglebuttongroup.md +262 -0
- package/data/llms/tailwind/components/toggleswitch.md +203 -0
- package/data/llms/tailwind/components/toolbar.md +192 -0
- package/data/llms/tailwind/components/tooltip.md +449 -0
- package/data/llms/tailwind/guides/ai/llms.md +25 -0
- package/data/llms/tailwind/guides/icons/customicons.md +47 -0
- package/data/llms/tailwind/guides/icons/primeicons.md +112 -0
- package/data/llms/tailwind/guides/installation/astro.md +165 -0
- package/data/llms/tailwind/guides/installation/manual.md +3 -0
- package/data/llms/tailwind/guides/installation/nextjs.md +169 -0
- package/data/llms/tailwind/guides/installation/react-router.md +157 -0
- package/data/llms/tailwind/guides/installation/tanstack.md +161 -0
- package/data/llms/tailwind/guides/installation/vite.md +160 -0
- package/data/llms/tailwind/guides/installation.md +42 -0
- package/data/llms/tailwind/guides/introduction.md +20 -0
- package/data/llms/tailwind/guides/misc/accessibility.md +205 -0
- package/data/llms/tailwind/guides/misc/passthrough.md +95 -0
- package/data/llms/tailwind/guides/misc/rtl.md +27 -0
- package/data/llms/tailwind/guides/theming/guide.md +179 -0
- package/data/llms/tailwind/guides/theming.md +191 -0
- package/data/llms/tailwind/llms.md +25 -0
- package/data/llms/tailwind/resources/introduction.md +15 -0
- package/data/manifest.json +12409 -0
- package/data/mcp-data.json +14481 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +2 -0
- package/package.json +61 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# With Vite
|
|
2
|
+
|
|
3
|
+
Setting up PrimeReact Tailwind components in a Vite project.
|
|
4
|
+
|
|
5
|
+
<DocMessage>
|
|
6
|
+
Start from our <a href="https://github.com/primefaces/primereact-examples/tree/main/vite-tailwind-quickstart" target="_blank" rel="noopener noreferrer">Vite + Tailwind template</a>, pre-configured with PrimeReact.
|
|
7
|
+
</DocMessage>
|
|
8
|
+
|
|
9
|
+
## Install via CLI
|
|
10
|
+
|
|
11
|
+
PrimeReact's Tailwind components ship as a shadcn-compatible registry, so the shadcn CLI can scaffold everything for you. You need a project with Tailwind CSS v4 already set up.
|
|
12
|
+
|
|
13
|
+
<DocStepper>
|
|
14
|
+
<DocStep>
|
|
15
|
+
|
|
16
|
+
### Initialize
|
|
17
|
+
|
|
18
|
+
Run `init` with the PrimeReact theme. This creates `components.json`, installs the base packages, adds the `cn` helper, and writes the design tokens (`--p-primary-*`, `--p-surface-*`) and the `tailwindcss-primeui` plugin to your global stylesheet:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx shadcn@latest init -t vite https://primereact.dev/r/theme.json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
</DocStep>
|
|
25
|
+
<DocStep>
|
|
26
|
+
|
|
27
|
+
### Wrap with PrimeReactProvider
|
|
28
|
+
|
|
29
|
+
Wrap your app with `PrimeReactProvider` so component behavior and your [PrimeUI](https://primeui.dev/pricing) license are available everywhere — see the [PrimeReactProvider](#primereactprovider) snippet below.
|
|
30
|
+
|
|
31
|
+
</DocStep>
|
|
32
|
+
<DocStep>
|
|
33
|
+
|
|
34
|
+
### Add Components
|
|
35
|
+
|
|
36
|
+
Add any component by its registry URL:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx shadcn@latest add https://primereact.dev/r/button.json
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Then pick your colors — see [Theming](/docs/tailwind/guides/theming).
|
|
43
|
+
|
|
44
|
+
</DocStep>
|
|
45
|
+
|
|
46
|
+
</DocStepper>
|
|
47
|
+
|
|
48
|
+
## Manual installation
|
|
49
|
+
|
|
50
|
+
PrimeReact Tailwind components are distributed through a shadcn-compatible registry, each component is copied into your codebase, so there is no theme file or runtime theme provider to set up.
|
|
51
|
+
|
|
52
|
+
<DocStepper>
|
|
53
|
+
<DocStep>
|
|
54
|
+
|
|
55
|
+
### Install Packages
|
|
56
|
+
|
|
57
|
+
Install PrimeReact along with the icon package and the Tailwind utilities the components rely on:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm install primereact@11.0.0-rc.2 @primeicons/react@8.0.0-rc.1 tailwindcss-primeui tailwind-merge
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
</DocStep>
|
|
64
|
+
<DocStep>
|
|
65
|
+
|
|
66
|
+
### Add the `cn` Helper
|
|
67
|
+
|
|
68
|
+
The components rely on a `cn` utility to merge class names. Create `lib/utils.ts` and add the helper:
|
|
69
|
+
|
|
70
|
+
```ts showLineNumbers title="lib/utils.ts"
|
|
71
|
+
import { cn as _cn } from '@primeuix/utils';
|
|
72
|
+
import { twMerge } from 'tailwind-merge';
|
|
73
|
+
|
|
74
|
+
export function cn(...inputs: unknown[]) {
|
|
75
|
+
return twMerge(_cn(...inputs));
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
</DocStep>
|
|
80
|
+
<DocStep>
|
|
81
|
+
|
|
82
|
+
### Set up Global Styles
|
|
83
|
+
|
|
84
|
+
Import Tailwind and the `tailwindcss-primeui` plugin in your global stylesheet, and register the `dark` variant so utilities and components respond to a `.dark` class:
|
|
85
|
+
|
|
86
|
+
```css showLineNumbers title="src/index.css" {4}
|
|
87
|
+
@import 'tailwindcss';
|
|
88
|
+
@import 'tailwindcss-primeui';
|
|
89
|
+
|
|
90
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The PrimeReact design tokens (`--p-primary-*`, `--p-surface-*`, …) live under `:root` and `.dark`. Add them by running `npx shadcn@latest add https://primereact.dev/r/theme.json`, or copy them from the [Theming](/docs/tailwind/guides/theming) guide.
|
|
94
|
+
|
|
95
|
+
</DocStep>
|
|
96
|
+
<DocStep>
|
|
97
|
+
|
|
98
|
+
### PrimeReactProvider
|
|
99
|
+
|
|
100
|
+
Wrap your app with `PrimeReactProvider` in `src/main.tsx` so component behavior and your [PrimeUI](https://primeui.dev/pricing) license are available everywhere. Set `darkModeSelector` to the same `.dark` class used above:
|
|
101
|
+
|
|
102
|
+
```tsx showLineNumbers title="src/main.tsx" {10,13}
|
|
103
|
+
import { StrictMode } from 'react';
|
|
104
|
+
import { createRoot } from 'react-dom/client';
|
|
105
|
+
import App from './App.tsx';
|
|
106
|
+
import { PrimeReactProvider } from '@primereact/core';
|
|
107
|
+
import './index.css';
|
|
108
|
+
|
|
109
|
+
const primereact = {
|
|
110
|
+
theme: {
|
|
111
|
+
options: {
|
|
112
|
+
darkModeSelector: '.dark'
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
license: 'PrimeUI-Commercial-Key...'
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
createRoot(document.getElementById('root')!).render(
|
|
119
|
+
<StrictMode>
|
|
120
|
+
<PrimeReactProvider {...primereact}>
|
|
121
|
+
<App />
|
|
122
|
+
</PrimeReactProvider>
|
|
123
|
+
</StrictMode>
|
|
124
|
+
);
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
</DocStep>
|
|
128
|
+
<DocStep>
|
|
129
|
+
|
|
130
|
+
### Add Components
|
|
131
|
+
|
|
132
|
+
You can add a component with the shadcn CLI, or add it manually. For example, to add the Button component with the CLI:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
npx shadcn@latest add https://primereact.dev/r/button.json
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
To add it manually instead, head to the [Button](/docs/tailwind/components/button) component page and follow the install steps there.
|
|
139
|
+
|
|
140
|
+
Once added, import the component and render it to verify your setup:
|
|
141
|
+
|
|
142
|
+
```tsx showLineNumbers {1}
|
|
143
|
+
import { Button } from '@/components/ui/button';
|
|
144
|
+
|
|
145
|
+
export default function VerifyInstallation() {
|
|
146
|
+
return (
|
|
147
|
+
<div className="card flex justify-center">
|
|
148
|
+
<Button>Verify</Button>
|
|
149
|
+
</div>
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
</DocStep>
|
|
155
|
+
|
|
156
|
+
</DocStepper>
|
|
157
|
+
|
|
158
|
+
## Next Steps
|
|
159
|
+
|
|
160
|
+
[Theme your components](/docs/tailwind/guides/theming) with CSS variables, then [browse the components](/docs/tailwind/components/button) to add and customize the ones you need.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
|
|
3
|
+
How to set up PrimeReact in your project. Select your framework to get started.
|
|
4
|
+
|
|
5
|
+
<div className="mb-16 mt-2 p-1.75 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2 flex-wrap rounded-[14px] bg-surface-100 dark:bg-surface-800/60 shadow-[0_0_0_0.5px_rgba(0,0,0,0.2)] dark:shadow-[0_0_0_0.5px_rgba(255,255,255,0.2)] m-px">
|
|
6
|
+
<NextLink href="/docs/tailwind/guides/installation/nextjs" className="flex relative items-center justify-between gap-6 pb-2 pt-8 flex-col overflow-hidden bg-(--code-figure-background) rounded-lg shadow-[0_0_0_0.5px_rgba(0,0,0,0.2)] dark:shadow-[0_0_0_0.5px_rgba(255,255,255,0.15)] group transition duration-200 hover:-translate-y-0.5 hover:shadow-[0_0_0_1px_var(--p-primary-color)] dark:hover:shadow-[0_0_0_1px_var(--p-primary-color)]">
|
|
7
|
+
<svg className="size-12 text-surface-700 dark:text-surface-200 transition-transform duration-200 group-hover:scale-110" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-label="Next.js" >
|
|
8
|
+
<path d="M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z" />
|
|
9
|
+
</svg>
|
|
10
|
+
<span className="px-2 py-1.5 rounded-md bg-surface-100 dark:bg-surface-800/75 font-mono text-sm uppercase text-surface-400 dark:text-surface-500 whitespace-nowrap leading-3 tracking-tight transition-colors group-hover:text-(--high-contrast-text-color)">next.js</span>
|
|
11
|
+
</NextLink>
|
|
12
|
+
<NextLink href="/docs/tailwind/guides/installation/vite" className="flex relative items-center justify-between gap-6 pb-2 pt-8 flex-col overflow-hidden bg-(--code-figure-background) rounded-lg shadow-[0_0_0_0.5px_rgba(0,0,0,0.2)] dark:shadow-[0_0_0_0.5px_rgba(255,255,255,0.15)] group transition duration-200 hover:-translate-y-0.5 hover:shadow-[0_0_0_1px_var(--p-primary-color)] dark:hover:shadow-[0_0_0_1px_var(--p-primary-color)]">
|
|
13
|
+
<svg className="size-12 text-surface-700 dark:text-surface-200 transition-transform duration-200 group-hover:scale-110" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-label="Vite" >
|
|
14
|
+
<path d="M13.056 23.238a.57.57 0 0 1-1.02-.355v-5.202c0-.63-.512-1.143-1.144-1.143H5.148a.57.57 0 0 1-.464-.903l3.777-5.29c.54-.753 0-1.804-.93-1.804H.57a.574.574 0 0 1-.543-.746.6.6 0 0 1 .08-.157L5.008.78a.57.57 0 0 1 .467-.24h14.589a.57.57 0 0 1 .466.903l-3.778 5.29c-.54.755 0 1.806.93 1.806h5.745c.238 0 .424.138.513.322a.56.56 0 0 1-.063.603z" />
|
|
15
|
+
</svg>
|
|
16
|
+
<span className="px-2 py-1.5 rounded-md bg-surface-100 dark:bg-surface-800/75 font-mono text-sm uppercase text-surface-400 dark:text-surface-500 whitespace-nowrap leading-3 tracking-tight transition-colors group-hover:text-(--high-contrast-text-color)">vite</span>
|
|
17
|
+
</NextLink>
|
|
18
|
+
<NextLink href="/docs/tailwind/guides/installation/tanstack" className="flex relative items-center justify-between gap-6 pb-2 pt-8 flex-col overflow-hidden bg-(--code-figure-background) rounded-lg shadow-[0_0_0_0.5px_rgba(0,0,0,0.2)] dark:shadow-[0_0_0_0.5px_rgba(255,255,255,0.15)] group transition duration-200 hover:-translate-y-0.5 hover:shadow-[0_0_0_1px_var(--p-primary-color)] dark:hover:shadow-[0_0_0_1px_var(--p-primary-color)]">
|
|
19
|
+
<svg className="size-12 text-surface-700 dark:text-surface-200 transition-transform duration-200 group-hover:scale-110" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-label="TanStack" >
|
|
20
|
+
<path d="M11.078.042c.316-.042.65-.014.97-.014 1.181 0 2.341.184 3.472.532a12.3 12.3 0 0 1 3.973 2.086 11.9 11.9 0 0 1 3.432 4.33c1.446 3.15 1.436 6.97-.046 10.107-.958 2.029-2.495 3.727-4.356 4.965-1.518 1.01-3.293 1.629-5.1 1.848-2.298.279-4.784-.129-6.85-1.188-3.88-1.99-6.518-5.994-6.57-10.382-.01-.846.003-1.697.17-2.534.273-1.365.748-2.683 1.463-3.88a12 12 0 0 1 2.966-3.36A12.3 12.3 0 0 1 9.357.3a12 12 0 0 1 1.255-.2l.133-.016zM7.064 19.99c-.535.057-1.098.154-1.557.454.103.025.222 0 .33 0 .258 0 .52-.01.778.002.647.028 1.32.131 1.945.303.8.22 1.505.65 2.275.942.813.307 1.622.402 2.484.402.435 0 .866-.001 1.287-.12-.22-.117-.534-.095-.778-.144a11 11 0 0 1-1.556-.416 12 12 0 0 1-1.093-.467l-.23-.108a15 15 0 0 0-1.012-.44c-.905-.343-1.908-.512-2.873-.408m.808-2.274c-1.059 0-2.13.187-3.083.667q-.346.177-.659.41c-.063.046-.175.106-.199.188s.061.151.11.204c.238-.127.464-.261.718-.357 1.64-.624 3.63-.493 5.268.078.817.285 1.569.712 2.365 1.046.89.374 1.798.616 2.753.74 1.127.147 2.412.028 3.442-.48.362-.179.865-.451 1.018-.847-.189.017-.36.098-.539.154a9 9 0 0 1-.868.222c-.994.2-2.052.24-3.053.06-.943-.17-1.82-.513-2.693-.873l-.111-.046-.223-.092-.112-.046a26 26 0 0 0-1.35-.527c-.89-.31-1.842-.5-2.784-.5M9.728 1.452c-1.27.28-2.407.826-3.502 1.514-.637.4-1.245.81-1.796 1.323-.82.765-1.447 1.695-1.993 2.666-.563 1-.924 2.166-1.098 3.297-.172 1.11-.2 2.277-.004 3.388.245 1.388.712 2.691 1.448 3.897.248-.116.424-.38.629-.557.414-.359.85-.691 1.317-.978a3.5 3.5 0 0 1 .539-.264c.07-.029.187-.055.22-.132.053-.124-.045-.34-.062-.468a7 7 0 0 1-.068-1.109 9.7 9.7 0 0 1 .61-3.177c.29-.76.73-1.45 1.254-2.069.177-.21.365-.405.56-.6.115-.114.258-.212.33-.359-.376 0-.751.108-1.108.218-.769.237-1.518.588-2.155 1.084-.291.226-.504.522-.779.76-.084.073-.235.17-.352.116-.176-.083-.149-.43-.169-.59-.078-.612.154-1.387.45-1.918.473-.852 1.348-1.58 2.376-1.555.444.011.833.166 1.257.266-.107-.153-.252-.264-.389-.39a5.4 5.4 0 0 0-1.107-.8c-.163-.085-.338-.136-.509-.2-.086-.03-.195-.074-.227-.17-.06-.177.26-.342.377-.417.453-.289 1.01-.527 1.556-.54.854-.021 1.688.452 2.04 1.258.123.284.16.583.184.885l.004.057.006.085.002.029.005.057.004.056c.268-.218.457-.54.718-.774.612-.547 1.45-.79 2.245-.544a2.97 2.97 0 0 1 1.71 1.378c.097.173.365.595.171.767-.152.134-.344.03-.504-.026a3 3 0 0 0-.372-.094l-.068-.014-.069-.013a3.9 3.9 0 0 0-1.377-.002c-.282.05-.557.15-.838.192v.06c.768.006 1.51.444 1.89 1.109.157.275.235.59.295.9.075.38.022.796-.082 1.168-.035.125-.098.336-.247.365-.106.02-.195-.085-.256-.155a4.6 4.6 0 0 0-.492-.522 20 20 0 0 0-1.467-1.14c-.267-.19-.56-.44-.868-.556.087.208.171.402.2.63.088.667-.192 1.296-.612 1.798a2.6 2.6 0 0 1-.426.427c-.067.05-.151.114-.24.1-.277-.044-.31-.463-.353-.677-.144-.726-.086-1.447.114-2.158-.178.09-.307.287-.418.45a5.3 5.3 0 0 0-.612 1.138c-.61 1.617-.604 3.51.186 5.066.088.174.221.15.395.15h.157a3 3 0 0 1 .472.018c.08.01.193 0 .257.06.077.072.036.194.018.282-.05.246-.066.469-.066.72.328-.051.419-.576.535-.84.131-.298.265-.597.387-.9.06-.148.14-.314.119-.479-.024-.185-.157-.381-.25-.54-.177-.298-.378-.606-.508-.929-.104-.258-.007-.58.286-.672.161-.05.334.049.439.166.22.244.363.609.523.896l1.249 2.248q.159.286.32.57c.043.074.086.188.173.219.077.028.182-.012.26-.027.198-.04.398-.083.598-.12.24-.043.605-.035.778-.222-.253-.08-.545-.075-.808-.057-.158.01-.333.067-.479-.025-.216-.137-.36-.455-.492-.667-.326-.525-.633-1.057-.945-1.59l-.05-.084-.1-.17q-.075-.126-.149-.255c-.037-.066-.092-.153-.039-.227.056-.076.179-.08.29-.081h.021q.066.001.117-.004a10 10 0 0 1 1.347-.107c-.035-.122-.135-.26-.103-.39.071-.292.49-.383.686-.174.131.14.207.334.292.504.113.223.24.44.361.66.211.383.441.757.658 1.138l.055.094.028.047c.093.156.187.314.238.489-.753-.035-1.318-.909-1.646-1.499-.027.095.016.179.05.27q.103.282.262.54c.152.244.326.495.556.673.408.315.945.317 1.436.283.315-.022.708-.165 1.018-.068s.434.438.25.7c-.138.196-.321.27-.55.3.162.346.373.667.527 1.02.064.146.13.37.283.448.102.051.248.003.358 0-.11-.292-.317-.54-.419-.839.31.015.61.176.898.28.567.202 1.128.424 1.687.648l.258.104c.23.092.462.183.689.283.083.037.198.123.29.07.074-.043.123-.146.169-.215a10.3 10.3 0 0 0 1.393-3.208c.75-2.989.106-6.287-1.695-8.783-.692-.96-1.562-1.789-2.522-2.476-2.401-1.718-5.551-2.407-8.44-1.768m4.908 14.904c-.636.166-1.292.317-1.945.401.086.293.296.577.45.84.059.101.122.237.24.281.132.05.292-.03.417-.072-.058-.158-.155-.3-.235-.45-.033-.06-.084-.133-.056-.206.05-.137.263-.13.381-.153.31-.063.617-.142.928-.204.114-.023.274-.085.389-.047.086.03.138.1.187.174l.022.033q.043.07.097.122c.125.113.313.13.472.162-.097-.219-.259-.41-.362-.63-.06-.127-.11-.315-.242-.388-.182-.102-.557.089-.743.137m-4.01-1.457c-.03.38-.147.689-.33 1.019.21.026.423.036.629.087.154.038.296.11.449.153-.082-.224-.233-.423-.35-.63-.12-.208-.226-.462-.398-.63" />
|
|
21
|
+
</svg>
|
|
22
|
+
<span className="px-2 py-1.5 rounded-md bg-surface-100 dark:bg-surface-800/75 font-mono text-sm uppercase text-surface-400 dark:text-surface-500 whitespace-nowrap leading-3 tracking-tight transition-colors group-hover:text-(--high-contrast-text-color)">tanstack</span>
|
|
23
|
+
</NextLink>
|
|
24
|
+
<NextLink href="/docs/tailwind/guides/installation/astro" className="flex relative items-center justify-between gap-6 pb-2 pt-8 flex-col overflow-hidden bg-(--code-figure-background) rounded-lg shadow-[0_0_0_0.5px_rgba(0,0,0,0.2)] dark:shadow-[0_0_0_0.5px_rgba(255,255,255,0.15)] group transition duration-200 hover:-translate-y-0.5 hover:shadow-[0_0_0_1px_var(--p-primary-color)] dark:hover:shadow-[0_0_0_1px_var(--p-primary-color)]">
|
|
25
|
+
<svg className="size-12 text-surface-700 dark:text-surface-200 transition-transform duration-200 group-hover:scale-110" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-label="Astro" >
|
|
26
|
+
<path d="M8.358 20.162c-1.186-1.07-1.532-3.316-1.038-4.944.856 1.026 2.043 1.352 3.272 1.535 1.897.283 3.76.177 5.522-.678.202-.098.388-.229.608-.36.166.473.209.95.151 1.437-.14 1.185-.738 2.1-1.688 2.794-.38.277-.782.525-1.175.787-1.205.804-1.531 1.747-1.078 3.119l.044.148a3.158 3.158 0 0 1-1.407-1.188 3.31 3.31 0 0 1-.544-1.815c-.004-.32-.004-.642-.048-.958-.106-.769-.472-1.113-1.161-1.133-.707-.02-1.267.411-1.415 1.09-.012.053-.028.104-.045.165h.002zm-5.961-4.445s3.24-1.575 6.49-1.575l2.451-7.565c.092-.366.36-.614.662-.614.302 0 .57.248.662.614l2.45 7.565c3.85 0 6.491 1.575 6.491 1.575L16.088.727C15.93.285 15.663 0 15.303 0H8.697c-.36 0-.615.285-.784.727l-5.516 14.99z" />
|
|
27
|
+
</svg>
|
|
28
|
+
<span className="px-2 py-1.5 rounded-md bg-surface-100 dark:bg-surface-800/75 font-mono text-sm uppercase text-surface-400 dark:text-surface-500 whitespace-nowrap leading-3 tracking-tight transition-colors group-hover:text-(--high-contrast-text-color)">astro</span>
|
|
29
|
+
</NextLink>
|
|
30
|
+
<NextLink href="/docs/tailwind/guides/installation/react-router" className="flex relative items-center justify-between gap-6 pb-2 pt-8 flex-col overflow-hidden bg-(--code-figure-background) rounded-lg shadow-[0_0_0_0.5px_rgba(0,0,0,0.2)] dark:shadow-[0_0_0_0.5px_rgba(255,255,255,0.15)] group transition duration-200 hover:-translate-y-0.5 hover:shadow-[0_0_0_1px_var(--p-primary-color)] dark:hover:shadow-[0_0_0_1px_var(--p-primary-color)]">
|
|
31
|
+
<svg className="size-12 text-surface-700 dark:text-surface-200 transition-transform duration-200 group-hover:scale-110" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-label="React Router" >
|
|
32
|
+
<path d="M12.118 5.466a2.306 2.306 0 00-.623.08c-.278.067-.702.332-.953.583-.41.423-.49.609-.662 1.469-.08.423.41 1.43.847 1.734.45.317 1.085.502 2.065.608 1.429.16 1.84.636 1.84 2.197 0 1.377-.385 1.747-1.96 1.906-1.707.172-2.58.834-2.765 2.117-.106.781.41 1.76 1.125 2.091 1.627.768 3.15-.198 3.467-2.196.211-1.284.622-1.642 1.998-1.747 1.588-.133 2.409-.675 2.713-1.787.278-1.02-.304-2.157-1.297-2.554-.264-.106-.873-.238-1.35-.291-1.495-.16-1.879-.424-2.038-1.39-.225-1.337-.317-1.562-.794-2.09a2.174 2.174 0 00-1.613-.73zm-4.785 4.36a2.145 2.145 0 00-.497.048c-1.469.318-2.17 2.051-1.35 3.295 1.178 1.774 3.944.953 3.97-1.177.012-1.193-.98-2.143-2.123-2.166zM2.089 14.19a2.22 2.22 0 00-.427.052c-2.158.476-2.237 3.626-.106 4.182.53.145.582.145 1.111.013 1.191-.318 1.866-1.456 1.549-2.607-.278-1.02-1.144-1.664-2.127-1.64zm19.824.008c-.233.002-.477.058-.784.162-1.39.477-1.866 2.092-.98 3.336.557.794 1.96 1.058 2.82.516 1.416-.874 1.363-3.057-.093-3.746-.38-.186-.663-.271-.963-.268z" />
|
|
33
|
+
</svg>
|
|
34
|
+
<span className="px-2 py-1.5 rounded-md bg-surface-100 dark:bg-surface-800/75 font-mono text-sm uppercase text-surface-400 dark:text-surface-500 whitespace-nowrap leading-3 tracking-tight transition-colors group-hover:text-(--high-contrast-text-color)">react router</span>
|
|
35
|
+
</NextLink>
|
|
36
|
+
{/* <NextLink href="/docs/tailwind/guides/installation/manual" className="flex relative items-center justify-between gap-6 pb-2 pt-8 flex-col overflow-hidden bg-(--code-figure-background) rounded-lg shadow-[0_0_0_0.5px_rgba(0,0,0,0.2)] dark:shadow-[0_0_0_0.5px_rgba(255,255,255,0.15)] group transition duration-200 hover:-translate-y-0.5 hover:shadow-[0_0_0_1px_var(--p-primary-color)] dark:hover:shadow-[0_0_0_1px_var(--p-primary-color)]">
|
|
37
|
+
<svg className="size-12 text-surface-700 dark:text-surface-200 transition-transform duration-200 group-hover:scale-110" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-label="React" >
|
|
38
|
+
<path d="M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z" />
|
|
39
|
+
</svg>
|
|
40
|
+
<span className="px-2 py-1.5 rounded-md bg-surface-100 dark:bg-surface-800/75 font-mono text-sm uppercase text-surface-400 dark:text-surface-500 whitespace-nowrap leading-3 tracking-tight transition-colors group-hover:text-(--high-contrast-text-color)">manual</span>
|
|
41
|
+
</NextLink> */}
|
|
42
|
+
</div>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Tailwind
|
|
2
|
+
|
|
3
|
+
Copy-paste React components styled with Tailwind CSS. Own the code, customize everything.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Tailwind components are built with Tailwind CSS utility classes, no theme file, no runtime dependency. You copy the component file into your project and modify it however you want. Inspired by the shadcn/ui approach.
|
|
8
|
+
|
|
9
|
+
Use Tailwind mode when you want full ownership of your components and prefer styling with utility classes. Every component is a single file you control.
|
|
10
|
+
|
|
11
|
+
## What you get
|
|
12
|
+
|
|
13
|
+
- 50+ components written in plain Tailwind CSS
|
|
14
|
+
- Installable via CLI, components live in your codebase
|
|
15
|
+
- Composable API powered by the primitive layer
|
|
16
|
+
- Accessibility handled automatically
|
|
17
|
+
|
|
18
|
+
## Next steps
|
|
19
|
+
|
|
20
|
+
Start with [Installation](/docs/tailwind/guides/installation/nextjs) or open any component page to see the install command.
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# Accessibility
|
|
2
|
+
|
|
3
|
+
PrimeReact has WCAG level compliance, refer to the accessibility documentation of each component for detailed information.
|
|
4
|
+
|
|
5
|
+
import { CheckCircle } from '@primeicons/react/check-circle'
|
|
6
|
+
import { TimesCircle } from '@primeicons/react/times-circle'
|
|
7
|
+
|
|
8
|
+
## Introduction
|
|
9
|
+
|
|
10
|
+
According to the World Health Organization, 15% of the world population has a disability to some degree. As a result, accessibility features in any context such as a ramp for wheelchair users or a multimedia with captions are crucial to ensure content can be consumed by anyone.
|
|
11
|
+
|
|
12
|
+
Types of disabilities are diverse so you need to know your audience well and how they interact with the content created. There four main categories;
|
|
13
|
+
|
|
14
|
+
### Visual Impairments
|
|
15
|
+
|
|
16
|
+
Blindness, low-level vision or color blindness are the common types of visual impairments. Screen magnifiers and the color blind mode are usually built-in features of the browsers whereas for people who rely on screen readers, page developers are required to make sure content is readable by the readers. Popular readers are NVDA , JAWS and ChromeVox .
|
|
17
|
+
|
|
18
|
+
### Hearing Impairments
|
|
19
|
+
|
|
20
|
+
Deafness or hearing loss refers to the inability to hear sounds totally or partially. People with hearing impairments use assistive devices however it may not be enough when interacting with a web page. Common implementation is providing textual alternatives, transcripts and captions for content with audio.
|
|
21
|
+
|
|
22
|
+
### Mobility Impairments
|
|
23
|
+
|
|
24
|
+
People with mobility impairments have disabilities related to movement due to loss of a limb, paralysis or other varying reasons. Assistive technologies like a head pointer is a device to interact with a screen whereas keyboard or a trackpad remain as solutions for people who are not able to utilize a mouse.
|
|
25
|
+
|
|
26
|
+
### Cognitive Impairments
|
|
27
|
+
|
|
28
|
+
Cognitive impairments have a wider range that includes people with learning disabilities, depression and dyslexia. A well designed content also leads to better user experience for people without disabilities so designing for cognitive impairments result in better design for any user.
|
|
29
|
+
|
|
30
|
+
## WCAG
|
|
31
|
+
|
|
32
|
+
Correct page structure with the aid of assistive technologies are the core ingridients for an accessible web content. HTML is based on an accessible foundation, form controls can be used by keyboard by default and semantic HTML is easier to be processed by a screen reader.
|
|
33
|
+
|
|
34
|
+
[WCAG](https://www.w3.org/WAI/standards-guidelines/wcag/) refers to **Web Content Accessibility Guideline**, a standard managed by the WAI (Web Accessibility Initiative) of W3C (World Wide Web Consortium). WCAG consists of recommendations for making the web content more accessible. PrimeReact components aim high level of WCAG compliancy in the near future.
|
|
35
|
+
|
|
36
|
+
Various countries around the globe have governmental policies regarding web accessibility as well. Most well known of these are Section 508 in the US and [Web Accessibility Directive](https://digital-strategy.ec.europa.eu/en/policies/web-accessibility) of the European Union.
|
|
37
|
+
|
|
38
|
+
## Form Controls
|
|
39
|
+
|
|
40
|
+
Native form elements should be preferred instead of elements that are meant for other purposes like presentation. As an example, button below is rendered as a form control by the browser, can receive focus via tabbing and can be used with space key as well to trigger.
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
<button onClick={(event) => onButtonClick(event)}>Click</button>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
On the other hand, a fancy css based button using a div has no keyboard or screen reader support.
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
<div className="fancy-button" onClick={(event) => onButtonClick(event)}>
|
|
50
|
+
Click
|
|
51
|
+
</div>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`tabIndex` is required to make a div element accessible in addition to use a keydown to bring the keyboard support back. To avoid the overload and implementing functionality that is already provided by the browser, native form controls should be preferred.
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
<div className="fancy-button" onClick={(event) => onClick(event)} onKeyDown={(event) => onKeyDown(event)} tabIndex="0">
|
|
58
|
+
Click
|
|
59
|
+
</div>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Form components must be related to another element that describes what the form element is used for. This is usually achieved with the `label` element.
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
<label htmlFor="myinput">Username:</label>
|
|
66
|
+
<input id="myinput" type="text" name="username" />
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Semantic HTML
|
|
70
|
+
|
|
71
|
+
HTML offers various element to organize content on a web page that screen readers are aware of. Preferring Semantic HTML for good semantics provide out of the box support for reader which is not possible when regular `div` elements with classes are used. Consider the following example that do not mean too much for readers.
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
<div className="header">
|
|
75
|
+
<div className="header-text">Header</div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div className="nav"></div>
|
|
79
|
+
|
|
80
|
+
<div className="main">
|
|
81
|
+
<div className="content">
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div className="sidebar">
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<div className="footer"></div>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Same layout can be achieved using the semantic elements with screen reader support built-in.
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
<header>
|
|
95
|
+
<h1>Header</h1>
|
|
96
|
+
</header>
|
|
97
|
+
|
|
98
|
+
<nav></nav>
|
|
99
|
+
|
|
100
|
+
<main>
|
|
101
|
+
<article></article>
|
|
102
|
+
|
|
103
|
+
<aside></aside>
|
|
104
|
+
|
|
105
|
+
</main>
|
|
106
|
+
|
|
107
|
+
<footer></footer>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## WAI ARIA
|
|
111
|
+
|
|
112
|
+
ARIA refers to "Accessible Rich Internet Applications" is a suite to fill the gap where semantic HTML is inadequate. These cases are mainly related to rich UI components/widgets. Although browser support for rich UI components such as a datepicker or inputcolor has been improved over the past years many web developers still utilize UI components derived from standard HTML elements created by them or by other projects like PrimeReact. These types of components must provide keyboard and screen reader support, the latter case is where the WAI-ARIA is utilized.
|
|
113
|
+
|
|
114
|
+
ARIA consists of roles, properties and attributes. **Roles** define what the element is mainly used for e.g. `checkbox`, `dialog`, `tablist` whereas **States** and **Properties** define the metadata of the element like `aria-checked`, `aria-disabled`.
|
|
115
|
+
|
|
116
|
+
Consider the following case of a native checkbox. It has built-in keyboard and screen reader support.
|
|
117
|
+
|
|
118
|
+
```tsx
|
|
119
|
+
<input type="checkbox" value="Prime" name="ui" checked />
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
A fancy checkbox with css animations might look more appealing but accessibility might be lacking. Checkbox below may display a checked font icon with animations however it is not tabbable, cannot be checked with space key and cannot be read by a reader.
|
|
123
|
+
|
|
124
|
+
```tsx
|
|
125
|
+
<div className="fancy-checkbox">{checked && <i className="checked-icon" />}</div>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
One alternative is using ARIA roles for readers and use javascript for keyboard support. Notice the usage of `aria-labelledby` as a replacement of the `label` tag with `htmlFor`.
|
|
129
|
+
|
|
130
|
+
```tsx
|
|
131
|
+
<span id="chk-label">Remember Me</span>
|
|
132
|
+
<div className="fancy-checkbox" role="checkbox" aria-checked="false" tabIndex="0" aria-labelledby="chk-label"
|
|
133
|
+
onClick={toggle} onKeyDown={(event) => onKeyDown(event)}>
|
|
134
|
+
{checked && <i className="checked-icon" />}
|
|
135
|
+
</div>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
However the best practice is combining semantic HTML for accessibility while keeping the design for UX. This approach involves hiding a native checkbox for accessibility and using javascript events to update its state. Notice the usage of `p-hidden-accessible` that hides the elements from the user but not from the screen reader.
|
|
139
|
+
|
|
140
|
+
```tsx
|
|
141
|
+
<label htmlFor="chkbox">Remember Me</label>
|
|
142
|
+
<div className="fancy-checkbox" onClick={toggle}>
|
|
143
|
+
<input className="p-hidden-accessible" type="checkbox" id="chkbox" onFocus={updateParentVisuals} onBlur={updateParentVisuals}
|
|
144
|
+
onKeyDown={(event) => onKeyDown(event)} />
|
|
145
|
+
{checked && <i className="checked-icon" />}
|
|
146
|
+
</div>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
A working sample is the PrimeReact checkbox that is tabbable, keyboard accessible and is compliant with a screen reader. Instead of ARIA roles it relies on a hidden native checkbox.
|
|
150
|
+
|
|
151
|
+
```tsx
|
|
152
|
+
import { Checkbox } from '@/components/ui/checkbox';
|
|
153
|
+
import { Label } from '@/components/ui/label';
|
|
154
|
+
|
|
155
|
+
export default function AccessibilityCheckboxDemo() {
|
|
156
|
+
return (
|
|
157
|
+
<div className="flex items-center justify-center gap-2">
|
|
158
|
+
<Checkbox inputId="chkbox" />
|
|
159
|
+
<Label htmlFor="chkbox">Remember Me</Label>
|
|
160
|
+
</div>
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Colors
|
|
166
|
+
|
|
167
|
+
Colors on a web page should aim a contrast ratio of at least 4.5:1 and consider a selection of colors that do not cause vibration.
|
|
168
|
+
|
|
169
|
+
### Good Contrast
|
|
170
|
+
|
|
171
|
+
Color contrast between the background and the foreground content should be sufficient enough to ensure readability. Example below displays two cases with good and bad samples.
|
|
172
|
+
|
|
173
|
+
<div className="flex">
|
|
174
|
+
<div className="h-32 w-32 flex justify-center items-center mr-8 font-bold bg-blue-600 rounded-lg">
|
|
175
|
+
<span className="text-white">GOOD</span>
|
|
176
|
+
</div>
|
|
177
|
+
<div className="h-32 w-32 flex justify-center items-center mr-8 font-bold bg-blue-400 rounded-lg">
|
|
178
|
+
<span className="text-white">BAD</span>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
|
|
182
|
+
### Vibration
|
|
183
|
+
|
|
184
|
+
Color vibration is leads to an illusion of motion due to choosing colors that have low visibility against each other. Color combinations need to be picked with caution to avoid vibration.
|
|
185
|
+
|
|
186
|
+
<div className="flex">
|
|
187
|
+
<div className="h-32 w-32 flex justify-center items-center mr-8 font-bold bg-pink-500 rounded-lg">
|
|
188
|
+
<span className="text-blue-500">VIBRATE</span>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
|
|
192
|
+
### Dark Mode
|
|
193
|
+
|
|
194
|
+
Highly saturated colors should be avoided when used within a dark design scheme as they cause eye strain. Instead desaturated colors should be preferred.
|
|
195
|
+
|
|
196
|
+
<div className="flex">
|
|
197
|
+
<div className="h-32 w-32 flex flex-col justify-center items-center mr-8 font-bold bg-gray-900 rounded-lg">
|
|
198
|
+
<span className="text-indigo-500">Indigo 500</span>
|
|
199
|
+
<TimesCircle className="text-indigo-500 mt-4 text-xl" />
|
|
200
|
+
</div>
|
|
201
|
+
<div className="h-32 w-32 flex flex-col justify-center items-center mr-8 font-bold bg-gray-900 rounded-lg">
|
|
202
|
+
<span className="text-indigo-200">Indigo 200</span>
|
|
203
|
+
<CheckCircle className="text-indigo-200 mt-4 text-xl" />
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Pass Through
|
|
2
|
+
|
|
3
|
+
The Pass Through attributes is an API to access the internal DOM Structure of the components.
|
|
4
|
+
|
|
5
|
+
## Introduction
|
|
6
|
+
|
|
7
|
+
In traditional 3rd party UI libraries, users are limited to the API provided by component author. This API commonly consists of props, events and slots. Whenever a requirement emerges for a new customization option in the API, the component
|
|
8
|
+
author needs to develop and publish it with a new release.
|
|
9
|
+
|
|
10
|
+
Vision of PrimeTek is _Your components, not ours_. The pass through feature is a key element to implement this vision by exposing the component internals in order to apply arbitrary attributes and listeners to the DOM elements. The primary
|
|
11
|
+
advantage of this approach is that it frees you from being restricted by the main component API. We recommend considering the pass-through feature whenever you need to tailor a component that lacks a built-in feature for your specific
|
|
12
|
+
requirement.
|
|
13
|
+
|
|
14
|
+
## Basic
|
|
15
|
+
|
|
16
|
+
Each component has a special `pt` property to define an object with keys corresponding to the available DOM elements. Each value can either be a string, an object or a function that returns a string or an object to define the
|
|
17
|
+
arbitrary properties to apply to the element such as styling, aria, data-\* or custom attributes. If the value is a string or a function that returns a string, it is considered as a className definition and added to the className attribute of the
|
|
18
|
+
element. Every component documentation has a dedicated section to document the available section names exposed via PT.
|
|
19
|
+
|
|
20
|
+
Most common usage of `pt` is styling and customization. Example below styles an unstyled Panel component with Tailwind CSS library.
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { Panel } from 'primereact/panel';
|
|
24
|
+
|
|
25
|
+
export default function BasicDemo() {
|
|
26
|
+
return (
|
|
27
|
+
<div>
|
|
28
|
+
<Panel.Root
|
|
29
|
+
pt={{
|
|
30
|
+
root: 'border border-primary rounded-xl p-4',
|
|
31
|
+
header: {
|
|
32
|
+
id: 'myPanelHeader',
|
|
33
|
+
style: {
|
|
34
|
+
userSelect: 'none'
|
|
35
|
+
},
|
|
36
|
+
className: 'flex items-center justify-between text-primary font-bold'
|
|
37
|
+
},
|
|
38
|
+
content: { className: 'text-primary-700 dark:text-primary-200 mt-4' },
|
|
39
|
+
title: 'text-xl'
|
|
40
|
+
}}
|
|
41
|
+
>
|
|
42
|
+
<Panel.Header>
|
|
43
|
+
<Panel.Title> Header</Panel.Title>
|
|
44
|
+
</Panel.Header>
|
|
45
|
+
<Panel.Content>
|
|
46
|
+
<p>
|
|
47
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
|
|
48
|
+
enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
|
|
49
|
+
in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
|
50
|
+
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
51
|
+
</p>
|
|
52
|
+
</Panel.Content>
|
|
53
|
+
</Panel.Root>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Global
|
|
60
|
+
|
|
61
|
+
Defines the shared pass through properties per component type. For example, with the configuration below all panel headers have the `bg-primary` style class and the all autocomplete components have a fixed width. These settings can be overriden by a particular component as components `pt` property has higher precedence over global `pt`.
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
pt: {
|
|
65
|
+
panel: {
|
|
66
|
+
header: {
|
|
67
|
+
className: 'bg-primary text-primary-contrast'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
autocomplete: {
|
|
71
|
+
input: {
|
|
72
|
+
root: 'w-64' // OR { class: 'w-64' }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Custom CSS
|
|
79
|
+
|
|
80
|
+
The `global` property has a `css` option to define custom css that belongs to a global `pt` configuration. Common use case of this feature is defining global styles and animations related to the pass through configuration.
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
pt: {
|
|
84
|
+
global: {
|
|
85
|
+
css: `
|
|
86
|
+
.my-button {
|
|
87
|
+
border-width: 2px;
|
|
88
|
+
}
|
|
89
|
+
`
|
|
90
|
+
},
|
|
91
|
+
button: {
|
|
92
|
+
root: 'my-button'
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# RTL Support
|
|
2
|
+
|
|
3
|
+
Right-to-left direction support of PrimeReact.
|
|
4
|
+
|
|
5
|
+
## Configuration
|
|
6
|
+
|
|
7
|
+
The PrimeReact components natively support Right-to-Left (RTL) text direction through a modern CSS implementation utilizing FlexBox and classes like `*-inline-start` and `*-block-end`. Consequently, no JavaScript configuration is necessary; setting the document's text direction to RTL is sufficient to enable this feature.
|
|
8
|
+
|
|
9
|
+
The RTL setting can either be set using the `dir` attribute or with the `direction` style property.
|
|
10
|
+
|
|
11
|
+
### With Markup
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<html dir="rtl"></html>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### With CSS
|
|
18
|
+
|
|
19
|
+
```css
|
|
20
|
+
html {
|
|
21
|
+
direction: rtl;
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Limitations
|
|
26
|
+
|
|
27
|
+
RTL is widely supported by the UI suite except the Galleria and Carousel components. These components will be enhanced with a modern implementation in upcoming versions with built-in support for RTL.
|