@primereact/mcp 11.0.0-rc.2 → 11.0.0-rc.4
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/README.md +10 -9
- package/data/llms/headless/components/carousel/api.json +1 -1
- package/data/llms/headless/components/contextmenu/api.json +2 -2
- package/data/llms/headless/components/inputcolor/api.json +1 -1
- package/data/llms/headless/components/menu/api.json +2 -2
- package/data/llms/headless/components/textarea/api.json +6 -0
- package/data/llms/headless/guides/ai/mcp.md +113 -0
- package/data/llms/headless/guides/ai/plugin.md +139 -0
- package/data/llms/headless/guides/installation.md +1 -1
- package/data/llms/hooks/use-filter.md +2 -5
- package/data/llms/llms-full.txt +1199 -266
- package/data/llms/llms.txt +8 -0
- package/data/llms/primitive/components/carousel/api.json +1 -1
- package/data/llms/primitive/components/contextmenu/api.json +2 -2
- package/data/llms/primitive/components/inputcolor/api.json +1 -1
- package/data/llms/primitive/components/menu/api.json +8 -8
- package/data/llms/primitive/components/textarea/api.json +6 -6
- package/data/llms/primitive/guides/ai/mcp.md +113 -0
- package/data/llms/primitive/guides/ai/plugin.md +139 -0
- package/data/llms/primitive/guides/icons/primeicons.md +3 -3
- package/data/llms/primitive/guides/installation.md +1 -1
- package/data/llms/styled/components/datatable.md +20 -40
- package/data/llms/styled/components/dataview.md +12 -17
- package/data/llms/styled/components/dialog.md +11 -17
- package/data/llms/styled/components/fileupload.md +3 -3
- package/data/llms/styled/components/inputgroup.md +0 -65
- package/data/llms/styled/components/select.md +3 -5
- package/data/llms/styled/components/slider.md +1 -2
- package/data/llms/styled/components/stepper.md +1 -2
- package/data/llms/styled/components/toolbar.md +10 -10
- package/data/llms/styled/components/tooltip.md +46 -0
- package/data/llms/styled/guides/ai/mcp.md +113 -0
- package/data/llms/styled/guides/ai/plugin.md +139 -0
- package/data/llms/styled/guides/icons/primeicons.md +3 -3
- package/data/llms/styled/guides/installation/astro.md +1 -1
- package/data/llms/styled/guides/installation/configuration.md +135 -0
- package/data/llms/styled/guides/installation/nextjs.md +1 -1
- package/data/llms/styled/guides/installation/react-router.md +1 -1
- package/data/llms/styled/guides/installation/tanstack.md +1 -1
- package/data/llms/styled/guides/installation/vite.md +1 -1
- package/data/llms/tailwind/components/datatable.md +17 -34
- package/data/llms/tailwind/components/dataview.md +12 -17
- package/data/llms/tailwind/components/dialog.md +12 -17
- package/data/llms/tailwind/components/select.md +1 -2
- package/data/llms/tailwind/components/slider.md +1 -2
- package/data/llms/tailwind/components/toolbar.md +10 -7
- package/data/llms/tailwind/guides/ai/mcp.md +113 -0
- package/data/llms/tailwind/guides/ai/plugin.md +139 -0
- package/data/llms/tailwind/guides/icons/primeicons.md +3 -3
- package/data/llms/tailwind/guides/installation/astro.md +1 -1
- package/data/llms/tailwind/guides/installation/nextjs.md +1 -1
- package/data/llms/tailwind/guides/installation/react-router.md +1 -1
- package/data/llms/tailwind/guides/installation/tanstack.md +1 -1
- package/data/llms/tailwind/guides/installation/vite.md +1 -1
- package/data/manifest.json +2400 -1694
- package/data/mcp-data.json +1375 -542
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -1
- package/package.json +9 -4
- package/data/llms/manifest.json +0 -12409
- package/data/llms/mcp-data.json +0 -14481
package/data/llms/llms-full.txt
CHANGED
|
@@ -35481,7 +35481,6 @@ import { StarFill } from '@primeicons/react/star-fill';
|
|
|
35481
35481
|
import { DataTable } from '@primereact/ui/datatable';
|
|
35482
35482
|
import { Rating } from '@primereact/ui/rating';
|
|
35483
35483
|
import { Tag } from '@primereact/ui/tag';
|
|
35484
|
-
import Image from 'next/image';
|
|
35485
35484
|
import * as React from 'react';
|
|
35486
35485
|
|
|
35487
35486
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -35549,7 +35548,7 @@ export default function Preview() {
|
|
|
35549
35548
|
<DataTable.Row key={item.id}>
|
|
35550
35549
|
<DataTable.Cell>
|
|
35551
35550
|
<div className="flex items-center gap-3">
|
|
35552
|
-
<
|
|
35551
|
+
<img
|
|
35553
35552
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
35554
35553
|
alt={item.name}
|
|
35555
35554
|
width={48}
|
|
@@ -36088,7 +36087,6 @@ One row at a time. Clicking a different row replaces the previous selection.
|
|
|
36088
36087
|
|
|
36089
36088
|
```tsx
|
|
36090
36089
|
'use client';
|
|
36091
|
-
import Image from 'next/image';
|
|
36092
36090
|
import { Database } from '@primeicons/react/database';
|
|
36093
36091
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
36094
36092
|
import type { DataTableSelectionEvent } from '@primereact/ui/datatable';
|
|
@@ -36151,7 +36149,7 @@ export default function SingleSelectionDemo() {
|
|
|
36151
36149
|
<DataTable.Row key={item.id}>
|
|
36152
36150
|
<DataTable.Cell>
|
|
36153
36151
|
<div className="flex items-center gap-3">
|
|
36154
|
-
<
|
|
36152
|
+
<img
|
|
36155
36153
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
36156
36154
|
alt={item.name}
|
|
36157
36155
|
width={40}
|
|
@@ -36211,7 +36209,6 @@ Multiple rows without a dedicated column. Pair with `metaKeySelection` so Ctrl/C
|
|
|
36211
36209
|
|
|
36212
36210
|
```tsx
|
|
36213
36211
|
'use client';
|
|
36214
|
-
import Image from 'next/image';
|
|
36215
36212
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
36216
36213
|
import { ShoppingCart } from '@primeicons/react/shopping-cart';
|
|
36217
36214
|
import { Database } from '@primeicons/react/database';
|
|
@@ -36310,7 +36307,7 @@ export default function MultipleSelectionDemo() {
|
|
|
36310
36307
|
<DataTable.Row key={item.id}>
|
|
36311
36308
|
<DataTable.Cell>
|
|
36312
36309
|
<div className="flex items-center gap-3">
|
|
36313
|
-
<
|
|
36310
|
+
<img
|
|
36314
36311
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
36315
36312
|
alt={item.name}
|
|
36316
36313
|
width={40}
|
|
@@ -36706,7 +36703,6 @@ Arrow Up/Down moves focus between rows, Space or Enter toggles the focused row,
|
|
|
36706
36703
|
|
|
36707
36704
|
```tsx
|
|
36708
36705
|
'use client';
|
|
36709
|
-
import Image from 'next/image';
|
|
36710
36706
|
import { Database } from '@primeicons/react/database';
|
|
36711
36707
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
36712
36708
|
import type { DataTableSelectionEvent } from '@primereact/ui/datatable';
|
|
@@ -36786,7 +36782,7 @@ export default function KeyboardDemo() {
|
|
|
36786
36782
|
<DataTable.Row key={item.id}>
|
|
36787
36783
|
<DataTable.Cell>
|
|
36788
36784
|
<div className="flex items-center gap-3">
|
|
36789
|
-
<
|
|
36785
|
+
<img
|
|
36790
36786
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
36791
36787
|
alt={item.name}
|
|
36792
36788
|
width={36}
|
|
@@ -36861,7 +36857,6 @@ Clicking a column header cycles through ascending, descending, and unsorted.
|
|
|
36861
36857
|
|
|
36862
36858
|
```tsx
|
|
36863
36859
|
'use client';
|
|
36864
|
-
import Image from 'next/image';
|
|
36865
36860
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
36866
36861
|
import type { DataTableSortOrderInstance } from '@primereact/ui/datatable';
|
|
36867
36862
|
import { SortAlt } from '@primeicons/react/sort-alt';
|
|
@@ -36958,7 +36953,7 @@ export default function SortDemo() {
|
|
|
36958
36953
|
<DataTable.Row key={item.id}>
|
|
36959
36954
|
<DataTable.Cell>
|
|
36960
36955
|
<div className="flex items-center gap-3">
|
|
36961
|
-
<
|
|
36956
|
+
<img
|
|
36962
36957
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
36963
36958
|
alt={item.name}
|
|
36964
36959
|
width={40}
|
|
@@ -37018,7 +37013,6 @@ Hold Ctrl/Cmd and click multiple column headers to sort by several fields at onc
|
|
|
37018
37013
|
|
|
37019
37014
|
```tsx
|
|
37020
37015
|
'use client';
|
|
37021
|
-
import Image from 'next/image';
|
|
37022
37016
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
37023
37017
|
import type { DataTableSortOrderInstance } from '@primereact/ui/datatable';
|
|
37024
37018
|
import { SortAlt } from '@primeicons/react/sort-alt';
|
|
@@ -37115,7 +37109,7 @@ export default function MultiSortDemo() {
|
|
|
37115
37109
|
<DataTable.Row key={item.id}>
|
|
37116
37110
|
<DataTable.Cell>
|
|
37117
37111
|
<div className="flex items-center gap-3">
|
|
37118
|
-
<
|
|
37112
|
+
<img
|
|
37119
37113
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
37120
37114
|
alt={item.name}
|
|
37121
37115
|
width={40}
|
|
@@ -37181,7 +37175,6 @@ Apply an initial sort on mount. Use `defaultSortField` + `defaultSortOrder` for
|
|
|
37181
37175
|
|
|
37182
37176
|
```tsx
|
|
37183
37177
|
'use client';
|
|
37184
|
-
import Image from 'next/image';
|
|
37185
37178
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
37186
37179
|
import type { DataTableSortOrderInstance } from '@primereact/ui/datatable';
|
|
37187
37180
|
import { SortAlt } from '@primeicons/react/sort-alt';
|
|
@@ -37278,7 +37271,7 @@ export default function PresortDemo() {
|
|
|
37278
37271
|
<DataTable.Row key={item.id}>
|
|
37279
37272
|
<DataTable.Cell>
|
|
37280
37273
|
<div className="flex items-center gap-3">
|
|
37281
|
-
<
|
|
37274
|
+
<img
|
|
37282
37275
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
37283
37276
|
alt={item.name}
|
|
37284
37277
|
width={40}
|
|
@@ -37360,7 +37353,6 @@ import { Badge } from '@primereact/ui/badge';
|
|
|
37360
37353
|
import { DataTable } from '@primereact/ui/datatable';
|
|
37361
37354
|
import { OverlayBadge } from '@primereact/ui/overlaybadge';
|
|
37362
37355
|
import { Tag } from '@primereact/ui/tag';
|
|
37363
|
-
import Image from 'next/image';
|
|
37364
37356
|
import * as React from 'react';
|
|
37365
37357
|
|
|
37366
37358
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -37454,7 +37446,7 @@ export default function PresortMultiDemo() {
|
|
|
37454
37446
|
<DataTable.Row key={item.id}>
|
|
37455
37447
|
<DataTable.Cell>
|
|
37456
37448
|
<div className="flex items-center gap-3">
|
|
37457
|
-
<
|
|
37449
|
+
<img
|
|
37458
37450
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
37459
37451
|
alt={item.name}
|
|
37460
37452
|
width={40}
|
|
@@ -37526,7 +37518,6 @@ import type { DataTablePaginationInstance } from '@primereact/ui/datatable';
|
|
|
37526
37518
|
import { DataTable } from '@primereact/ui/datatable';
|
|
37527
37519
|
import { Paginator } from '@primereact/ui/paginator';
|
|
37528
37520
|
import { Tag } from '@primereact/ui/tag';
|
|
37529
|
-
import Image from 'next/image';
|
|
37530
37521
|
import type { PaginatorPagesInstance } from '@primereact/ui/paginator';
|
|
37531
37522
|
import * as React from 'react';
|
|
37532
37523
|
|
|
@@ -37578,7 +37569,7 @@ export default function PaginationDemo() {
|
|
|
37578
37569
|
<DataTable.Row key={item.id}>
|
|
37579
37570
|
<DataTable.Cell>
|
|
37580
37571
|
<div className="flex items-center gap-3">
|
|
37581
|
-
<
|
|
37572
|
+
<img
|
|
37582
37573
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
37583
37574
|
alt={item.name}
|
|
37584
37575
|
width={40}
|
|
@@ -38633,7 +38624,6 @@ Inline cell editing with `CellEditor`, `CellEditorDisplay` and `CellEditorConten
|
|
|
38633
38624
|
|
|
38634
38625
|
```tsx
|
|
38635
38626
|
'use client';
|
|
38636
|
-
import Image from 'next/image';
|
|
38637
38627
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
38638
38628
|
import { ChevronDown } from '@primeicons/react/chevron-down';
|
|
38639
38629
|
import { Database } from '@primeicons/react/database';
|
|
@@ -38721,7 +38711,7 @@ export default function CellEditDemo() {
|
|
|
38721
38711
|
{({ item, index }: { item: any; index: number }) => (
|
|
38722
38712
|
<DataTable.Row key={item.id}>
|
|
38723
38713
|
<DataTable.Cell>
|
|
38724
|
-
<
|
|
38714
|
+
<img
|
|
38725
38715
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
38726
38716
|
alt={item.name}
|
|
38727
38717
|
width={40}
|
|
@@ -38870,7 +38860,6 @@ Cell editing composes with row selection: clicks inside an editable cell start e
|
|
|
38870
38860
|
|
|
38871
38861
|
```tsx
|
|
38872
38862
|
'use client';
|
|
38873
|
-
import Image from 'next/image';
|
|
38874
38863
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
38875
38864
|
import { Check } from '@primeicons/react/check';
|
|
38876
38865
|
import { Database } from '@primeicons/react/database';
|
|
@@ -39023,7 +39012,7 @@ export default function CellEditSelectionDemo() {
|
|
|
39023
39012
|
</DataTable.Selection>
|
|
39024
39013
|
</DataTable.Cell>
|
|
39025
39014
|
<DataTable.Cell>
|
|
39026
|
-
<
|
|
39015
|
+
<img
|
|
39027
39016
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
39028
39017
|
alt={item.name}
|
|
39029
39018
|
width={36}
|
|
@@ -39174,7 +39163,6 @@ Row-level editing with `RowEditor`, `RowEditorInit`, `RowEditorSave` and `RowEdi
|
|
|
39174
39163
|
|
|
39175
39164
|
```tsx
|
|
39176
39165
|
'use client';
|
|
39177
|
-
import Image from 'next/image';
|
|
39178
39166
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
39179
39167
|
import { Check } from '@primeicons/react/check';
|
|
39180
39168
|
import { Database } from '@primeicons/react/database';
|
|
@@ -39283,7 +39271,7 @@ export default function RowEditDemo() {
|
|
|
39283
39271
|
<DataTable.CellEditor field="name" rowIndex={index} rowData={item}>
|
|
39284
39272
|
<DataTable.CellEditorDisplay>
|
|
39285
39273
|
<div className="flex items-center gap-3">
|
|
39286
|
-
<
|
|
39274
|
+
<img
|
|
39287
39275
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
39288
39276
|
alt={item.name}
|
|
39289
39277
|
width={40}
|
|
@@ -39712,7 +39700,6 @@ import { ProductService, type Product } from '@/shared/services/product.service'
|
|
|
39712
39700
|
import { Database } from '@primeicons/react/database';
|
|
39713
39701
|
import { DataTable } from '@primereact/ui/datatable';
|
|
39714
39702
|
import { Tag } from '@primereact/ui/tag';
|
|
39715
|
-
import Image from 'next/image';
|
|
39716
39703
|
import * as React from 'react';
|
|
39717
39704
|
|
|
39718
39705
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -39765,7 +39752,7 @@ export default function ResizeDemo() {
|
|
|
39765
39752
|
<DataTable.Row key={item.id}>
|
|
39766
39753
|
<DataTable.Cell>
|
|
39767
39754
|
<div className="flex items-center gap-3">
|
|
39768
|
-
<
|
|
39755
|
+
<img
|
|
39769
39756
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
39770
39757
|
alt={item.name}
|
|
39771
39758
|
width={36}
|
|
@@ -39817,7 +39804,6 @@ export default function ResizeDemo() {
|
|
|
39817
39804
|
|
|
39818
39805
|
```tsx
|
|
39819
39806
|
'use client';
|
|
39820
|
-
import Image from 'next/image';
|
|
39821
39807
|
import { Database } from '@primeicons/react/database';
|
|
39822
39808
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
39823
39809
|
import { DataTable } from '@primereact/ui/datatable';
|
|
@@ -39877,7 +39863,7 @@ export default function ResizeExpandDemo() {
|
|
|
39877
39863
|
<DataTable.Row key={item.id}>
|
|
39878
39864
|
<DataTable.Cell>
|
|
39879
39865
|
<div className="flex items-center gap-3">
|
|
39880
|
-
<
|
|
39866
|
+
<img
|
|
39881
39867
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
39882
39868
|
alt={item.name}
|
|
39883
39869
|
width={36}
|
|
@@ -39942,7 +39928,6 @@ import { Database } from '@primeicons/react/database';
|
|
|
39942
39928
|
import type { DataTableColumnReorderEvent } from '@primereact/ui/datatable';
|
|
39943
39929
|
import { DataTable } from '@primereact/ui/datatable';
|
|
39944
39930
|
import { Tag } from '@primereact/ui/tag';
|
|
39945
|
-
import Image from 'next/image';
|
|
39946
39931
|
import * as React from 'react';
|
|
39947
39932
|
|
|
39948
39933
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -39975,7 +39960,7 @@ function renderCell(field: string, item: Product) {
|
|
|
39975
39960
|
case 'name':
|
|
39976
39961
|
return (
|
|
39977
39962
|
<div className="flex items-center gap-3">
|
|
39978
|
-
<
|
|
39963
|
+
<img
|
|
39979
39964
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
39980
39965
|
alt={item.name}
|
|
39981
39966
|
width={36}
|
|
@@ -40084,7 +40069,6 @@ Drag and drop rows to reorder data.
|
|
|
40084
40069
|
|
|
40085
40070
|
```tsx
|
|
40086
40071
|
'use client';
|
|
40087
|
-
import Image from 'next/image';
|
|
40088
40072
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
40089
40073
|
import { Bars } from '@primeicons/react/bars';
|
|
40090
40074
|
import { Database } from '@primeicons/react/database';
|
|
@@ -40149,7 +40133,7 @@ export default function RowReorderDemo() {
|
|
|
40149
40133
|
</DataTable.Cell>
|
|
40150
40134
|
<DataTable.Cell>
|
|
40151
40135
|
<div className="flex items-center gap-3">
|
|
40152
|
-
<
|
|
40136
|
+
<img
|
|
40153
40137
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
40154
40138
|
alt={item.name}
|
|
40155
40139
|
width={36}
|
|
@@ -40220,7 +40204,6 @@ import { Checkbox } from '@primereact/ui/checkbox';
|
|
|
40220
40204
|
import { DataTable } from '@primereact/ui/datatable';
|
|
40221
40205
|
import { Popover } from '@primereact/ui/popover';
|
|
40222
40206
|
import { Tag } from '@primereact/ui/tag';
|
|
40223
|
-
import Image from 'next/image';
|
|
40224
40207
|
import * as React from 'react';
|
|
40225
40208
|
|
|
40226
40209
|
interface ColumnDef {
|
|
@@ -40256,7 +40239,7 @@ function renderCell(field: string, item: Product) {
|
|
|
40256
40239
|
case 'name':
|
|
40257
40240
|
return (
|
|
40258
40241
|
<div className="flex items-center gap-3">
|
|
40259
|
-
<
|
|
40242
|
+
<img
|
|
40260
40243
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
40261
40244
|
alt={item.name}
|
|
40262
40245
|
width={36}
|
|
@@ -41998,7 +41981,6 @@ Export table data to CSV with customizable fields and headers.
|
|
|
41998
41981
|
|
|
41999
41982
|
```tsx
|
|
42000
41983
|
'use client';
|
|
42001
|
-
import Image from 'next/image';
|
|
42002
41984
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
42003
41985
|
import { FileExport } from '@primeicons/react/file-export';
|
|
42004
41986
|
import { Database } from '@primeicons/react/database';
|
|
@@ -42066,7 +42048,7 @@ export default function ExportDemo() {
|
|
|
42066
42048
|
<DataTable.Row key={item.id}>
|
|
42067
42049
|
<DataTable.Cell>
|
|
42068
42050
|
<div className="flex items-center gap-3">
|
|
42069
|
-
<
|
|
42051
|
+
<img
|
|
42070
42052
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
42071
42053
|
alt={item.name}
|
|
42072
42054
|
width={36}
|
|
@@ -42425,7 +42407,6 @@ import { Spinner } from '@primeicons/react/spinner';
|
|
|
42425
42407
|
import { Button } from '@primereact/ui/button';
|
|
42426
42408
|
import { DataTable } from '@primereact/ui/datatable';
|
|
42427
42409
|
import { Tag } from '@primereact/ui/tag';
|
|
42428
|
-
import Image from 'next/image';
|
|
42429
42410
|
import * as React from 'react';
|
|
42430
42411
|
|
|
42431
42412
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -42490,7 +42471,7 @@ export default function LoadingOverlayDemo() {
|
|
|
42490
42471
|
<DataTable.Row key={item.id}>
|
|
42491
42472
|
<DataTable.Cell>
|
|
42492
42473
|
<div className="flex items-center gap-3">
|
|
42493
|
-
<
|
|
42474
|
+
<img
|
|
42494
42475
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
42495
42476
|
alt={item.name}
|
|
42496
42477
|
width={40}
|
|
@@ -42542,7 +42523,6 @@ import { Button } from '@primereact/ui/button';
|
|
|
42542
42523
|
import { DataTable } from '@primereact/ui/datatable';
|
|
42543
42524
|
import { Skeleton } from '@primereact/ui/skeleton';
|
|
42544
42525
|
import { Tag } from '@primereact/ui/tag';
|
|
42545
|
-
import Image from 'next/image';
|
|
42546
42526
|
import * as React from 'react';
|
|
42547
42527
|
|
|
42548
42528
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -42633,7 +42613,7 @@ export default function LoadingSkeletonDemo() {
|
|
|
42633
42613
|
<DataTable.Row key={item.id}>
|
|
42634
42614
|
<DataTable.Cell>
|
|
42635
42615
|
<div className="flex items-center gap-3">
|
|
42636
|
-
<
|
|
42616
|
+
<img
|
|
42637
42617
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
42638
42618
|
alt={item.name}
|
|
42639
42619
|
width={40}
|
|
@@ -43737,7 +43717,6 @@ DataView displays data in grid or list layout with pagination and sorting featur
|
|
|
43737
43717
|
import { ProductService } from '@/shared/services/product.service';
|
|
43738
43718
|
import { Button } from '@primereact/ui/button';
|
|
43739
43719
|
import { Tag } from '@primereact/ui/tag';
|
|
43740
|
-
import Image from 'next/image';
|
|
43741
43720
|
import { DataView } from '@primereact/ui/dataview';
|
|
43742
43721
|
import * as React from 'react';
|
|
43743
43722
|
import { Heart } from '@primeicons/react/heart';
|
|
@@ -43791,14 +43770,14 @@ export default function Preview() {
|
|
|
43791
43770
|
className={`flex flex-col sm:flex-row sm:items-center p-6 gap-4 ${index !== 0 ? 'border-t border-surface-200 dark:border-surface-700' : ''}`}
|
|
43792
43771
|
>
|
|
43793
43772
|
<div className="md:w-40 relative">
|
|
43794
|
-
<
|
|
43773
|
+
<img
|
|
43795
43774
|
className="mx-auto rounded w-full"
|
|
43796
43775
|
src={`https://primefaces.org/cdn/primevue/images/product/${product.image}`}
|
|
43797
43776
|
alt={product.name}
|
|
43798
43777
|
width={160}
|
|
43799
43778
|
height={160}
|
|
43800
43779
|
/>
|
|
43801
|
-
<Tag severity={getSeverity(product)} className="absolute top-1 left-1">
|
|
43780
|
+
<Tag severity={getSeverity(product)} className="absolute top-1 left-1 dark:bg-surface-900!">
|
|
43802
43781
|
{product.inventoryStatus}
|
|
43803
43782
|
</Tag>
|
|
43804
43783
|
</div>
|
|
@@ -43872,7 +43851,6 @@ Displays a list of items with support for layout switching.
|
|
|
43872
43851
|
import { ProductService } from '@/shared/services/product.service';
|
|
43873
43852
|
import { Button } from '@primereact/ui/button';
|
|
43874
43853
|
import { Tag } from '@primereact/ui/tag';
|
|
43875
|
-
import Image from 'next/image';
|
|
43876
43854
|
import { DataView } from '@primereact/ui/dataview';
|
|
43877
43855
|
import * as React from 'react';
|
|
43878
43856
|
import { Heart } from '@primeicons/react/heart';
|
|
@@ -43926,14 +43904,14 @@ export default function BasicDemo() {
|
|
|
43926
43904
|
className={`flex flex-col sm:flex-row sm:items-center p-6 gap-4 ${index !== 0 ? 'border-t border-surface-200 dark:border-surface-700' : ''}`}
|
|
43927
43905
|
>
|
|
43928
43906
|
<div className="md:w-40 relative">
|
|
43929
|
-
<
|
|
43907
|
+
<img
|
|
43930
43908
|
className="mx-auto rounded w-full"
|
|
43931
43909
|
src={`https://primefaces.org/cdn/primevue/images/product/${product.image}`}
|
|
43932
43910
|
alt={product.name}
|
|
43933
43911
|
width={160}
|
|
43934
43912
|
height={160}
|
|
43935
43913
|
/>
|
|
43936
|
-
<Tag severity={getSeverity(product)} className="absolute top-1 left-1">
|
|
43914
|
+
<Tag severity={getSeverity(product)} className="absolute top-1 left-1 dark:bg-surface-900!">
|
|
43937
43915
|
{product.inventoryStatus}
|
|
43938
43916
|
</Tag>
|
|
43939
43917
|
</div>
|
|
@@ -43999,7 +43977,6 @@ import { StarFill } from '@primeicons/react/star-fill';
|
|
|
43999
43977
|
import { Button } from '@primereact/ui/button';
|
|
44000
43978
|
import { Paginator, type PaginatorPagesInstance, type PaginatorRootChangeEvent } from '@primereact/ui/paginator';
|
|
44001
43979
|
import { Tag } from '@primereact/ui/tag';
|
|
44002
|
-
import Image from 'next/image';
|
|
44003
43980
|
import { DataView } from '@primereact/ui/dataview';
|
|
44004
43981
|
import * as React from 'react';
|
|
44005
43982
|
|
|
@@ -44052,14 +44029,14 @@ export default function PaginationDemo() {
|
|
|
44052
44029
|
className={`flex flex-col sm:flex-row sm:items-center p-6 gap-4 ${index !== 0 ? 'border-t border-surface-200 dark:border-surface-700' : ''}`}
|
|
44053
44030
|
>
|
|
44054
44031
|
<div className="md:w-40 relative">
|
|
44055
|
-
<
|
|
44032
|
+
<img
|
|
44056
44033
|
className="mx-auto rounded w-full"
|
|
44057
44034
|
src={`https://primefaces.org/cdn/primevue/images/product/${product.image}`}
|
|
44058
44035
|
alt={product.name}
|
|
44059
44036
|
width={160}
|
|
44060
44037
|
height={160}
|
|
44061
44038
|
/>
|
|
44062
|
-
<Tag severity={getSeverity(product)} className="absolute top-1 left-1">
|
|
44039
|
+
<Tag severity={getSeverity(product)} className="absolute top-1 left-1 dark:bg-surface-900!">
|
|
44063
44040
|
{product.inventoryStatus}
|
|
44064
44041
|
</Tag>
|
|
44065
44042
|
</div>
|
|
@@ -44155,7 +44132,6 @@ import { Button } from '@primereact/ui/button';
|
|
|
44155
44132
|
import { Tag } from '@primereact/ui/tag';
|
|
44156
44133
|
import { ToggleButton } from '@primereact/ui/togglebutton';
|
|
44157
44134
|
import { ToggleButtonGroup, type ToggleButtonGroupValueChangeEvent } from '@primereact/ui/togglebuttongroup';
|
|
44158
|
-
import Image from 'next/image';
|
|
44159
44135
|
import { DataView } from '@primereact/ui/dataview';
|
|
44160
44136
|
import * as React from 'react';
|
|
44161
44137
|
import { Heart } from '@primeicons/react/heart';
|
|
@@ -44233,14 +44209,14 @@ export default function SortDemo() {
|
|
|
44233
44209
|
className={`flex flex-col sm:flex-row sm:items-center p-6 gap-4 ${index !== 0 ? 'border-t border-surface-200 dark:border-surface-700' : ''}`}
|
|
44234
44210
|
>
|
|
44235
44211
|
<div className="md:w-40 relative">
|
|
44236
|
-
<
|
|
44212
|
+
<img
|
|
44237
44213
|
className="mx-auto rounded w-full"
|
|
44238
44214
|
src={`https://primefaces.org/cdn/primevue/images/product/${product.image}`}
|
|
44239
44215
|
alt={product.name}
|
|
44240
44216
|
width={160}
|
|
44241
44217
|
height={160}
|
|
44242
44218
|
/>
|
|
44243
|
-
<Tag severity={getSeverity(product)} className="absolute top-1 left-1">
|
|
44219
|
+
<Tag severity={getSeverity(product)} className="absolute top-1 left-1 dark:bg-surface-900!">
|
|
44244
44220
|
{product.inventoryStatus}
|
|
44245
44221
|
</Tag>
|
|
44246
44222
|
</div>
|
|
@@ -44305,7 +44281,6 @@ import { Button } from '@primereact/ui/button';
|
|
|
44305
44281
|
import { Tag } from '@primereact/ui/tag';
|
|
44306
44282
|
import { ToggleButton } from '@primereact/ui/togglebutton';
|
|
44307
44283
|
import { ToggleButtonGroup, type ToggleButtonGroupValueChangeEvent } from '@primereact/ui/togglebuttongroup';
|
|
44308
|
-
import Image from 'next/image';
|
|
44309
44284
|
import { DataView } from '@primereact/ui/dataview';
|
|
44310
44285
|
import * as React from 'react';
|
|
44311
44286
|
|
|
@@ -44355,14 +44330,14 @@ export default function LayoutDemo() {
|
|
|
44355
44330
|
className={`flex flex-col sm:flex-row sm:items-center p-6 gap-4 ${index !== 0 ? 'border-t border-surface-200 dark:border-surface-700' : ''}`}
|
|
44356
44331
|
>
|
|
44357
44332
|
<div className="md:w-40 relative">
|
|
44358
|
-
<
|
|
44333
|
+
<img
|
|
44359
44334
|
className="mx-auto rounded w-full"
|
|
44360
44335
|
src={`https://primefaces.org/cdn/primevue/images/product/${product.image}`}
|
|
44361
44336
|
alt={product.name}
|
|
44362
44337
|
width={160}
|
|
44363
44338
|
height={160}
|
|
44364
44339
|
/>
|
|
44365
|
-
<Tag severity={getSeverity(product)} className="absolute top-1 left-1">
|
|
44340
|
+
<Tag severity={getSeverity(product)} className="absolute top-1 left-1 dark:bg-surface-900!">
|
|
44366
44341
|
{product.inventoryStatus}
|
|
44367
44342
|
</Tag>
|
|
44368
44343
|
</div>
|
|
@@ -44416,14 +44391,14 @@ export default function LayoutDemo() {
|
|
|
44416
44391
|
<div className="p-6 border border-surface-200 dark:border-surface-700 bg-surface-0 dark:bg-surface-900 rounded flex flex-col">
|
|
44417
44392
|
<div className="flex justify-center">
|
|
44418
44393
|
<div className="relative mx-auto">
|
|
44419
|
-
<
|
|
44394
|
+
<img
|
|
44420
44395
|
src={`https://primefaces.org/cdn/primevue/images/product/${product.image}`}
|
|
44421
44396
|
alt={product.name}
|
|
44422
44397
|
width={300}
|
|
44423
44398
|
height={200}
|
|
44424
44399
|
className="rounded"
|
|
44425
44400
|
/>
|
|
44426
|
-
<Tag severity={getSeverity(product)} className="absolute top-1 left-1">
|
|
44401
|
+
<Tag severity={getSeverity(product)} className="absolute top-1 left-1 dark:bg-surface-900!">
|
|
44427
44402
|
{product.inventoryStatus}
|
|
44428
44403
|
</Tag>
|
|
44429
44404
|
</div>
|
|
@@ -47489,7 +47464,7 @@ export default function Preview() {
|
|
|
47489
47464
|
<Label htmlFor="name" className="text-sm font-semibold">
|
|
47490
47465
|
Name
|
|
47491
47466
|
</Label>
|
|
47492
|
-
<InputText id="name" defaultValue="Amanda Miller" />
|
|
47467
|
+
<InputText data-autofocus id="name" defaultValue="Amanda Miller" />
|
|
47493
47468
|
</div>
|
|
47494
47469
|
<div className="flex flex-col gap-1">
|
|
47495
47470
|
<Label htmlFor="username" className="text-sm font-semibold">
|
|
@@ -47583,7 +47558,7 @@ export default function BasicDemo() {
|
|
|
47583
47558
|
<div className="flex flex-col gap-4">
|
|
47584
47559
|
<div className="flex flex-col gap-1.5">
|
|
47585
47560
|
<Label htmlFor="name">Name</Label>
|
|
47586
|
-
<InputText id="name" defaultValue="Amanda Miller" />
|
|
47561
|
+
<InputText id="name" defaultValue="Amanda Miller" data-autofocus />
|
|
47587
47562
|
</div>
|
|
47588
47563
|
<div className="flex flex-col gap-1.5">
|
|
47589
47564
|
<Label htmlFor="email">Email</Label>
|
|
@@ -47615,6 +47590,7 @@ A dialog can be repositioned by dragging its header when the `draggable` prop is
|
|
|
47615
47590
|
import { Times } from '@primeicons/react/times';
|
|
47616
47591
|
import { Button } from '@primereact/ui/button';
|
|
47617
47592
|
import { Dialog } from '@primereact/ui/dialog';
|
|
47593
|
+
import { Textarea } from '@primereact/ui/textarea';
|
|
47618
47594
|
|
|
47619
47595
|
export default function DraggableDemo() {
|
|
47620
47596
|
return (
|
|
@@ -47638,8 +47614,10 @@ export default function DraggableDemo() {
|
|
|
47638
47614
|
<p className="text-sm text-surface-500 dark:text-surface-400 mt-0 mb-0">
|
|
47639
47615
|
Drag this dialog by its header to reposition it anywhere on the screen.
|
|
47640
47616
|
</p>
|
|
47641
|
-
<
|
|
47642
|
-
|
|
47617
|
+
<Textarea
|
|
47618
|
+
data-autofocus
|
|
47619
|
+
rows={4}
|
|
47620
|
+
className="w-full resize-none"
|
|
47643
47621
|
placeholder="Type your note here..."
|
|
47644
47622
|
defaultValue="Remember to review the design specs for the new dashboard layout before the meeting tomorrow."
|
|
47645
47623
|
/>
|
|
@@ -47666,7 +47644,6 @@ The position of the dialog can be customized with the `position` property. The a
|
|
|
47666
47644
|
|
|
47667
47645
|
```tsx
|
|
47668
47646
|
'use client';
|
|
47669
|
-
import { ArrowDown, ArrowDownLeft, ArrowDownRight, ArrowLeft, ArrowRight, ArrowUp, ArrowUpLeft, ArrowUpRight } from '@primeicons/react';
|
|
47670
47647
|
import { Times } from '@primeicons/react/times';
|
|
47671
47648
|
import { DialogRootChangeEvent, DialogRootProps } from '@primereact/ui/dialog';
|
|
47672
47649
|
import { Button } from '@primereact/ui/button';
|
|
@@ -47689,39 +47666,31 @@ export default function PositionDemo() {
|
|
|
47689
47666
|
<div className="flex flex-wrap justify-center gap-2 mb-2">
|
|
47690
47667
|
<Button onClick={() => openPosition('left')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
47691
47668
|
Left
|
|
47692
|
-
<ArrowLeft />
|
|
47693
47669
|
</Button>
|
|
47694
47670
|
<Button onClick={() => openPosition('right')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
47695
47671
|
Right
|
|
47696
|
-
<ArrowRight />
|
|
47697
47672
|
</Button>
|
|
47698
47673
|
</div>
|
|
47699
47674
|
<div className="flex flex-wrap justify-center gap-2 mb-2">
|
|
47700
47675
|
<Button onClick={() => openPosition('topleft')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
47701
47676
|
TopLeft
|
|
47702
|
-
<ArrowUpLeft />
|
|
47703
47677
|
</Button>
|
|
47704
47678
|
<Button onClick={() => openPosition('top')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
47705
47679
|
Top
|
|
47706
|
-
<ArrowUp />
|
|
47707
47680
|
</Button>
|
|
47708
47681
|
<Button onClick={() => openPosition('topright')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
47709
47682
|
TopRight
|
|
47710
|
-
<ArrowUpRight />
|
|
47711
47683
|
</Button>
|
|
47712
47684
|
</div>
|
|
47713
47685
|
<div className="flex flex-wrap justify-center gap-2">
|
|
47714
47686
|
<Button onClick={() => openPosition('bottomleft')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
47715
47687
|
BottomLeft
|
|
47716
|
-
<ArrowDownLeft />
|
|
47717
47688
|
</Button>
|
|
47718
47689
|
<Button onClick={() => openPosition('bottom')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
47719
47690
|
Bottom
|
|
47720
|
-
<ArrowDown />
|
|
47721
47691
|
</Button>
|
|
47722
47692
|
<Button onClick={() => openPosition('bottomright')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
47723
47693
|
BottomRight
|
|
47724
|
-
<ArrowDownRight />
|
|
47725
47694
|
</Button>
|
|
47726
47695
|
</div>
|
|
47727
47696
|
<Dialog.Root open={open} onOpenChange={(e: DialogRootChangeEvent) => setOpen(e.value as boolean)} position={position} draggable={false}>
|
|
@@ -47744,7 +47713,7 @@ export default function PositionDemo() {
|
|
|
47744
47713
|
<Label htmlFor="username" className="font-semibold">
|
|
47745
47714
|
Username
|
|
47746
47715
|
</Label>
|
|
47747
|
-
<InputText id="username" />
|
|
47716
|
+
<InputText data-autofocus id="username" />
|
|
47748
47717
|
</div>
|
|
47749
47718
|
<div className="flex flex-col gap-1">
|
|
47750
47719
|
<Label htmlFor="email" className="font-semibold">
|
|
@@ -47932,7 +47901,7 @@ export default function ModalDemo() {
|
|
|
47932
47901
|
<Label htmlFor="username" className="font-semibold">
|
|
47933
47902
|
Username
|
|
47934
47903
|
</Label>
|
|
47935
|
-
<InputText id="username" />
|
|
47904
|
+
<InputText data-autofocus id="username" />
|
|
47936
47905
|
</div>
|
|
47937
47906
|
<div className="flex flex-col gap-1">
|
|
47938
47907
|
<Label htmlFor="email" className="font-semibold">
|
|
@@ -47992,7 +47961,7 @@ export default function WithoutModalDemo() {
|
|
|
47992
47961
|
<Label htmlFor="username" className="font-semibold">
|
|
47993
47962
|
Username
|
|
47994
47963
|
</Label>
|
|
47995
|
-
<InputText id="username" />
|
|
47964
|
+
<InputText data-autofocus id="username" />
|
|
47996
47965
|
</div>
|
|
47997
47966
|
<div className="flex flex-col gap-1">
|
|
47998
47967
|
<Label htmlFor="email" className="font-semibold">
|
|
@@ -48418,7 +48387,7 @@ export default function ResponsiveDemo() {
|
|
|
48418
48387
|
<Label htmlFor="eventName" className="text-sm font-semibold">
|
|
48419
48388
|
Event Name
|
|
48420
48389
|
</Label>
|
|
48421
|
-
<InputText id="eventName" placeholder="e.g. Team Standup" />
|
|
48390
|
+
<InputText data-autofocus id="eventName" placeholder="e.g. Team Standup" />
|
|
48422
48391
|
</div>
|
|
48423
48392
|
<div className="flex flex-col md:flex-row gap-4">
|
|
48424
48393
|
<div className="flex flex-col gap-1 flex-1">
|
|
@@ -49983,7 +49952,7 @@ export default function InputGroupDemo() {
|
|
|
49983
49952
|
const { state, hasFiles } = instance;
|
|
49984
49953
|
|
|
49985
49954
|
return (
|
|
49986
|
-
<FileUpload.Trigger as={Button} severity="secondary" variant="outlined" className="border-
|
|
49955
|
+
<FileUpload.Trigger as={Button} severity="secondary" variant="outlined" className="border-transparent!">
|
|
49987
49956
|
<Upload className="mr-2" />
|
|
49988
49957
|
{hasFiles ? state.files.map((file) => file.name).join(', ') : 'Choose file'}
|
|
49989
49958
|
</FileUpload.Trigger>
|
|
@@ -50000,7 +49969,7 @@ export default function InputGroupDemo() {
|
|
|
50000
49969
|
const { state, hasFiles } = instance;
|
|
50001
49970
|
|
|
50002
49971
|
return (
|
|
50003
|
-
<FileUpload.Trigger as={Button} severity="secondary" variant="outlined" className="border-
|
|
49972
|
+
<FileUpload.Trigger as={Button} severity="secondary" variant="outlined" className="border-transparent!">
|
|
50004
49973
|
<Upload className="mr-2" />
|
|
50005
49974
|
{hasFiles ? state.files.map((file) => file.name).join(', ') : 'Choose file'}
|
|
50006
49975
|
</FileUpload.Trigger>
|
|
@@ -50026,7 +49995,7 @@ export default function InputGroupDemo() {
|
|
|
50026
49995
|
const { state, hasFiles } = instance;
|
|
50027
49996
|
|
|
50028
49997
|
return (
|
|
50029
|
-
<FileUpload.Trigger as={Button} severity="secondary" variant="outlined" className="border-
|
|
49998
|
+
<FileUpload.Trigger as={Button} severity="secondary" variant="outlined" className="border-transparent!">
|
|
50030
49999
|
<Upload className="mr-2" />
|
|
50031
50000
|
{hasFiles ? state.files.map((file) => file.name).join(', ') : 'Browse'}
|
|
50032
50001
|
</FileUpload.Trigger>
|
|
@@ -53323,71 +53292,6 @@ export default function SelectDemo() {
|
|
|
53323
53292
|
}
|
|
53324
53293
|
```
|
|
53325
53294
|
|
|
53326
|
-
### File Upload
|
|
53327
|
-
|
|
53328
|
-
File upload functionality can be integrated within an InputGroup for inline file selection.
|
|
53329
|
-
|
|
53330
|
-
```tsx
|
|
53331
|
-
'use client';
|
|
53332
|
-
import { Tag as TagIcon } from '@primeicons/react';
|
|
53333
|
-
import { CloudUpload } from '@primeicons/react/cloud-upload';
|
|
53334
|
-
import { Upload } from '@primeicons/react/upload';
|
|
53335
|
-
import { Button } from '@primereact/ui/button';
|
|
53336
|
-
import { FileUpload, FileUploadRootInstance } from '@primereact/ui/fileupload';
|
|
53337
|
-
import { InputGroup } from '@primereact/ui/inputgroup';
|
|
53338
|
-
import { InputText } from '@primereact/ui/inputtext';
|
|
53339
|
-
|
|
53340
|
-
export default function FileUploadDemo() {
|
|
53341
|
-
return (
|
|
53342
|
-
<div className="flex flex-col items-center justify-center gap-4 max-w-93 mx-auto">
|
|
53343
|
-
<div className="flex flex-wrap items-center justify-center gap-4 w-full">
|
|
53344
|
-
<InputGroup.Root className="w-fit!">
|
|
53345
|
-
<FileUpload.Root as={InputGroup.Addon} name="demo2[]" accept="image/*" maxFileSize={1000000}>
|
|
53346
|
-
{(instance: FileUploadRootInstance) => (
|
|
53347
|
-
<Button severity="secondary" variant="text" onClick={instance.choose} className="justify-start border-none">
|
|
53348
|
-
<Upload />
|
|
53349
|
-
{instance.hasFiles ? instance.state.files.map((file) => file.name).join(', ') : 'Choose file'}
|
|
53350
|
-
</Button>
|
|
53351
|
-
)}
|
|
53352
|
-
</FileUpload.Root>
|
|
53353
|
-
<InputGroup.Addon>
|
|
53354
|
-
<Button severity="secondary" variant="text" iconOnly>
|
|
53355
|
-
<CloudUpload />
|
|
53356
|
-
</Button>
|
|
53357
|
-
</InputGroup.Addon>
|
|
53358
|
-
</InputGroup.Root>
|
|
53359
|
-
<InputGroup.Root className="flex-1! max-w-fit!">
|
|
53360
|
-
<InputGroup.Addon>Upload</InputGroup.Addon>
|
|
53361
|
-
<FileUpload.Root as={InputGroup.Addon} name="demo1[]" accept="image/*" maxFileSize={1000000}>
|
|
53362
|
-
{(instance: FileUploadRootInstance) => (
|
|
53363
|
-
<Button severity="secondary" variant="text" onClick={instance.choose} className="justify-start border-none">
|
|
53364
|
-
<Upload />
|
|
53365
|
-
{instance.hasFiles ? instance.state.files.map((file) => file.name).join(', ') : 'Choose file'}
|
|
53366
|
-
</Button>
|
|
53367
|
-
)}
|
|
53368
|
-
</FileUpload.Root>
|
|
53369
|
-
</InputGroup.Root>
|
|
53370
|
-
</div>
|
|
53371
|
-
|
|
53372
|
-
<InputGroup.Root>
|
|
53373
|
-
<InputGroup.Addon>
|
|
53374
|
-
<TagIcon />
|
|
53375
|
-
</InputGroup.Addon>
|
|
53376
|
-
<InputText placeholder="Label" />
|
|
53377
|
-
<FileUpload.Root as={InputGroup.Addon} name="demo3[]" accept="image/*" maxFileSize={1000000}>
|
|
53378
|
-
{(instance: FileUploadRootInstance) => (
|
|
53379
|
-
<Button severity="secondary" variant="text" onClick={instance.choose} className="border-none">
|
|
53380
|
-
<Upload />
|
|
53381
|
-
{instance.hasFiles ? instance.state.files.map((file) => file.name).join(', ') : 'Browse'}
|
|
53382
|
-
</Button>
|
|
53383
|
-
)}
|
|
53384
|
-
</FileUpload.Root>
|
|
53385
|
-
</InputGroup.Root>
|
|
53386
|
-
</div>
|
|
53387
|
-
);
|
|
53388
|
-
}
|
|
53389
|
-
```
|
|
53390
|
-
|
|
53391
53295
|
### Float Label
|
|
53392
53296
|
|
|
53393
53297
|
FloatLabel visually integrates a label with its form element. Visit [FloatLabel](/docs/components/floatlabel) documentation for more information.
|
|
@@ -67374,7 +67278,6 @@ import { Search } from '@primeicons/react/search';
|
|
|
67374
67278
|
import { IconField } from '@primereact/ui/iconfield';
|
|
67375
67279
|
import { InputText } from '@primereact/ui/inputtext';
|
|
67376
67280
|
import { Select, type SelectValueChangeEvent } from '@primereact/ui/select';
|
|
67377
|
-
import Image from 'next/image';
|
|
67378
67281
|
import * as React from 'react';
|
|
67379
67282
|
|
|
67380
67283
|
type Language = {
|
|
@@ -67416,7 +67319,7 @@ export default function Preview() {
|
|
|
67416
67319
|
<Select.Value placeholder="Select a language">
|
|
67417
67320
|
{language && (
|
|
67418
67321
|
<span className="flex items-center gap-2">
|
|
67419
|
-
<
|
|
67322
|
+
<img
|
|
67420
67323
|
alt={language.label}
|
|
67421
67324
|
src="https://primefaces.org/cdn/primevue/images/flag/flag_placeholder.png"
|
|
67422
67325
|
className={`flag flag-${language.code}`}
|
|
@@ -67453,7 +67356,7 @@ export default function Preview() {
|
|
|
67453
67356
|
{filteredLanguages.map((l, index) => (
|
|
67454
67357
|
<Select.Option key={l.value} index={index} uKey={l.value} className="justify-between">
|
|
67455
67358
|
<div className="flex items-center gap-2">
|
|
67456
|
-
<
|
|
67359
|
+
<img
|
|
67457
67360
|
alt={l.label}
|
|
67458
67361
|
src="https://primefaces.org/cdn/primevue/images/flag/flag_placeholder.png"
|
|
67459
67362
|
className={`flag flag-${l.code}`}
|
|
@@ -68029,7 +67932,6 @@ import { SelectValueChangeEvent } from '@primereact/ui/select';
|
|
|
68029
67932
|
import { IconField } from '@primereact/ui/iconfield';
|
|
68030
67933
|
import { InputText } from '@primereact/ui/inputtext';
|
|
68031
67934
|
import { Select } from '@primereact/ui/select';
|
|
68032
|
-
import Image from 'next/image';
|
|
68033
67935
|
import * as React from 'react';
|
|
68034
67936
|
|
|
68035
67937
|
type Country = {
|
|
@@ -68094,7 +67996,7 @@ export default function FilterDemo() {
|
|
|
68094
67996
|
{filteredCountries.map((country, index) => (
|
|
68095
67997
|
<Select.Option key={country.code} index={index} uKey={country.code}>
|
|
68096
67998
|
<div className="flex items-center gap-2">
|
|
68097
|
-
<
|
|
67999
|
+
<img
|
|
68098
68000
|
alt={country.name}
|
|
68099
68001
|
src="https://primefaces.org/cdn/primevue/images/flag/flag_placeholder.png"
|
|
68100
68002
|
className={`flag flag-${country.code.toLowerCase()} mr-2`}
|
|
@@ -71665,7 +71567,6 @@ Image filter implementation using multiple sliders.
|
|
|
71665
71567
|
import { Slider } from '@primereact/ui/slider';
|
|
71666
71568
|
import { ToggleButton } from '@primereact/ui/togglebutton';
|
|
71667
71569
|
import { ToggleButtonGroup, type ToggleButtonGroupValueChangeEvent } from '@primereact/ui/togglebuttongroup';
|
|
71668
|
-
import Image from 'next/image';
|
|
71669
71570
|
import { SliderRootChangeEvent } from '@primereact/ui/slider';
|
|
71670
71571
|
import * as React from 'react';
|
|
71671
71572
|
|
|
@@ -71681,7 +71582,7 @@ export default function FilterDemo() {
|
|
|
71681
71582
|
|
|
71682
71583
|
return (
|
|
71683
71584
|
<div className="flex flex-col items-center justify-center">
|
|
71684
|
-
<
|
|
71585
|
+
<img
|
|
71685
71586
|
alt="user header"
|
|
71686
71587
|
className="w-80 rounded mb-6"
|
|
71687
71588
|
src="https://primefaces.org/cdn/primevue/images/galleria/galleria1.jpg"
|
|
@@ -73401,7 +73302,6 @@ import { Divider } from '@primereact/ui/divider';
|
|
|
73401
73302
|
import { InputText } from '@primereact/ui/inputtext';
|
|
73402
73303
|
import { Stepper } from '@primereact/ui/stepper';
|
|
73403
73304
|
import { ToggleButton } from '@primereact/ui/togglebutton';
|
|
73404
|
-
import Image from 'next/image';
|
|
73405
73305
|
|
|
73406
73306
|
export default function TemplateDemo() {
|
|
73407
73307
|
return (
|
|
@@ -73576,7 +73476,7 @@ export default function TemplateDemo() {
|
|
|
73576
73476
|
<div className="flex flex-col gap-2 mx-auto" style={{ minHeight: '16rem', maxWidth: '24rem' }}>
|
|
73577
73477
|
<div className="text-center mt-4 mb-4 text-xl font-semibold">Account created successfully</div>
|
|
73578
73478
|
<div className="flex justify-center">
|
|
73579
|
-
<
|
|
73479
|
+
<img
|
|
73580
73480
|
alt="logo"
|
|
73581
73481
|
width={240}
|
|
73582
73482
|
height={160}
|
|
@@ -77870,34 +77770,34 @@ import { Search } from '@primeicons/react/search';
|
|
|
77870
77770
|
export default function CustomDemo() {
|
|
77871
77771
|
return (
|
|
77872
77772
|
<Toolbar.Root
|
|
77873
|
-
className="
|
|
77773
|
+
className="@container"
|
|
77874
77774
|
style={{ borderRadius: '3rem', padding: '0.75rem 1rem 0.75rem 1.5rem', background: 'var(--p-surface-900)', border: 'none' }}
|
|
77875
77775
|
>
|
|
77876
|
-
<Toolbar.Start
|
|
77776
|
+
<Toolbar.Start>
|
|
77877
77777
|
<div className="flex items-center gap-1">
|
|
77878
77778
|
<i className="pi pi-prime text-xl" style={{ color: 'var(--p-primary-400)' }} />
|
|
77879
77779
|
<span className="font-bold text-lg ml-2" style={{ color: 'var(--p-surface-0)' }}>
|
|
77880
77780
|
Brand
|
|
77881
77781
|
</span>
|
|
77882
77782
|
</div>
|
|
77883
|
-
<div className="ml-6
|
|
77884
|
-
<Button variant="text" size="small" className="text-surface-0 hover:bg-surface-700">
|
|
77783
|
+
<div className="ml-6 hidden @min-[620px]:flex gap-1">
|
|
77784
|
+
<Button variant="text" size="small" className="text-surface-0! hover:bg-surface-700!">
|
|
77885
77785
|
Products
|
|
77886
77786
|
</Button>
|
|
77887
|
-
<Button variant="text" size="small" className="text-surface-0 hover:bg-surface-700">
|
|
77787
|
+
<Button variant="text" size="small" className="text-surface-0! hover:bg-surface-700!">
|
|
77888
77788
|
Solutions
|
|
77889
77789
|
</Button>
|
|
77890
|
-
<Button variant="text" size="small" className="text-surface-0 hover:bg-surface-700">
|
|
77790
|
+
<Button variant="text" size="small" className="text-surface-0! hover:bg-surface-700!">
|
|
77891
77791
|
Resources
|
|
77892
77792
|
</Button>
|
|
77893
|
-
<Button variant="text" size="small" className="text-surface-0 hover:bg-surface-700">
|
|
77793
|
+
<Button variant="text" size="small" className="text-surface-0! hover:bg-surface-700!">
|
|
77894
77794
|
Pricing
|
|
77895
77795
|
</Button>
|
|
77896
77796
|
</div>
|
|
77897
77797
|
</Toolbar.Start>
|
|
77898
|
-
<Toolbar.End
|
|
77899
|
-
<div className="flex items-center gap-2
|
|
77900
|
-
<Button variant="text" size="small" className="text-surface-0 hover:bg-surface-700">
|
|
77798
|
+
<Toolbar.End>
|
|
77799
|
+
<div className="flex items-center gap-2">
|
|
77800
|
+
<Button variant="text" size="small" iconOnly aria-label="Search" className="text-surface-0! hover:bg-surface-700!">
|
|
77901
77801
|
<Search />
|
|
77902
77802
|
</Button>
|
|
77903
77803
|
<Button severity="contrast" size="small">
|
|
@@ -78083,6 +77983,52 @@ export default function BasicDemo() {
|
|
|
78083
77983
|
}
|
|
78084
77984
|
```
|
|
78085
77985
|
|
|
77986
|
+
### Standalone
|
|
77987
|
+
|
|
77988
|
+
`Tooltip.Manager` only coordinates a group of tooltips, so moving between adjacent ones skips the open delay. A single tooltip doesn't need it, wrap just the `Tooltip.Root` and its `openDelay` is honored on its own.
|
|
77989
|
+
|
|
77990
|
+
```tsx
|
|
77991
|
+
import { Button } from '@primereact/ui/button';
|
|
77992
|
+
import { Tooltip } from '@primereact/ui/tooltip';
|
|
77993
|
+
|
|
77994
|
+
export default function StandaloneDemo() {
|
|
77995
|
+
return (
|
|
77996
|
+
<div className="flex items-center justify-center gap-4">
|
|
77997
|
+
{/* No Tooltip.Manager wrapper — each Tooltip.Root works on its own */}
|
|
77998
|
+
<Tooltip.Root>
|
|
77999
|
+
<Tooltip.Trigger as={Button} variant="outlined" severity="secondary">
|
|
78000
|
+
Default delays
|
|
78001
|
+
</Tooltip.Trigger>
|
|
78002
|
+
<Tooltip.Portal>
|
|
78003
|
+
<Tooltip.Positioner sideOffset={8}>
|
|
78004
|
+
<Tooltip.Popup>
|
|
78005
|
+
<Tooltip.Arrow />
|
|
78006
|
+
<div className="font-semibold text-sm">No manager needed</div>
|
|
78007
|
+
<div className="opacity-75 text-sm mt-1">Used standalone, without a Tooltip.Manager.</div>
|
|
78008
|
+
</Tooltip.Popup>
|
|
78009
|
+
</Tooltip.Positioner>
|
|
78010
|
+
</Tooltip.Portal>
|
|
78011
|
+
</Tooltip.Root>
|
|
78012
|
+
|
|
78013
|
+
<Tooltip.Root openDelay={1200} closeDelay={800}>
|
|
78014
|
+
<Tooltip.Trigger as={Button} variant="outlined" severity="secondary">
|
|
78015
|
+
1200ms open · 800ms close
|
|
78016
|
+
</Tooltip.Trigger>
|
|
78017
|
+
<Tooltip.Portal>
|
|
78018
|
+
<Tooltip.Positioner sideOffset={8}>
|
|
78019
|
+
<Tooltip.Popup>
|
|
78020
|
+
<Tooltip.Arrow />
|
|
78021
|
+
<div className="font-semibold text-sm">Independent timing</div>
|
|
78022
|
+
<div className="opacity-75 text-sm mt-1">Waits 1200ms to open, lingers 800ms after you leave.</div>
|
|
78023
|
+
</Tooltip.Popup>
|
|
78024
|
+
</Tooltip.Positioner>
|
|
78025
|
+
</Tooltip.Portal>
|
|
78026
|
+
</Tooltip.Root>
|
|
78027
|
+
</div>
|
|
78028
|
+
);
|
|
78029
|
+
}
|
|
78030
|
+
```
|
|
78031
|
+
|
|
78086
78032
|
### Arrow
|
|
78087
78033
|
|
|
78088
78034
|
Use `Tooltip.Arrow` to display an arrow on the tooltip.
|
|
@@ -92509,7 +92455,6 @@ import {
|
|
|
92509
92455
|
import { Tag } from '@/components/ui/tag';
|
|
92510
92456
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
92511
92457
|
import { Database } from '@primeicons/react/database';
|
|
92512
|
-
import Image from 'next/image';
|
|
92513
92458
|
import * as React from 'react';
|
|
92514
92459
|
|
|
92515
92460
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -92557,7 +92502,7 @@ export default function Preview() {
|
|
|
92557
92502
|
<DataTableRow key={item.id}>
|
|
92558
92503
|
<DataTableCell>
|
|
92559
92504
|
<div className="flex items-center gap-3">
|
|
92560
|
-
<
|
|
92505
|
+
<img
|
|
92561
92506
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
92562
92507
|
alt={item.name}
|
|
92563
92508
|
width={48}
|
|
@@ -92694,7 +92639,6 @@ import {
|
|
|
92694
92639
|
} from '@/components/ui/datatable';
|
|
92695
92640
|
import { Tag } from '@/components/ui/tag';
|
|
92696
92641
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
92697
|
-
import Image from 'next/image';
|
|
92698
92642
|
import * as React from 'react';
|
|
92699
92643
|
|
|
92700
92644
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -92742,7 +92686,7 @@ export default function BasicDemo() {
|
|
|
92742
92686
|
<DataTableRow key={item.id}>
|
|
92743
92687
|
<DataTableCell>
|
|
92744
92688
|
<div className="flex items-center gap-3">
|
|
92745
|
-
<
|
|
92689
|
+
<img
|
|
92746
92690
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
92747
92691
|
alt={item.name}
|
|
92748
92692
|
width={40}
|
|
@@ -92885,7 +92829,6 @@ One row at a time. Clicking a different row replaces the previous selection.
|
|
|
92885
92829
|
|
|
92886
92830
|
```tsx
|
|
92887
92831
|
'use client';
|
|
92888
|
-
import Image from 'next/image';
|
|
92889
92832
|
import { Database } from '@primeicons/react/database';
|
|
92890
92833
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
92891
92834
|
import type { DataTableSelectionEvent } from 'primereact/datatable';
|
|
@@ -92960,7 +92903,7 @@ export default function SingleSelectionDemo() {
|
|
|
92960
92903
|
<DataTableRow key={item.id}>
|
|
92961
92904
|
<DataTableCell>
|
|
92962
92905
|
<div className="flex items-center gap-3">
|
|
92963
|
-
<
|
|
92906
|
+
<img
|
|
92964
92907
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
92965
92908
|
alt={item.name}
|
|
92966
92909
|
width={40}
|
|
@@ -93020,7 +92963,6 @@ Multiple rows without a dedicated column. Pair with `metaKeySelection` so Ctrl/C
|
|
|
93020
92963
|
|
|
93021
92964
|
```tsx
|
|
93022
92965
|
'use client';
|
|
93023
|
-
import Image from 'next/image';
|
|
93024
92966
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
93025
92967
|
import { ShoppingCart } from '@primeicons/react/shopping-cart';
|
|
93026
92968
|
import { Database } from '@primeicons/react/database';
|
|
@@ -93131,7 +93073,7 @@ export default function MultipleSelectionDemo() {
|
|
|
93131
93073
|
<DataTableRow key={item.id}>
|
|
93132
93074
|
<DataTableCell>
|
|
93133
93075
|
<div className="flex items-center gap-3">
|
|
93134
|
-
<
|
|
93076
|
+
<img
|
|
93135
93077
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
93136
93078
|
alt={item.name}
|
|
93137
93079
|
width={40}
|
|
@@ -93315,7 +93257,6 @@ Arrow Up/Down moves focus between rows, Space or Enter toggles the focused row,
|
|
|
93315
93257
|
|
|
93316
93258
|
```tsx
|
|
93317
93259
|
'use client';
|
|
93318
|
-
import Image from 'next/image';
|
|
93319
93260
|
import { Database } from '@primeicons/react/database';
|
|
93320
93261
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
93321
93262
|
import type { DataTableSelectionEvent } from 'primereact/datatable';
|
|
@@ -93407,7 +93348,7 @@ export default function KeyboardDemo() {
|
|
|
93407
93348
|
<DataTableRow key={item.id}>
|
|
93408
93349
|
<DataTableCell>
|
|
93409
93350
|
<div className="flex items-center gap-3">
|
|
93410
|
-
<
|
|
93351
|
+
<img
|
|
93411
93352
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
93412
93353
|
alt={item.name}
|
|
93413
93354
|
width={36}
|
|
@@ -93493,7 +93434,6 @@ import { SortAlt } from '@primeicons/react/sort-alt';
|
|
|
93493
93434
|
import { SortAmountDown } from '@primeicons/react/sort-amount-down';
|
|
93494
93435
|
import { SortAmountUpAlt } from '@primeicons/react/sort-amount-up-alt';
|
|
93495
93436
|
import type { DataTableSortOrderInstance } from 'primereact/datatable';
|
|
93496
|
-
import Image from 'next/image';
|
|
93497
93437
|
import * as React from 'react';
|
|
93498
93438
|
|
|
93499
93439
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -93580,7 +93520,7 @@ export default function SortDemo() {
|
|
|
93580
93520
|
<DataTableRow key={item.id}>
|
|
93581
93521
|
<DataTableCell>
|
|
93582
93522
|
<div className="flex items-center gap-3">
|
|
93583
|
-
<
|
|
93523
|
+
<img
|
|
93584
93524
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
93585
93525
|
alt={item.name}
|
|
93586
93526
|
width={40}
|
|
@@ -93640,7 +93580,6 @@ Hold Ctrl/Cmd and click multiple column headers to sort by several fields at onc
|
|
|
93640
93580
|
|
|
93641
93581
|
```tsx
|
|
93642
93582
|
'use client';
|
|
93643
|
-
import Image from 'next/image';
|
|
93644
93583
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
93645
93584
|
import type { DataTableSortOrderInstance } from 'primereact/datatable';
|
|
93646
93585
|
import { SortAlt } from '@primeicons/react/sort-alt';
|
|
@@ -93752,7 +93691,7 @@ export default function MultiSortDemo() {
|
|
|
93752
93691
|
<DataTableRow key={item.id}>
|
|
93753
93692
|
<DataTableCell>
|
|
93754
93693
|
<div className="flex items-center gap-3">
|
|
93755
|
-
<
|
|
93694
|
+
<img
|
|
93756
93695
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
93757
93696
|
alt={item.name}
|
|
93758
93697
|
width={40}
|
|
@@ -93812,7 +93751,6 @@ Apply an initial sort on mount via `defaultSortField` + `defaultSortOrder`.
|
|
|
93812
93751
|
|
|
93813
93752
|
```tsx
|
|
93814
93753
|
'use client';
|
|
93815
|
-
import Image from 'next/image';
|
|
93816
93754
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
93817
93755
|
import type { DataTableSortOrderInstance } from 'primereact/datatable';
|
|
93818
93756
|
import { SortAlt } from '@primeicons/react/sort-alt';
|
|
@@ -93924,7 +93862,7 @@ export default function PresortDemo() {
|
|
|
93924
93862
|
<DataTableRow key={item.id}>
|
|
93925
93863
|
<DataTableCell>
|
|
93926
93864
|
<div className="flex items-center gap-3">
|
|
93927
|
-
<
|
|
93865
|
+
<img
|
|
93928
93866
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
93929
93867
|
alt={item.name}
|
|
93930
93868
|
width={40}
|
|
@@ -94007,7 +93945,6 @@ import {
|
|
|
94007
93945
|
} from '@/components/ui/datatable';
|
|
94008
93946
|
import { OverlayBadge } from '@/components/ui/overlaybadge';
|
|
94009
93947
|
import { Tag } from '@/components/ui/tag';
|
|
94010
|
-
import Image from 'next/image';
|
|
94011
93948
|
import * as React from 'react';
|
|
94012
93949
|
|
|
94013
93950
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -94101,7 +94038,7 @@ export default function PresortMultiDemo() {
|
|
|
94101
94038
|
<DataTableRow key={item.id}>
|
|
94102
94039
|
<DataTableCell>
|
|
94103
94040
|
<div className="flex items-center gap-3">
|
|
94104
|
-
<
|
|
94041
|
+
<img
|
|
94105
94042
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
94106
94043
|
alt={item.name}
|
|
94107
94044
|
width={40}
|
|
@@ -94934,7 +94871,6 @@ import {
|
|
|
94934
94871
|
DataTableTableContainer
|
|
94935
94872
|
} from '@/components/ui/datatable';
|
|
94936
94873
|
import { Tag } from '@/components/ui/tag';
|
|
94937
|
-
import Image from 'next/image';
|
|
94938
94874
|
import * as React from 'react';
|
|
94939
94875
|
|
|
94940
94876
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -94987,7 +94923,7 @@ export default function ResizeDemo() {
|
|
|
94987
94923
|
<DataTableRow key={item.id}>
|
|
94988
94924
|
<DataTableCell>
|
|
94989
94925
|
<div className="flex items-center gap-3">
|
|
94990
|
-
<
|
|
94926
|
+
<img
|
|
94991
94927
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
94992
94928
|
alt={item.name}
|
|
94993
94929
|
width={36}
|
|
@@ -95041,7 +94977,6 @@ Dragging grows or shrinks the whole table; adjacent columns keep their widths.
|
|
|
95041
94977
|
|
|
95042
94978
|
```tsx
|
|
95043
94979
|
'use client';
|
|
95044
|
-
import Image from 'next/image';
|
|
95045
94980
|
import { Database } from '@primeicons/react/database';
|
|
95046
94981
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
95047
94982
|
import {
|
|
@@ -95115,7 +95050,7 @@ export default function ResizeExpandDemo() {
|
|
|
95115
95050
|
<DataTableRow key={item.id}>
|
|
95116
95051
|
<DataTableCell>
|
|
95117
95052
|
<div className="flex items-center gap-3">
|
|
95118
|
-
<
|
|
95053
|
+
<img
|
|
95119
95054
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
95120
95055
|
alt={item.name}
|
|
95121
95056
|
width={36}
|
|
@@ -95172,7 +95107,6 @@ Drag and drop column headers to reorder columns.
|
|
|
95172
95107
|
|
|
95173
95108
|
```tsx
|
|
95174
95109
|
'use client';
|
|
95175
|
-
import Image from 'next/image';
|
|
95176
95110
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
95177
95111
|
import type { DataTableColumnReorderEvent } from 'primereact/datatable';
|
|
95178
95112
|
import { ArrowDown } from '@primeicons/react/arrow-down';
|
|
@@ -95229,7 +95163,7 @@ function renderCell(field: string, item: Product) {
|
|
|
95229
95163
|
case 'name':
|
|
95230
95164
|
return (
|
|
95231
95165
|
<div className="flex items-center gap-3">
|
|
95232
|
-
<
|
|
95166
|
+
<img
|
|
95233
95167
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
95234
95168
|
alt={item.name}
|
|
95235
95169
|
width={36}
|
|
@@ -95338,7 +95272,6 @@ Drag and drop rows to reorder data.
|
|
|
95338
95272
|
|
|
95339
95273
|
```tsx
|
|
95340
95274
|
'use client';
|
|
95341
|
-
import Image from 'next/image';
|
|
95342
95275
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
95343
95276
|
import { Bars } from '@primeicons/react/bars';
|
|
95344
95277
|
import { Database } from '@primeicons/react/database';
|
|
@@ -95416,7 +95349,7 @@ export default function RowReorderDemo() {
|
|
|
95416
95349
|
</DataTableCell>
|
|
95417
95350
|
<DataTableCell>
|
|
95418
95351
|
<div className="flex items-center gap-3">
|
|
95419
|
-
<
|
|
95352
|
+
<img
|
|
95420
95353
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
95421
95354
|
alt={item.name}
|
|
95422
95355
|
width={36}
|
|
@@ -95950,7 +95883,6 @@ import {
|
|
|
95950
95883
|
} from '@/components/ui/datatable';
|
|
95951
95884
|
import { Tag } from '@/components/ui/tag';
|
|
95952
95885
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
95953
|
-
import Image from 'next/image';
|
|
95954
95886
|
import * as React from 'react';
|
|
95955
95887
|
|
|
95956
95888
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -95996,7 +95928,7 @@ export default function TemplateDemo() {
|
|
|
95996
95928
|
<DataTableRow key={item.id}>
|
|
95997
95929
|
<DataTableCell>
|
|
95998
95930
|
<div className="flex items-center gap-3">
|
|
95999
|
-
<
|
|
95931
|
+
<img
|
|
96000
95932
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
96001
95933
|
alt={item.name}
|
|
96002
95934
|
width={40}
|
|
@@ -96037,7 +95969,6 @@ Export table data to CSV with customizable fields and headers.
|
|
|
96037
95969
|
|
|
96038
95970
|
```tsx
|
|
96039
95971
|
'use client';
|
|
96040
|
-
import Image from 'next/image';
|
|
96041
95972
|
import { ProductService, type Product } from '@/shared/services/product.service';
|
|
96042
95973
|
import { FileExport } from '@primeicons/react/file-export';
|
|
96043
95974
|
import { Database } from '@primeicons/react/database';
|
|
@@ -96119,7 +96050,7 @@ export default function ExportDemo() {
|
|
|
96119
96050
|
<DataTableRow key={item.id}>
|
|
96120
96051
|
<DataTableCell>
|
|
96121
96052
|
<div className="flex items-center gap-3">
|
|
96122
|
-
<
|
|
96053
|
+
<img
|
|
96123
96054
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
96124
96055
|
alt={item.name}
|
|
96125
96056
|
width={36}
|
|
@@ -96199,7 +96130,6 @@ import {
|
|
|
96199
96130
|
DataTableTableContainer
|
|
96200
96131
|
} from '@/components/ui/datatable';
|
|
96201
96132
|
import { Tag } from '@/components/ui/tag';
|
|
96202
|
-
import Image from 'next/image';
|
|
96203
96133
|
import * as React from 'react';
|
|
96204
96134
|
|
|
96205
96135
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -96264,7 +96194,7 @@ export default function LoadingOverlayDemo() {
|
|
|
96264
96194
|
<DataTableRow key={item.id}>
|
|
96265
96195
|
<DataTableCell>
|
|
96266
96196
|
<div className="flex items-center gap-3">
|
|
96267
|
-
<
|
|
96197
|
+
<img
|
|
96268
96198
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
96269
96199
|
alt={item.name}
|
|
96270
96200
|
width={40}
|
|
@@ -96327,7 +96257,6 @@ import {
|
|
|
96327
96257
|
} from '@/components/ui/datatable';
|
|
96328
96258
|
import { Skeleton } from '@/components/ui/skeleton';
|
|
96329
96259
|
import { Tag } from '@/components/ui/tag';
|
|
96330
|
-
import Image from 'next/image';
|
|
96331
96260
|
import * as React from 'react';
|
|
96332
96261
|
|
|
96333
96262
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -96418,7 +96347,7 @@ export default function LoadingSkeletonDemo() {
|
|
|
96418
96347
|
<DataTableRow key={item.id}>
|
|
96419
96348
|
<DataTableCell>
|
|
96420
96349
|
<div className="flex items-center gap-3">
|
|
96421
|
-
<
|
|
96350
|
+
<img
|
|
96422
96351
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
96423
96352
|
alt={item.name}
|
|
96424
96353
|
width={40}
|
|
@@ -96561,7 +96490,6 @@ import { DataView, DataViewContent } from '@/components/ui/dataview';
|
|
|
96561
96490
|
import { Tag } from '@/components/ui/tag';
|
|
96562
96491
|
import { ProductService } from '@/shared/services/product.service';
|
|
96563
96492
|
import { Heart, ShoppingCart, StarFill } from '@primeicons/react';
|
|
96564
|
-
import Image from 'next/image';
|
|
96565
96493
|
import * as React from 'react';
|
|
96566
96494
|
|
|
96567
96495
|
interface Product {
|
|
@@ -96611,14 +96539,14 @@ export default function Preview() {
|
|
|
96611
96539
|
className={`flex flex-col sm:flex-row sm:items-center p-6 gap-4 ${index !== 0 ? 'border-t border-surface-200 dark:border-surface-700' : ''}`}
|
|
96612
96540
|
>
|
|
96613
96541
|
<div className="md:w-40 relative">
|
|
96614
|
-
<
|
|
96542
|
+
<img
|
|
96615
96543
|
className="mx-auto rounded w-full"
|
|
96616
96544
|
src={`https://primefaces.org/cdn/primevue/images/product/${product.image}`}
|
|
96617
96545
|
alt={product.name}
|
|
96618
96546
|
width={160}
|
|
96619
96547
|
height={160}
|
|
96620
96548
|
/>
|
|
96621
|
-
<Tag severity={getSeverity(product)} className="absolute top-1 left-1">
|
|
96549
|
+
<Tag severity={getSeverity(product)} className="absolute top-1 left-1 dark:bg-surface-900!">
|
|
96622
96550
|
{product.inventoryStatus}
|
|
96623
96551
|
</Tag>
|
|
96624
96552
|
</div>
|
|
@@ -96713,7 +96641,6 @@ import { DataView, DataViewContent } from '@/components/ui/dataview';
|
|
|
96713
96641
|
import { Tag } from '@/components/ui/tag';
|
|
96714
96642
|
import { ProductService } from '@/shared/services/product.service';
|
|
96715
96643
|
import { Heart, ShoppingCart, StarFill } from '@primeicons/react';
|
|
96716
|
-
import Image from 'next/image';
|
|
96717
96644
|
import * as React from 'react';
|
|
96718
96645
|
|
|
96719
96646
|
interface Product {
|
|
@@ -96763,14 +96690,14 @@ export default function BasicDemo() {
|
|
|
96763
96690
|
className={`flex flex-col sm:flex-row sm:items-center p-6 gap-4 ${index !== 0 ? 'border-t border-surface-200 dark:border-surface-700' : ''}`}
|
|
96764
96691
|
>
|
|
96765
96692
|
<div className="md:w-40 relative">
|
|
96766
|
-
<
|
|
96693
|
+
<img
|
|
96767
96694
|
className="mx-auto rounded w-full"
|
|
96768
96695
|
src={`https://primefaces.org/cdn/primevue/images/product/${product.image}`}
|
|
96769
96696
|
alt={product.name}
|
|
96770
96697
|
width={160}
|
|
96771
96698
|
height={160}
|
|
96772
96699
|
/>
|
|
96773
|
-
<Tag severity={getSeverity(product)} className="absolute top-1 left-1">
|
|
96700
|
+
<Tag severity={getSeverity(product)} className="absolute top-1 left-1 dark:bg-surface-900!">
|
|
96774
96701
|
{product.inventoryStatus}
|
|
96775
96702
|
</Tag>
|
|
96776
96703
|
</div>
|
|
@@ -96831,7 +96758,6 @@ import { Paginator, PaginatorFirst, PaginatorLast, PaginatorNext, PaginatorPages
|
|
|
96831
96758
|
import { Tag } from '@/components/ui/tag';
|
|
96832
96759
|
import { ProductService } from '@/shared/services/product.service';
|
|
96833
96760
|
import { Heart, ShoppingCart, StarFill } from '@primeicons/react';
|
|
96834
|
-
import Image from 'next/image';
|
|
96835
96761
|
import { PaginatorRootChangeEvent } from 'primereact/paginator';
|
|
96836
96762
|
import * as React from 'react';
|
|
96837
96763
|
|
|
@@ -96884,14 +96810,14 @@ export default function PaginationDemo() {
|
|
|
96884
96810
|
className={`flex flex-col sm:flex-row sm:items-center p-6 gap-4 ${index !== 0 ? 'border-t border-surface-200 dark:border-surface-700' : ''}`}
|
|
96885
96811
|
>
|
|
96886
96812
|
<div className="md:w-40 relative">
|
|
96887
|
-
<
|
|
96813
|
+
<img
|
|
96888
96814
|
className="mx-auto rounded w-full"
|
|
96889
96815
|
src={`https://primefaces.org/cdn/primevue/images/product/${product.image}`}
|
|
96890
96816
|
alt={product.name}
|
|
96891
96817
|
width={160}
|
|
96892
96818
|
height={160}
|
|
96893
96819
|
/>
|
|
96894
|
-
<Tag severity={getSeverity(product)} className="absolute top-1 left-1">
|
|
96820
|
+
<Tag severity={getSeverity(product)} className="absolute top-1 left-1 dark:bg-surface-900!">
|
|
96895
96821
|
{product.inventoryStatus}
|
|
96896
96822
|
</Tag>
|
|
96897
96823
|
</div>
|
|
@@ -96967,7 +96893,6 @@ import { ToggleButton } from '@/components/ui/togglebutton';
|
|
|
96967
96893
|
import { ToggleButtonGroup } from '@/components/ui/togglebuttongroup';
|
|
96968
96894
|
import { ProductService } from '@/shared/services/product.service';
|
|
96969
96895
|
import { Heart, ShoppingCart, StarFill } from '@primeicons/react';
|
|
96970
|
-
import Image from 'next/image';
|
|
96971
96896
|
import { ToggleButtonGroupValueChangeEvent } from 'primereact/togglebuttongroup';
|
|
96972
96897
|
import * as React from 'react';
|
|
96973
96898
|
|
|
@@ -97038,14 +96963,14 @@ export default function SortDemo() {
|
|
|
97038
96963
|
className={`flex flex-col sm:flex-row sm:items-center p-6 gap-4 ${index !== 0 ? 'border-t border-surface-200 dark:border-surface-700' : ''}`}
|
|
97039
96964
|
>
|
|
97040
96965
|
<div className="md:w-40 relative">
|
|
97041
|
-
<
|
|
96966
|
+
<img
|
|
97042
96967
|
className="mx-auto rounded w-full"
|
|
97043
96968
|
src={`https://primefaces.org/cdn/primevue/images/product/${product.image}`}
|
|
97044
96969
|
alt={product.name}
|
|
97045
96970
|
width={160}
|
|
97046
96971
|
height={160}
|
|
97047
96972
|
/>
|
|
97048
|
-
<Tag severity={getSeverity(product)} className="absolute top-1 left-1">
|
|
96973
|
+
<Tag severity={getSeverity(product)} className="absolute top-1 left-1 dark:bg-surface-900!">
|
|
97049
96974
|
{product.inventoryStatus}
|
|
97050
96975
|
</Tag>
|
|
97051
96976
|
</div>
|
|
@@ -97107,7 +97032,6 @@ import { ToggleButton } from '@/components/ui/togglebutton';
|
|
|
97107
97032
|
import { ToggleButtonGroup } from '@/components/ui/togglebuttongroup';
|
|
97108
97033
|
import { ProductService } from '@/shared/services/product.service';
|
|
97109
97034
|
import { Bars, Heart, ShoppingCart, StarFill, Table } from '@primeicons/react';
|
|
97110
|
-
import Image from 'next/image';
|
|
97111
97035
|
import { ToggleButtonGroupValueChangeEvent } from 'primereact/togglebuttongroup';
|
|
97112
97036
|
import * as React from 'react';
|
|
97113
97037
|
|
|
@@ -97157,14 +97081,14 @@ export default function LayoutDemo() {
|
|
|
97157
97081
|
className={`flex flex-col sm:flex-row sm:items-center p-6 gap-4 ${index !== 0 ? 'border-t border-surface-200 dark:border-surface-700' : ''}`}
|
|
97158
97082
|
>
|
|
97159
97083
|
<div className="md:w-40 relative">
|
|
97160
|
-
<
|
|
97084
|
+
<img
|
|
97161
97085
|
className="mx-auto rounded w-full"
|
|
97162
97086
|
src={`https://primefaces.org/cdn/primevue/images/product/${product.image}`}
|
|
97163
97087
|
alt={product.name}
|
|
97164
97088
|
width={160}
|
|
97165
97089
|
height={160}
|
|
97166
97090
|
/>
|
|
97167
|
-
<Tag severity={getSeverity(product)} className="absolute top-1 left-1">
|
|
97091
|
+
<Tag severity={getSeverity(product)} className="absolute top-1 left-1 dark:bg-surface-900!">
|
|
97168
97092
|
{product.inventoryStatus}
|
|
97169
97093
|
</Tag>
|
|
97170
97094
|
</div>
|
|
@@ -97218,14 +97142,14 @@ export default function LayoutDemo() {
|
|
|
97218
97142
|
<div className="p-6 border border-surface-200 dark:border-surface-700 bg-surface-0 dark:bg-surface-900 rounded flex flex-col">
|
|
97219
97143
|
<div className="bg-surface-50 flex justify-center rounded p-4">
|
|
97220
97144
|
<div className="relative mx-auto">
|
|
97221
|
-
<
|
|
97145
|
+
<img
|
|
97222
97146
|
src={`https://primefaces.org/cdn/primevue/images/product/${product.image}`}
|
|
97223
97147
|
alt={product.name}
|
|
97224
97148
|
width={300}
|
|
97225
97149
|
height={200}
|
|
97226
97150
|
className="rounded"
|
|
97227
97151
|
/>
|
|
97228
|
-
<Tag severity={getSeverity(product)} className="absolute top-1 left-1">
|
|
97152
|
+
<Tag severity={getSeverity(product)} className="absolute top-1 left-1 dark:bg-surface-900!">
|
|
97229
97153
|
{product.inventoryStatus}
|
|
97230
97154
|
</Tag>
|
|
97231
97155
|
</div>
|
|
@@ -98297,7 +98221,7 @@ export default function Preview() {
|
|
|
98297
98221
|
<Label htmlFor="tw-name" className="text-sm font-semibold">
|
|
98298
98222
|
Name
|
|
98299
98223
|
</Label>
|
|
98300
|
-
<InputText id="tw-name" defaultValue="Amanda Miller" />
|
|
98224
|
+
<InputText data-autofocus id="tw-name" defaultValue="Amanda Miller" />
|
|
98301
98225
|
</div>
|
|
98302
98226
|
<div className="flex flex-col gap-1">
|
|
98303
98227
|
<Label htmlFor="tw-username" className="text-sm font-semibold">
|
|
@@ -98422,7 +98346,7 @@ export default function BasicDemo() {
|
|
|
98422
98346
|
<div className="flex flex-col gap-4">
|
|
98423
98347
|
<div className="flex flex-col gap-1.5">
|
|
98424
98348
|
<Label htmlFor="name">Name</Label>
|
|
98425
|
-
<InputText id="name" defaultValue="Amanda Miller" />
|
|
98349
|
+
<InputText id="name" defaultValue="Amanda Miller" data-autofocus />
|
|
98426
98350
|
</div>
|
|
98427
98351
|
<div className="flex flex-col gap-1.5">
|
|
98428
98352
|
<Label htmlFor="email">Email</Label>
|
|
@@ -98467,6 +98391,7 @@ import {
|
|
|
98467
98391
|
DialogTitle,
|
|
98468
98392
|
DialogTrigger
|
|
98469
98393
|
} from '@/components/ui/dialog';
|
|
98394
|
+
import { Textarea } from '@/components/ui/textarea';
|
|
98470
98395
|
|
|
98471
98396
|
export default function DraggableDemo() {
|
|
98472
98397
|
return (
|
|
@@ -98490,8 +98415,10 @@ export default function DraggableDemo() {
|
|
|
98490
98415
|
<p className="text-sm text-surface-500 dark:text-surface-400 mt-0 mb-0">
|
|
98491
98416
|
Drag this dialog by its header to reposition it anywhere on the screen.
|
|
98492
98417
|
</p>
|
|
98493
|
-
<
|
|
98494
|
-
|
|
98418
|
+
<Textarea
|
|
98419
|
+
data-autofocus
|
|
98420
|
+
rows={4}
|
|
98421
|
+
className="w-full resize-none"
|
|
98495
98422
|
placeholder="Type your note here..."
|
|
98496
98423
|
defaultValue="Remember to review the design specs for the new dashboard layout before the meeting tomorrow."
|
|
98497
98424
|
/>
|
|
@@ -98533,7 +98460,7 @@ import {
|
|
|
98533
98460
|
} from '@/components/ui/dialog';
|
|
98534
98461
|
import { InputText } from '@/components/ui/inputtext';
|
|
98535
98462
|
import { Label } from '@/components/ui/label';
|
|
98536
|
-
import {
|
|
98463
|
+
import { Times } from '@primeicons/react';
|
|
98537
98464
|
import { DialogRootChangeEvent, DialogRootProps } from 'primereact/dialog';
|
|
98538
98465
|
import * as React from 'react';
|
|
98539
98466
|
|
|
@@ -98551,39 +98478,31 @@ export default function PositionDemo() {
|
|
|
98551
98478
|
<div className="flex flex-wrap justify-center gap-2 mb-2">
|
|
98552
98479
|
<Button onClick={() => openPosition('left')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
98553
98480
|
Left
|
|
98554
|
-
<ArrowLeft />
|
|
98555
98481
|
</Button>
|
|
98556
98482
|
<Button onClick={() => openPosition('right')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
98557
98483
|
Right
|
|
98558
|
-
<ArrowRight />
|
|
98559
98484
|
</Button>
|
|
98560
98485
|
</div>
|
|
98561
98486
|
<div className="flex flex-wrap justify-center gap-2 mb-2">
|
|
98562
98487
|
<Button onClick={() => openPosition('topleft')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
98563
98488
|
TopLeft
|
|
98564
|
-
<ArrowUpLeft />
|
|
98565
98489
|
</Button>
|
|
98566
98490
|
<Button onClick={() => openPosition('top')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
98567
98491
|
Top
|
|
98568
|
-
<ArrowUp />
|
|
98569
98492
|
</Button>
|
|
98570
98493
|
<Button onClick={() => openPosition('topright')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
98571
98494
|
TopRight
|
|
98572
|
-
<ArrowUpRight />
|
|
98573
98495
|
</Button>
|
|
98574
98496
|
</div>
|
|
98575
98497
|
<div className="flex flex-wrap justify-center gap-2">
|
|
98576
98498
|
<Button onClick={() => openPosition('bottomleft')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
98577
98499
|
BottomLeft
|
|
98578
|
-
<ArrowDownLeft />
|
|
98579
98500
|
</Button>
|
|
98580
98501
|
<Button onClick={() => openPosition('bottom')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
98581
98502
|
Bottom
|
|
98582
|
-
<ArrowDown />
|
|
98583
98503
|
</Button>
|
|
98584
98504
|
<Button onClick={() => openPosition('bottomright')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
98585
98505
|
BottomRight
|
|
98586
|
-
<ArrowDownRight />
|
|
98587
98506
|
</Button>
|
|
98588
98507
|
</div>
|
|
98589
98508
|
<Dialog open={open} onOpenChange={(e: DialogRootChangeEvent) => setOpen(e.value as boolean)} position={position}>
|
|
@@ -98606,7 +98525,7 @@ export default function PositionDemo() {
|
|
|
98606
98525
|
<Label htmlFor="username" className="font-semibold">
|
|
98607
98526
|
Username
|
|
98608
98527
|
</Label>
|
|
98609
|
-
<InputText id="username" />
|
|
98528
|
+
<InputText data-autofocus id="username" />
|
|
98610
98529
|
</div>
|
|
98611
98530
|
<div className="flex flex-col gap-1">
|
|
98612
98531
|
<Label htmlFor="email" className="font-semibold">
|
|
@@ -98831,7 +98750,7 @@ export default function ModalDemo() {
|
|
|
98831
98750
|
<Label htmlFor="username" className="font-semibold">
|
|
98832
98751
|
Username
|
|
98833
98752
|
</Label>
|
|
98834
|
-
<InputText id="username" />
|
|
98753
|
+
<InputText data-autofocus id="username" />
|
|
98835
98754
|
</div>
|
|
98836
98755
|
<div className="flex flex-col gap-1">
|
|
98837
98756
|
<Label htmlFor="email" className="font-semibold">
|
|
@@ -98902,7 +98821,7 @@ export default function WithoutModalDemo() {
|
|
|
98902
98821
|
<Label htmlFor="username" className="font-semibold">
|
|
98903
98822
|
Username
|
|
98904
98823
|
</Label>
|
|
98905
|
-
<InputText id="username" />
|
|
98824
|
+
<InputText data-autofocus id="username" />
|
|
98906
98825
|
</div>
|
|
98907
98826
|
<div className="flex flex-col gap-1">
|
|
98908
98827
|
<Label htmlFor="email" className="font-semibold">
|
|
@@ -99388,7 +99307,7 @@ export default function ResponsiveDemo() {
|
|
|
99388
99307
|
<Label htmlFor="eventName" className="text-sm font-semibold">
|
|
99389
99308
|
Event Name
|
|
99390
99309
|
</Label>
|
|
99391
|
-
<InputText id="eventName" placeholder="e.g. Team Standup" />
|
|
99310
|
+
<InputText data-autofocus id="eventName" placeholder="e.g. Team Standup" />
|
|
99392
99311
|
</div>
|
|
99393
99312
|
<div className="flex flex-col md:flex-row gap-4">
|
|
99394
99313
|
<div className="flex flex-col gap-1 flex-1">
|
|
@@ -110849,7 +110768,6 @@ import {
|
|
|
110849
110768
|
SelectValue
|
|
110850
110769
|
} from '@/components/ui/select';
|
|
110851
110770
|
import { Search } from '@primeicons/react';
|
|
110852
|
-
import Image from 'next/image';
|
|
110853
110771
|
import type { SelectValueChangeEvent } from 'primereact/select';
|
|
110854
110772
|
import * as React from 'react';
|
|
110855
110773
|
|
|
@@ -110912,7 +110830,7 @@ export default function FilterDemo() {
|
|
|
110912
110830
|
{filteredCountries.map((country, index) => (
|
|
110913
110831
|
<SelectOption key={country.code} index={index} uKey={country.code}>
|
|
110914
110832
|
<div className="flex items-center gap-2">
|
|
110915
|
-
<
|
|
110833
|
+
<img
|
|
110916
110834
|
alt={country.name}
|
|
110917
110835
|
src="https://primefaces.org/cdn/primevue/images/flag/flag_placeholder.png"
|
|
110918
110836
|
className={`flag flag-${country.code.toLowerCase()} mr-2`}
|
|
@@ -113574,7 +113492,6 @@ import type { ToggleButtonGroupValueChangeEvent } from 'primereact/togglebuttong
|
|
|
113574
113492
|
import { Slider } from '@/components/ui/slider';
|
|
113575
113493
|
import { ToggleButton } from '@/components/ui/togglebutton';
|
|
113576
113494
|
import { ToggleButtonGroup } from '@/components/ui/togglebuttongroup';
|
|
113577
|
-
import Image from 'next/image';
|
|
113578
113495
|
import * as React from 'react';
|
|
113579
113496
|
|
|
113580
113497
|
export default function FilterDemo() {
|
|
@@ -113589,7 +113506,7 @@ export default function FilterDemo() {
|
|
|
113589
113506
|
|
|
113590
113507
|
return (
|
|
113591
113508
|
<div className="flex flex-col items-center justify-center">
|
|
113592
|
-
<
|
|
113509
|
+
<img
|
|
113593
113510
|
alt="user header"
|
|
113594
113511
|
className="w-80 rounded mb-6"
|
|
113595
113512
|
src="https://primefaces.org/cdn/primevue/images/galleria/galleria1.jpg"
|
|
@@ -116850,7 +116767,10 @@ import { Search } from '@primeicons/react';
|
|
|
116850
116767
|
|
|
116851
116768
|
export default function CustomDemo() {
|
|
116852
116769
|
return (
|
|
116853
|
-
<Toolbar
|
|
116770
|
+
<Toolbar
|
|
116771
|
+
className="@container"
|
|
116772
|
+
style={{ borderRadius: '3rem', padding: '0.75rem 1rem 0.75rem 1.5rem', background: 'var(--p-surface-900)', border: 'none' }}
|
|
116773
|
+
>
|
|
116854
116774
|
<ToolbarStart>
|
|
116855
116775
|
<div className="flex items-center gap-1">
|
|
116856
116776
|
<i className="pi pi-prime text-xl" style={{ color: 'var(--p-primary-400)' }} />
|
|
@@ -116858,24 +116778,24 @@ export default function CustomDemo() {
|
|
|
116858
116778
|
Brand
|
|
116859
116779
|
</span>
|
|
116860
116780
|
</div>
|
|
116861
|
-
<div className="ml-6 flex gap-1">
|
|
116862
|
-
<Button variant="text" size="small" className="text-surface-0 hover:bg-surface-700">
|
|
116781
|
+
<div className="ml-6 hidden @min-[620px]:flex gap-1">
|
|
116782
|
+
<Button variant="text" size="small" className="text-surface-0! hover:bg-surface-700!">
|
|
116863
116783
|
Products
|
|
116864
116784
|
</Button>
|
|
116865
|
-
<Button variant="text" size="small" className="text-surface-0 hover:bg-surface-700">
|
|
116785
|
+
<Button variant="text" size="small" className="text-surface-0! hover:bg-surface-700!">
|
|
116866
116786
|
Solutions
|
|
116867
116787
|
</Button>
|
|
116868
|
-
<Button variant="text" size="small" className="text-surface-0 hover:bg-surface-700">
|
|
116788
|
+
<Button variant="text" size="small" className="text-surface-0! hover:bg-surface-700!">
|
|
116869
116789
|
Resources
|
|
116870
116790
|
</Button>
|
|
116871
|
-
<Button variant="text" size="small" className="text-surface-0 hover:bg-surface-700">
|
|
116791
|
+
<Button variant="text" size="small" className="text-surface-0! hover:bg-surface-700!">
|
|
116872
116792
|
Pricing
|
|
116873
116793
|
</Button>
|
|
116874
116794
|
</div>
|
|
116875
116795
|
</ToolbarStart>
|
|
116876
116796
|
<ToolbarEnd>
|
|
116877
116797
|
<div className="flex items-center gap-2">
|
|
116878
|
-
<Button variant="text" size="small" iconOnly aria-label="Search" className="text-surface-0 hover:bg-surface-700">
|
|
116798
|
+
<Button variant="text" size="small" iconOnly aria-label="Search" className="text-surface-0! hover:bg-surface-700!">
|
|
116879
116799
|
<Search />
|
|
116880
116800
|
</Button>
|
|
116881
116801
|
<Button severity="contrast" size="small">
|
|
@@ -117515,7 +117435,6 @@ import { useFilter } from '@primereact/hooks/use-filter';
|
|
|
117515
117435
|
import { IconField } from '@primereact/ui/iconfield';
|
|
117516
117436
|
import { InputText } from '@primereact/ui/inputtext';
|
|
117517
117437
|
import { Tag } from '@primereact/ui/tag';
|
|
117518
|
-
import Image from 'next/image';
|
|
117519
117438
|
import * as React from 'react';
|
|
117520
117439
|
|
|
117521
117440
|
const statusSeverity: Record<string, 'success' | 'warn' | 'danger'> = {
|
|
@@ -117558,12 +117477,10 @@ export default function BasicDemo() {
|
|
|
117558
117477
|
{filteredData.map((item) => (
|
|
117559
117478
|
<div key={item.id} className="p-3 border border-surface-200 dark:border-surface-700 rounded-md flex items-center gap-3">
|
|
117560
117479
|
<div className="relative shrink-0 w-12 h-12 rounded-md shadow overflow-hidden">
|
|
117561
|
-
<
|
|
117480
|
+
<img
|
|
117562
117481
|
src={`https://primefaces.org/cdn/primevue/images/product/${item.image}`}
|
|
117563
117482
|
alt={item.name}
|
|
117564
|
-
|
|
117565
|
-
sizes="48px"
|
|
117566
|
-
className="object-cover"
|
|
117483
|
+
className="w-full h-full object-cover"
|
|
117567
117484
|
/>
|
|
117568
117485
|
</div>
|
|
117569
117486
|
<div className="flex flex-col gap-1 flex-1 min-w-0">
|
|
@@ -119095,6 +119012,260 @@ Add a `.md` to a page’s URL to display a Markdown version of that page.
|
|
|
119095
119012
|
|
|
119096
119013
|
<Button as="a" href="/docs/overview/llms.md" target="_blank">Open /docs/overview/llms.md</Button>
|
|
119097
119014
|
|
|
119015
|
+
# MCP Server
|
|
119016
|
+
|
|
119017
|
+
Connect AI assistants to PrimeReact component documentation, guides, examples, setup, and API metadata.
|
|
119018
|
+
|
|
119019
|
+
## Introduction
|
|
119020
|
+
|
|
119021
|
+
[Model Context Protocol (MCP)](https://modelcontextprotocol.io/) lets AI assistants call external tools. The `@primereact/mcp` package uses those tools to search and read the PrimeReact documentation included with the package.
|
|
119022
|
+
|
|
119023
|
+
- Find components, guides, examples, setup instructions, and hooks.
|
|
119024
|
+
- Read mode-scoped component APIs and documentation sections.
|
|
119025
|
+
- Check component usage against documented properties and callbacks.
|
|
119026
|
+
- Return links to the related PrimeReact documentation when available.
|
|
119027
|
+
|
|
119028
|
+
The server requires Node.js 22 or newer. It is read-only and does not change your project files or PrimeReact configuration.
|
|
119029
|
+
|
|
119030
|
+
## CLI Setup
|
|
119031
|
+
|
|
119032
|
+
The recommended setup is the [PrimeReact Plugin](./plugin). It installs this MCP server together with the PrimeReact skills for implementation, setup, theming, accessibility, and troubleshooting.
|
|
119033
|
+
|
|
119034
|
+
```bash
|
|
119035
|
+
pnpm dlx @primeui/cli plugin install --tool copilot --library primereact
|
|
119036
|
+
pnpm dlx @primeui/cli doctor --tool copilot --library primereact
|
|
119037
|
+
```
|
|
119038
|
+
|
|
119039
|
+
Replace `copilot` with `claude`, `codex`, `gemini`, or `cursor` for another supported assistant. Use Manual Setup when you want the MCP server without the plugin skills.
|
|
119040
|
+
|
|
119041
|
+
## Manual Setup
|
|
119042
|
+
|
|
119043
|
+
### Claude Code
|
|
119044
|
+
|
|
119045
|
+
Add the server to your user configuration to use it in every project, or omit `-s user` for the current project only.
|
|
119046
|
+
|
|
119047
|
+
```bash
|
|
119048
|
+
claude mcp add primereact -s user -- npx -y @primereact/mcp
|
|
119049
|
+
```
|
|
119050
|
+
|
|
119051
|
+
See the [Claude Code MCP documentation](https://docs.anthropic.com/en/docs/claude-code/mcp) for client-specific options.
|
|
119052
|
+
|
|
119053
|
+
### VS Code
|
|
119054
|
+
|
|
119055
|
+
Create `.vscode/mcp.json` for project-level setup. To use the server across projects, add the same `servers` entry to your VS Code user MCP configuration.
|
|
119056
|
+
|
|
119057
|
+
```json
|
|
119058
|
+
{
|
|
119059
|
+
"servers": {
|
|
119060
|
+
"primereact": {
|
|
119061
|
+
"command": "npx",
|
|
119062
|
+
"args": ["-y", "@primereact/mcp"]
|
|
119063
|
+
}
|
|
119064
|
+
}
|
|
119065
|
+
}
|
|
119066
|
+
```
|
|
119067
|
+
|
|
119068
|
+
See the [VS Code MCP documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more details.
|
|
119069
|
+
|
|
119070
|
+
### OpenAI Codex
|
|
119071
|
+
|
|
119072
|
+
Add the server with the Codex CLI, or add the same configuration to `~/.codex/config.toml`.
|
|
119073
|
+
|
|
119074
|
+
```bash
|
|
119075
|
+
codex mcp add primereact -- npx -y @primereact/mcp
|
|
119076
|
+
```
|
|
119077
|
+
|
|
119078
|
+
```toml
|
|
119079
|
+
[mcp_servers.primereact]
|
|
119080
|
+
command = "npx"
|
|
119081
|
+
args = ["-y", "@primereact/mcp"]
|
|
119082
|
+
```
|
|
119083
|
+
|
|
119084
|
+
See the [OpenAI Codex MCP documentation](https://developers.openai.com/codex/mcp/) for more details.
|
|
119085
|
+
|
|
119086
|
+
### Cursor
|
|
119087
|
+
|
|
119088
|
+
Create `.cursor/mcp.json` in your project or `~/.cursor/mcp.json` for global configuration.
|
|
119089
|
+
|
|
119090
|
+
```json
|
|
119091
|
+
{
|
|
119092
|
+
"mcpServers": {
|
|
119093
|
+
"primereact": {
|
|
119094
|
+
"command": "npx",
|
|
119095
|
+
"args": ["-y", "@primereact/mcp"]
|
|
119096
|
+
}
|
|
119097
|
+
}
|
|
119098
|
+
}
|
|
119099
|
+
```
|
|
119100
|
+
|
|
119101
|
+
See the [Cursor MCP documentation](https://docs.cursor.com/context/model-context-protocol) for more details.
|
|
119102
|
+
|
|
119103
|
+
## Tools
|
|
119104
|
+
|
|
119105
|
+
The PrimeReact MCP server provides eight tools.
|
|
119106
|
+
|
|
119107
|
+
| Tool | Purpose |
|
|
119108
|
+
| ---------------- | ----------------------------------------------------------------------------------------- |
|
|
119109
|
+
| `list` | List available components, guides, examples, resources, or modes. |
|
|
119110
|
+
| `search` | Search generated component, guide, section, API, hook, and example text. |
|
|
119111
|
+
| `get_component` | Read mode-scoped component or hook documentation, API metadata, and available sections. |
|
|
119112
|
+
| `get_guide` | Read a generated PrimeReact guide and its source metadata. |
|
|
119113
|
+
| `get_example` | Return an example from a documented component or hook section. |
|
|
119114
|
+
| `get_setup` | Return setup guidance for a supported PrimeReact mode and environment. |
|
|
119115
|
+
| `validate_usage` | Validate component usage against generated PrimeReact API metadata in one selected mode. |
|
|
119116
|
+
| `version` | Report the server version and the status of its documentation data, tools, and resources. |
|
|
119117
|
+
|
|
119118
|
+
## Data and Validation
|
|
119119
|
+
|
|
119120
|
+
The MCP package includes a generated copy of the PrimeReact documentation. This keeps the server usable without a PrimeReact source checkout and makes its answers match the installed package version. Results include a `primeui://primereact` resource URI and, when available, a link to the public documentation.
|
|
119121
|
+
|
|
119122
|
+
- The tools do not edit files, install dependencies, or update configuration.
|
|
119123
|
+
- Component, setup, example, and validation calls stay in one selected mode: `styled`, `tailwind`, `primitive`, `headless`, or `hooks` where supported.
|
|
119124
|
+
- `validate_usage` checks documented API metadata. If the required metadata is unavailable or the mode is ambiguous, it reports that limitation instead of guessing.
|
|
119125
|
+
- Run your project type checks, tests, and browser checks after making changes. MCP validation does not replace them.
|
|
119126
|
+
|
|
119127
|
+
If you installed the PrimeReact Plugin, do not register the MCP server again with a manual configuration. Run the CLI `doctor` command if the server is missing or appears more than once.
|
|
119128
|
+
|
|
119129
|
+
# Plugin
|
|
119130
|
+
|
|
119131
|
+
Install PrimeReact workflow skills and the PrimeReact MCP server in a supported AI assistant.
|
|
119132
|
+
|
|
119133
|
+
## Introduction
|
|
119134
|
+
|
|
119135
|
+
The PrimeReact Plugin adds PrimeReact skills and the PrimeReact MCP server to Claude Code, Codex, GitHub Copilot, Cursor, or Gemini CLI. Plugins installed through GitHub Copilot CLI are also available in VS Code. Install the plugin when you want the assistant to follow PrimeReact-specific, mode-aware workflows as well as read the current component documentation.
|
|
119136
|
+
|
|
119137
|
+
The plugin is published from the [primefaces/primeui-plugins](https://github.com/primefaces/primeui-plugins) repository. Use `@primeui/cli` for the same installation flow across supported assistants, or follow the manual setup for your client.
|
|
119138
|
+
|
|
119139
|
+
## What It Installs
|
|
119140
|
+
|
|
119141
|
+
Installing the PrimeReact Plugin adds:
|
|
119142
|
+
|
|
119143
|
+
- Six focused skills covering routing, implementation, setup, theming, accessibility, and troubleshooting.
|
|
119144
|
+
- The PrimeReact MCP server, configured with `@primereact/mcp`.
|
|
119145
|
+
- The manifest required by the selected assistant.
|
|
119146
|
+
|
|
119147
|
+
PrimeVue and PrimeNG are separate plugins. Installing this plugin does not change your application or install PrimeReact dependencies in the project.
|
|
119148
|
+
|
|
119149
|
+
## Skills
|
|
119150
|
+
|
|
119151
|
+
Each skill covers one type of PrimeReact work. The skills use `@primereact/mcp` when they need mode-scoped component APIs, examples, setup guides, hooks, or usage validation.
|
|
119152
|
+
|
|
119153
|
+
| Skill | Use it for |
|
|
119154
|
+
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
119155
|
+
| `primereact-router` | Select the PrimeReact mode and choose the skill that matches the task. |
|
|
119156
|
+
| `primereact-component-implementation` | Choose and implement components, composition, properties, callbacks, and documented hooks. |
|
|
119157
|
+
| `primereact-setup-installation` | Configure a supported React environment in `styled`, `tailwind`, `primitive`, or `headless` mode. |
|
|
119158
|
+
| `primereact-theming-customization` | Work with styled presets and tokens, Tailwind-owned components, primitives, headless markup, or pass-through APIs without mixing modes. |
|
|
119159
|
+
| `primereact-accessibility-icons` | Review semantics, keyboard behavior, focus, accessible names, PrimeIcons, and custom icons in the selected mode. |
|
|
119160
|
+
| `primereact-audit-troubleshooting` | Find invalid APIs and troubleshoot components, setup, MCP, plugin, or duplicate configurations. |
|
|
119161
|
+
|
|
119162
|
+
The current PrimeReact v11 documentation does not provide a supported version migration guide, so the plugin does not advertise a migration workflow.
|
|
119163
|
+
|
|
119164
|
+
Skill names use the `primereact-` prefix because assistants may keep skills from several plugins in one shared namespace.
|
|
119165
|
+
|
|
119166
|
+
## How Skills Work
|
|
119167
|
+
|
|
119168
|
+
You do not need to select a skill manually. Describe the PrimeReact task and the router chooses the relevant workflow.
|
|
119169
|
+
|
|
119170
|
+
- The router checks that the project uses React and PrimeReact, then selects `styled`, `tailwind`, `primitive`, or `headless` from project evidence. It uses `hooks` only for a documented standalone hook.
|
|
119171
|
+
- The selected skill reads only the component or guide information needed for that mode.
|
|
119172
|
+
- When component metadata is available, the skill validates the final PrimeReact usage in the same mode.
|
|
119173
|
+
- If project evidence is ambiguous or the documentation does not confirm an API, the skill reports the limitation instead of borrowing guidance from another mode.
|
|
119174
|
+
|
|
119175
|
+
After implementation, run the checks required by your project, including type checking, tests, browser behavior, accessibility, and visual review where applicable.
|
|
119176
|
+
|
|
119177
|
+
## CLI Setup
|
|
119178
|
+
|
|
119179
|
+
Set `--tool` to the assistant you use. Keep `--library primereact` when you run the command outside a project or from a project that uses more than one PrimeUI library.
|
|
119180
|
+
|
|
119181
|
+
```bash
|
|
119182
|
+
pnpm dlx @primeui/cli plugin install --tool copilot --library primereact
|
|
119183
|
+
```
|
|
119184
|
+
|
|
119185
|
+
Supported tool values are `claude`, `codex`, `copilot`, `cursor`, and `gemini`. Use `copilot` for GitHub Copilot CLI and VS Code.
|
|
119186
|
+
|
|
119187
|
+
## Lifecycle and Doctor
|
|
119188
|
+
|
|
119189
|
+
Use the same CLI to check the installation, update the plugin, or remove it. Each command applies only to PrimeReact in the selected assistant.
|
|
119190
|
+
|
|
119191
|
+
```bash
|
|
119192
|
+
pnpm dlx @primeui/cli plugin status --tool copilot --library primereact
|
|
119193
|
+
pnpm dlx @primeui/cli plugin update --tool copilot --library primereact
|
|
119194
|
+
pnpm dlx @primeui/cli plugin remove --tool copilot --library primereact
|
|
119195
|
+
pnpm dlx @primeui/cli doctor --tool copilot --library primereact
|
|
119196
|
+
|
|
119197
|
+
# Machine-readable diagnostics
|
|
119198
|
+
pnpm dlx @primeui/cli doctor --tool copilot --library primereact --json
|
|
119199
|
+
```
|
|
119200
|
+
|
|
119201
|
+
Run `doctor` when the plugin or MCP server is not working as expected. It checks the installation, starts the MCP server, confirms the available tools, and tests documentation retrieval and component validation. Checks that an assistant does not expose are reported as unsupported.
|
|
119202
|
+
|
|
119203
|
+
## Manual Setup
|
|
119204
|
+
|
|
119205
|
+
### Source
|
|
119206
|
+
|
|
119207
|
+
Claude Code, Codex, and GitHub Copilot can install the plugin directly from the public marketplace. For manual Cursor or Gemini CLI setup, clone the repository to a location you intend to keep because those clients use the selected `plugins/primereact` directory after installation.
|
|
119208
|
+
|
|
119209
|
+
```bash
|
|
119210
|
+
git clone --branch main https://github.com/primefaces/primeui-plugins.git ~/primeui-plugins
|
|
119211
|
+
ls ~/primeui-plugins/plugins/primereact
|
|
119212
|
+
```
|
|
119213
|
+
|
|
119214
|
+
### Claude Code
|
|
119215
|
+
|
|
119216
|
+
Add the PrimeUI marketplace, then install only the PrimeReact plugin.
|
|
119217
|
+
|
|
119218
|
+
```bash
|
|
119219
|
+
claude plugin marketplace add primefaces/primeui-plugins
|
|
119220
|
+
claude plugin install primereact@primeui
|
|
119221
|
+
claude plugin list --json
|
|
119222
|
+
```
|
|
119223
|
+
|
|
119224
|
+
### Codex
|
|
119225
|
+
|
|
119226
|
+
Add the PrimeUI marketplace, inspect its catalog, then install only the PrimeReact plugin. Use the interactive plugin browser to manage enablement.
|
|
119227
|
+
|
|
119228
|
+
```bash
|
|
119229
|
+
codex plugin marketplace add primefaces/primeui-plugins
|
|
119230
|
+
codex plugin list --available
|
|
119231
|
+
codex plugin add primereact@primeui
|
|
119232
|
+
codex plugin list
|
|
119233
|
+
```
|
|
119234
|
+
|
|
119235
|
+
### VS Code Copilot
|
|
119236
|
+
|
|
119237
|
+
Install the PrimeReact Plugin through GitHub Copilot CLI. VS Code automatically discovers plugins installed by Copilot CLI, so it does not need a separate plugin configuration.
|
|
119238
|
+
|
|
119239
|
+
```bash
|
|
119240
|
+
copilot plugin marketplace add primefaces/primeui-plugins
|
|
119241
|
+
copilot plugin install primereact@primeui
|
|
119242
|
+
```
|
|
119243
|
+
|
|
119244
|
+
The installation includes the seven PrimeReact skills and the PrimeReact MCP server. See the [VS Code Agent Plugins](https://code.visualstudio.com/docs/agent-customization/agent-plugins) and [GitHub Copilot CLI Plugins](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/plugins-finding-installing) documentation for client-specific details.
|
|
119245
|
+
|
|
119246
|
+
### Cursor
|
|
119247
|
+
|
|
119248
|
+
For local setup, link the PrimeReact plugin directory into Cursor's local-plugin directory. Restart Cursor or run `Developer: Reload Window` after creating the link.
|
|
119249
|
+
|
|
119250
|
+
```bash
|
|
119251
|
+
mkdir -p ~/.cursor/plugins/local
|
|
119252
|
+
ln -s ~/primeui-plugins/plugins/primereact ~/.cursor/plugins/local/primereact
|
|
119253
|
+
```
|
|
119254
|
+
|
|
119255
|
+
Use Cursor's Customize screen to manage the plugin, its skills, and its MCP server.
|
|
119256
|
+
|
|
119257
|
+
### Gemini CLI
|
|
119258
|
+
|
|
119259
|
+
Validate the PrimeReact extension directory, then install it from the persistent checkout. Do not install from the repository root because it contains plugins for all three PrimeUI libraries.
|
|
119260
|
+
|
|
119261
|
+
```bash
|
|
119262
|
+
gemini extensions validate ~/primeui-plugins/plugins/primereact
|
|
119263
|
+
gemini extensions install ~/primeui-plugins/plugins/primereact --consent
|
|
119264
|
+
gemini extensions list --output-format json
|
|
119265
|
+
```
|
|
119266
|
+
|
|
119267
|
+
Gemini CLI 0.29.3 requires `experimental.extensionManagement` to be enabled. The installed extension contains the seven PrimeReact skills and the PrimeReact MCP server.
|
|
119268
|
+
|
|
119098
119269
|
# Installation
|
|
119099
119270
|
|
|
119100
119271
|
Install PrimeReact's headless hooks and build fully custom components in your React project.
|
|
@@ -119113,7 +119284,7 @@ Headless hooks give you the behavior — state, keyboard navigation, focus and a
|
|
|
119113
119284
|
Install the headless package using your favorite package manager:
|
|
119114
119285
|
|
|
119115
119286
|
```bash
|
|
119116
|
-
npm install @primereact/headless
|
|
119287
|
+
npm install @primereact/headless
|
|
119117
119288
|
```
|
|
119118
119289
|
|
|
119119
119290
|
</DocStep>
|
|
@@ -119647,6 +119818,260 @@ Add a `.md` to a page’s URL to display a Markdown version of that page.
|
|
|
119647
119818
|
|
|
119648
119819
|
<Button as="a" href="/docs/overview/llms.md" target="_blank">Open /docs/overview/llms.md</Button>
|
|
119649
119820
|
|
|
119821
|
+
# MCP Server
|
|
119822
|
+
|
|
119823
|
+
Connect AI assistants to PrimeReact component documentation, guides, examples, setup, and API metadata.
|
|
119824
|
+
|
|
119825
|
+
## Introduction
|
|
119826
|
+
|
|
119827
|
+
[Model Context Protocol (MCP)](https://modelcontextprotocol.io/) lets AI assistants call external tools. The `@primereact/mcp` package uses those tools to search and read the PrimeReact documentation included with the package.
|
|
119828
|
+
|
|
119829
|
+
- Find components, guides, examples, setup instructions, and hooks.
|
|
119830
|
+
- Read mode-scoped component APIs and documentation sections.
|
|
119831
|
+
- Check component usage against documented properties and callbacks.
|
|
119832
|
+
- Return links to the related PrimeReact documentation when available.
|
|
119833
|
+
|
|
119834
|
+
The server requires Node.js 22 or newer. It is read-only and does not change your project files or PrimeReact configuration.
|
|
119835
|
+
|
|
119836
|
+
## CLI Setup
|
|
119837
|
+
|
|
119838
|
+
The recommended setup is the [PrimeReact Plugin](./plugin). It installs this MCP server together with the PrimeReact skills for implementation, setup, theming, accessibility, and troubleshooting.
|
|
119839
|
+
|
|
119840
|
+
```bash
|
|
119841
|
+
pnpm dlx @primeui/cli plugin install --tool copilot --library primereact
|
|
119842
|
+
pnpm dlx @primeui/cli doctor --tool copilot --library primereact
|
|
119843
|
+
```
|
|
119844
|
+
|
|
119845
|
+
Replace `copilot` with `claude`, `codex`, `gemini`, or `cursor` for another supported assistant. Use Manual Setup when you want the MCP server without the plugin skills.
|
|
119846
|
+
|
|
119847
|
+
## Manual Setup
|
|
119848
|
+
|
|
119849
|
+
### Claude Code
|
|
119850
|
+
|
|
119851
|
+
Add the server to your user configuration to use it in every project, or omit `-s user` for the current project only.
|
|
119852
|
+
|
|
119853
|
+
```bash
|
|
119854
|
+
claude mcp add primereact -s user -- npx -y @primereact/mcp
|
|
119855
|
+
```
|
|
119856
|
+
|
|
119857
|
+
See the [Claude Code MCP documentation](https://docs.anthropic.com/en/docs/claude-code/mcp) for client-specific options.
|
|
119858
|
+
|
|
119859
|
+
### VS Code
|
|
119860
|
+
|
|
119861
|
+
Create `.vscode/mcp.json` for project-level setup. To use the server across projects, add the same `servers` entry to your VS Code user MCP configuration.
|
|
119862
|
+
|
|
119863
|
+
```json
|
|
119864
|
+
{
|
|
119865
|
+
"servers": {
|
|
119866
|
+
"primereact": {
|
|
119867
|
+
"command": "npx",
|
|
119868
|
+
"args": ["-y", "@primereact/mcp"]
|
|
119869
|
+
}
|
|
119870
|
+
}
|
|
119871
|
+
}
|
|
119872
|
+
```
|
|
119873
|
+
|
|
119874
|
+
See the [VS Code MCP documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more details.
|
|
119875
|
+
|
|
119876
|
+
### OpenAI Codex
|
|
119877
|
+
|
|
119878
|
+
Add the server with the Codex CLI, or add the same configuration to `~/.codex/config.toml`.
|
|
119879
|
+
|
|
119880
|
+
```bash
|
|
119881
|
+
codex mcp add primereact -- npx -y @primereact/mcp
|
|
119882
|
+
```
|
|
119883
|
+
|
|
119884
|
+
```toml
|
|
119885
|
+
[mcp_servers.primereact]
|
|
119886
|
+
command = "npx"
|
|
119887
|
+
args = ["-y", "@primereact/mcp"]
|
|
119888
|
+
```
|
|
119889
|
+
|
|
119890
|
+
See the [OpenAI Codex MCP documentation](https://developers.openai.com/codex/mcp/) for more details.
|
|
119891
|
+
|
|
119892
|
+
### Cursor
|
|
119893
|
+
|
|
119894
|
+
Create `.cursor/mcp.json` in your project or `~/.cursor/mcp.json` for global configuration.
|
|
119895
|
+
|
|
119896
|
+
```json
|
|
119897
|
+
{
|
|
119898
|
+
"mcpServers": {
|
|
119899
|
+
"primereact": {
|
|
119900
|
+
"command": "npx",
|
|
119901
|
+
"args": ["-y", "@primereact/mcp"]
|
|
119902
|
+
}
|
|
119903
|
+
}
|
|
119904
|
+
}
|
|
119905
|
+
```
|
|
119906
|
+
|
|
119907
|
+
See the [Cursor MCP documentation](https://docs.cursor.com/context/model-context-protocol) for more details.
|
|
119908
|
+
|
|
119909
|
+
## Tools
|
|
119910
|
+
|
|
119911
|
+
The PrimeReact MCP server provides eight tools.
|
|
119912
|
+
|
|
119913
|
+
| Tool | Purpose |
|
|
119914
|
+
| ---------------- | ----------------------------------------------------------------------------------------- |
|
|
119915
|
+
| `list` | List available components, guides, examples, resources, or modes. |
|
|
119916
|
+
| `search` | Search generated component, guide, section, API, hook, and example text. |
|
|
119917
|
+
| `get_component` | Read mode-scoped component or hook documentation, API metadata, and available sections. |
|
|
119918
|
+
| `get_guide` | Read a generated PrimeReact guide and its source metadata. |
|
|
119919
|
+
| `get_example` | Return an example from a documented component or hook section. |
|
|
119920
|
+
| `get_setup` | Return setup guidance for a supported PrimeReact mode and environment. |
|
|
119921
|
+
| `validate_usage` | Validate component usage against generated PrimeReact API metadata in one selected mode. |
|
|
119922
|
+
| `version` | Report the server version and the status of its documentation data, tools, and resources. |
|
|
119923
|
+
|
|
119924
|
+
## Data and Validation
|
|
119925
|
+
|
|
119926
|
+
The MCP package includes a generated copy of the PrimeReact documentation. This keeps the server usable without a PrimeReact source checkout and makes its answers match the installed package version. Results include a `primeui://primereact` resource URI and, when available, a link to the public documentation.
|
|
119927
|
+
|
|
119928
|
+
- The tools do not edit files, install dependencies, or update configuration.
|
|
119929
|
+
- Component, setup, example, and validation calls stay in one selected mode: `styled`, `tailwind`, `primitive`, `headless`, or `hooks` where supported.
|
|
119930
|
+
- `validate_usage` checks documented API metadata. If the required metadata is unavailable or the mode is ambiguous, it reports that limitation instead of guessing.
|
|
119931
|
+
- Run your project type checks, tests, and browser checks after making changes. MCP validation does not replace them.
|
|
119932
|
+
|
|
119933
|
+
If you installed the PrimeReact Plugin, do not register the MCP server again with a manual configuration. Run the CLI `doctor` command if the server is missing or appears more than once.
|
|
119934
|
+
|
|
119935
|
+
# Plugin
|
|
119936
|
+
|
|
119937
|
+
Install PrimeReact workflow skills and the PrimeReact MCP server in a supported AI assistant.
|
|
119938
|
+
|
|
119939
|
+
## Introduction
|
|
119940
|
+
|
|
119941
|
+
The PrimeReact Plugin adds PrimeReact skills and the PrimeReact MCP server to Claude Code, Codex, GitHub Copilot, Cursor, or Gemini CLI. Plugins installed through GitHub Copilot CLI are also available in VS Code. Install the plugin when you want the assistant to follow PrimeReact-specific, mode-aware workflows as well as read the current component documentation.
|
|
119942
|
+
|
|
119943
|
+
The plugin is published from the [primefaces/primeui-plugins](https://github.com/primefaces/primeui-plugins) repository. Use `@primeui/cli` for the same installation flow across supported assistants, or follow the manual setup for your client.
|
|
119944
|
+
|
|
119945
|
+
## What It Installs
|
|
119946
|
+
|
|
119947
|
+
Installing the PrimeReact Plugin adds:
|
|
119948
|
+
|
|
119949
|
+
- Six focused skills covering routing, implementation, setup, theming, accessibility, and troubleshooting.
|
|
119950
|
+
- The PrimeReact MCP server, configured with `@primereact/mcp`.
|
|
119951
|
+
- The manifest required by the selected assistant.
|
|
119952
|
+
|
|
119953
|
+
PrimeVue and PrimeNG are separate plugins. Installing this plugin does not change your application or install PrimeReact dependencies in the project.
|
|
119954
|
+
|
|
119955
|
+
## Skills
|
|
119956
|
+
|
|
119957
|
+
Each skill covers one type of PrimeReact work. The skills use `@primereact/mcp` when they need mode-scoped component APIs, examples, setup guides, hooks, or usage validation.
|
|
119958
|
+
|
|
119959
|
+
| Skill | Use it for |
|
|
119960
|
+
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
119961
|
+
| `primereact-router` | Select the PrimeReact mode and choose the skill that matches the task. |
|
|
119962
|
+
| `primereact-component-implementation` | Choose and implement components, composition, properties, callbacks, and documented hooks. |
|
|
119963
|
+
| `primereact-setup-installation` | Configure a supported React environment in `styled`, `tailwind`, `primitive`, or `headless` mode. |
|
|
119964
|
+
| `primereact-theming-customization` | Work with styled presets and tokens, Tailwind-owned components, primitives, headless markup, or pass-through APIs without mixing modes. |
|
|
119965
|
+
| `primereact-accessibility-icons` | Review semantics, keyboard behavior, focus, accessible names, PrimeIcons, and custom icons in the selected mode. |
|
|
119966
|
+
| `primereact-audit-troubleshooting` | Find invalid APIs and troubleshoot components, setup, MCP, plugin, or duplicate configurations. |
|
|
119967
|
+
|
|
119968
|
+
The current PrimeReact v11 documentation does not provide a supported version migration guide, so the plugin does not advertise a migration workflow.
|
|
119969
|
+
|
|
119970
|
+
Skill names use the `primereact-` prefix because assistants may keep skills from several plugins in one shared namespace.
|
|
119971
|
+
|
|
119972
|
+
## How Skills Work
|
|
119973
|
+
|
|
119974
|
+
You do not need to select a skill manually. Describe the PrimeReact task and the router chooses the relevant workflow.
|
|
119975
|
+
|
|
119976
|
+
- The router checks that the project uses React and PrimeReact, then selects `styled`, `tailwind`, `primitive`, or `headless` from project evidence. It uses `hooks` only for a documented standalone hook.
|
|
119977
|
+
- The selected skill reads only the component or guide information needed for that mode.
|
|
119978
|
+
- When component metadata is available, the skill validates the final PrimeReact usage in the same mode.
|
|
119979
|
+
- If project evidence is ambiguous or the documentation does not confirm an API, the skill reports the limitation instead of borrowing guidance from another mode.
|
|
119980
|
+
|
|
119981
|
+
After implementation, run the checks required by your project, including type checking, tests, browser behavior, accessibility, and visual review where applicable.
|
|
119982
|
+
|
|
119983
|
+
## CLI Setup
|
|
119984
|
+
|
|
119985
|
+
Set `--tool` to the assistant you use. Keep `--library primereact` when you run the command outside a project or from a project that uses more than one PrimeUI library.
|
|
119986
|
+
|
|
119987
|
+
```bash
|
|
119988
|
+
pnpm dlx @primeui/cli plugin install --tool copilot --library primereact
|
|
119989
|
+
```
|
|
119990
|
+
|
|
119991
|
+
Supported tool values are `claude`, `codex`, `copilot`, `cursor`, and `gemini`. Use `copilot` for GitHub Copilot CLI and VS Code.
|
|
119992
|
+
|
|
119993
|
+
## Lifecycle and Doctor
|
|
119994
|
+
|
|
119995
|
+
Use the same CLI to check the installation, update the plugin, or remove it. Each command applies only to PrimeReact in the selected assistant.
|
|
119996
|
+
|
|
119997
|
+
```bash
|
|
119998
|
+
pnpm dlx @primeui/cli plugin status --tool copilot --library primereact
|
|
119999
|
+
pnpm dlx @primeui/cli plugin update --tool copilot --library primereact
|
|
120000
|
+
pnpm dlx @primeui/cli plugin remove --tool copilot --library primereact
|
|
120001
|
+
pnpm dlx @primeui/cli doctor --tool copilot --library primereact
|
|
120002
|
+
|
|
120003
|
+
# Machine-readable diagnostics
|
|
120004
|
+
pnpm dlx @primeui/cli doctor --tool copilot --library primereact --json
|
|
120005
|
+
```
|
|
120006
|
+
|
|
120007
|
+
Run `doctor` when the plugin or MCP server is not working as expected. It checks the installation, starts the MCP server, confirms the available tools, and tests documentation retrieval and component validation. Checks that an assistant does not expose are reported as unsupported.
|
|
120008
|
+
|
|
120009
|
+
## Manual Setup
|
|
120010
|
+
|
|
120011
|
+
### Source
|
|
120012
|
+
|
|
120013
|
+
Claude Code, Codex, and GitHub Copilot can install the plugin directly from the public marketplace. For manual Cursor or Gemini CLI setup, clone the repository to a location you intend to keep because those clients use the selected `plugins/primereact` directory after installation.
|
|
120014
|
+
|
|
120015
|
+
```bash
|
|
120016
|
+
git clone --branch main https://github.com/primefaces/primeui-plugins.git ~/primeui-plugins
|
|
120017
|
+
ls ~/primeui-plugins/plugins/primereact
|
|
120018
|
+
```
|
|
120019
|
+
|
|
120020
|
+
### Claude Code
|
|
120021
|
+
|
|
120022
|
+
Add the PrimeUI marketplace, then install only the PrimeReact plugin.
|
|
120023
|
+
|
|
120024
|
+
```bash
|
|
120025
|
+
claude plugin marketplace add primefaces/primeui-plugins
|
|
120026
|
+
claude plugin install primereact@primeui
|
|
120027
|
+
claude plugin list --json
|
|
120028
|
+
```
|
|
120029
|
+
|
|
120030
|
+
### Codex
|
|
120031
|
+
|
|
120032
|
+
Add the PrimeUI marketplace, inspect its catalog, then install only the PrimeReact plugin. Use the interactive plugin browser to manage enablement.
|
|
120033
|
+
|
|
120034
|
+
```bash
|
|
120035
|
+
codex plugin marketplace add primefaces/primeui-plugins
|
|
120036
|
+
codex plugin list --available
|
|
120037
|
+
codex plugin add primereact@primeui
|
|
120038
|
+
codex plugin list
|
|
120039
|
+
```
|
|
120040
|
+
|
|
120041
|
+
### VS Code Copilot
|
|
120042
|
+
|
|
120043
|
+
Install the PrimeReact Plugin through GitHub Copilot CLI. VS Code automatically discovers plugins installed by Copilot CLI, so it does not need a separate plugin configuration.
|
|
120044
|
+
|
|
120045
|
+
```bash
|
|
120046
|
+
copilot plugin marketplace add primefaces/primeui-plugins
|
|
120047
|
+
copilot plugin install primereact@primeui
|
|
120048
|
+
```
|
|
120049
|
+
|
|
120050
|
+
The installation includes the seven PrimeReact skills and the PrimeReact MCP server. See the [VS Code Agent Plugins](https://code.visualstudio.com/docs/agent-customization/agent-plugins) and [GitHub Copilot CLI Plugins](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/plugins-finding-installing) documentation for client-specific details.
|
|
120051
|
+
|
|
120052
|
+
### Cursor
|
|
120053
|
+
|
|
120054
|
+
For local setup, link the PrimeReact plugin directory into Cursor's local-plugin directory. Restart Cursor or run `Developer: Reload Window` after creating the link.
|
|
120055
|
+
|
|
120056
|
+
```bash
|
|
120057
|
+
mkdir -p ~/.cursor/plugins/local
|
|
120058
|
+
ln -s ~/primeui-plugins/plugins/primereact ~/.cursor/plugins/local/primereact
|
|
120059
|
+
```
|
|
120060
|
+
|
|
120061
|
+
Use Cursor's Customize screen to manage the plugin, its skills, and its MCP server.
|
|
120062
|
+
|
|
120063
|
+
### Gemini CLI
|
|
120064
|
+
|
|
120065
|
+
Validate the PrimeReact extension directory, then install it from the persistent checkout. Do not install from the repository root because it contains plugins for all three PrimeUI libraries.
|
|
120066
|
+
|
|
120067
|
+
```bash
|
|
120068
|
+
gemini extensions validate ~/primeui-plugins/plugins/primereact
|
|
120069
|
+
gemini extensions install ~/primeui-plugins/plugins/primereact --consent
|
|
120070
|
+
gemini extensions list --output-format json
|
|
120071
|
+
```
|
|
120072
|
+
|
|
120073
|
+
Gemini CLI 0.29.3 requires `experimental.extensionManagement` to be enabled. The installed extension contains the seven PrimeReact skills and the PrimeReact MCP server.
|
|
120074
|
+
|
|
119650
120075
|
# Custom Icons
|
|
119651
120076
|
|
|
119652
120077
|
PrimeReact components can be used with any icon library using the templating features.
|
|
@@ -119792,7 +120217,7 @@ export default function ColorDemo() {
|
|
|
119792
120217
|
|
|
119793
120218
|
## Spin
|
|
119794
120219
|
|
|
119795
|
-
Use a spin animation utility
|
|
120220
|
+
Use the `spin` property to apply a rotation animation to an icon. Alternatively, a spin animation utility such as `animate-spin` from Tailwind can also be used.
|
|
119796
120221
|
|
|
119797
120222
|
```tsx
|
|
119798
120223
|
import { Cog } from '@primeicons/react/cog';
|
|
@@ -119801,8 +120226,8 @@ import { Spinner } from '@primeicons/react/spinner';
|
|
|
119801
120226
|
export default function SpinDemo() {
|
|
119802
120227
|
return (
|
|
119803
120228
|
<div className="flex justify-center gap-4">
|
|
119804
|
-
<Spinner
|
|
119805
|
-
<Cog
|
|
120229
|
+
<Spinner spin size={32} />
|
|
120230
|
+
<Cog spin size={32} />
|
|
119806
120231
|
</div>
|
|
119807
120232
|
);
|
|
119808
120233
|
}
|
|
@@ -119826,7 +120251,7 @@ Primitive components ship **unstyled** — you compose the behavior and bring yo
|
|
|
119826
120251
|
Install PrimeReact using your favorite package manager:
|
|
119827
120252
|
|
|
119828
120253
|
```bash
|
|
119829
|
-
npm install primereact
|
|
120254
|
+
npm install primereact
|
|
119830
120255
|
```
|
|
119831
120256
|
|
|
119832
120257
|
</DocStep>
|
|
@@ -120642,6 +121067,260 @@ Add a `.md` to a page’s URL to display a Markdown version of that page.
|
|
|
120642
121067
|
|
|
120643
121068
|
<Button as="a" href="/docs/overview/llms.md" target="_blank">Open /docs/overview/llms.md</Button>
|
|
120644
121069
|
|
|
121070
|
+
# MCP Server
|
|
121071
|
+
|
|
121072
|
+
Connect AI assistants to PrimeReact component documentation, guides, examples, setup, and API metadata.
|
|
121073
|
+
|
|
121074
|
+
## Introduction
|
|
121075
|
+
|
|
121076
|
+
[Model Context Protocol (MCP)](https://modelcontextprotocol.io/) lets AI assistants call external tools. The `@primereact/mcp` package uses those tools to search and read the PrimeReact documentation included with the package.
|
|
121077
|
+
|
|
121078
|
+
- Find components, guides, examples, setup instructions, and hooks.
|
|
121079
|
+
- Read mode-scoped component APIs and documentation sections.
|
|
121080
|
+
- Check component usage against documented properties and callbacks.
|
|
121081
|
+
- Return links to the related PrimeReact documentation when available.
|
|
121082
|
+
|
|
121083
|
+
The server requires Node.js 22 or newer. It is read-only and does not change your project files or PrimeReact configuration.
|
|
121084
|
+
|
|
121085
|
+
## CLI Setup
|
|
121086
|
+
|
|
121087
|
+
The recommended setup is the [PrimeReact Plugin](./plugin). It installs this MCP server together with the PrimeReact skills for implementation, setup, theming, accessibility, and troubleshooting.
|
|
121088
|
+
|
|
121089
|
+
```bash
|
|
121090
|
+
pnpm dlx @primeui/cli plugin install --tool copilot --library primereact
|
|
121091
|
+
pnpm dlx @primeui/cli doctor --tool copilot --library primereact
|
|
121092
|
+
```
|
|
121093
|
+
|
|
121094
|
+
Replace `copilot` with `claude`, `codex`, `gemini`, or `cursor` for another supported assistant. Use Manual Setup when you want the MCP server without the plugin skills.
|
|
121095
|
+
|
|
121096
|
+
## Manual Setup
|
|
121097
|
+
|
|
121098
|
+
### Claude Code
|
|
121099
|
+
|
|
121100
|
+
Add the server to your user configuration to use it in every project, or omit `-s user` for the current project only.
|
|
121101
|
+
|
|
121102
|
+
```bash
|
|
121103
|
+
claude mcp add primereact -s user -- npx -y @primereact/mcp
|
|
121104
|
+
```
|
|
121105
|
+
|
|
121106
|
+
See the [Claude Code MCP documentation](https://docs.anthropic.com/en/docs/claude-code/mcp) for client-specific options.
|
|
121107
|
+
|
|
121108
|
+
### VS Code
|
|
121109
|
+
|
|
121110
|
+
Create `.vscode/mcp.json` for project-level setup. To use the server across projects, add the same `servers` entry to your VS Code user MCP configuration.
|
|
121111
|
+
|
|
121112
|
+
```json
|
|
121113
|
+
{
|
|
121114
|
+
"servers": {
|
|
121115
|
+
"primereact": {
|
|
121116
|
+
"command": "npx",
|
|
121117
|
+
"args": ["-y", "@primereact/mcp"]
|
|
121118
|
+
}
|
|
121119
|
+
}
|
|
121120
|
+
}
|
|
121121
|
+
```
|
|
121122
|
+
|
|
121123
|
+
See the [VS Code MCP documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more details.
|
|
121124
|
+
|
|
121125
|
+
### OpenAI Codex
|
|
121126
|
+
|
|
121127
|
+
Add the server with the Codex CLI, or add the same configuration to `~/.codex/config.toml`.
|
|
121128
|
+
|
|
121129
|
+
```bash
|
|
121130
|
+
codex mcp add primereact -- npx -y @primereact/mcp
|
|
121131
|
+
```
|
|
121132
|
+
|
|
121133
|
+
```toml
|
|
121134
|
+
[mcp_servers.primereact]
|
|
121135
|
+
command = "npx"
|
|
121136
|
+
args = ["-y", "@primereact/mcp"]
|
|
121137
|
+
```
|
|
121138
|
+
|
|
121139
|
+
See the [OpenAI Codex MCP documentation](https://developers.openai.com/codex/mcp/) for more details.
|
|
121140
|
+
|
|
121141
|
+
### Cursor
|
|
121142
|
+
|
|
121143
|
+
Create `.cursor/mcp.json` in your project or `~/.cursor/mcp.json` for global configuration.
|
|
121144
|
+
|
|
121145
|
+
```json
|
|
121146
|
+
{
|
|
121147
|
+
"mcpServers": {
|
|
121148
|
+
"primereact": {
|
|
121149
|
+
"command": "npx",
|
|
121150
|
+
"args": ["-y", "@primereact/mcp"]
|
|
121151
|
+
}
|
|
121152
|
+
}
|
|
121153
|
+
}
|
|
121154
|
+
```
|
|
121155
|
+
|
|
121156
|
+
See the [Cursor MCP documentation](https://docs.cursor.com/context/model-context-protocol) for more details.
|
|
121157
|
+
|
|
121158
|
+
## Tools
|
|
121159
|
+
|
|
121160
|
+
The PrimeReact MCP server provides eight tools.
|
|
121161
|
+
|
|
121162
|
+
| Tool | Purpose |
|
|
121163
|
+
| ---------------- | ----------------------------------------------------------------------------------------- |
|
|
121164
|
+
| `list` | List available components, guides, examples, resources, or modes. |
|
|
121165
|
+
| `search` | Search generated component, guide, section, API, hook, and example text. |
|
|
121166
|
+
| `get_component` | Read mode-scoped component or hook documentation, API metadata, and available sections. |
|
|
121167
|
+
| `get_guide` | Read a generated PrimeReact guide and its source metadata. |
|
|
121168
|
+
| `get_example` | Return an example from a documented component or hook section. |
|
|
121169
|
+
| `get_setup` | Return setup guidance for a supported PrimeReact mode and environment. |
|
|
121170
|
+
| `validate_usage` | Validate component usage against generated PrimeReact API metadata in one selected mode. |
|
|
121171
|
+
| `version` | Report the server version and the status of its documentation data, tools, and resources. |
|
|
121172
|
+
|
|
121173
|
+
## Data and Validation
|
|
121174
|
+
|
|
121175
|
+
The MCP package includes a generated copy of the PrimeReact documentation. This keeps the server usable without a PrimeReact source checkout and makes its answers match the installed package version. Results include a `primeui://primereact` resource URI and, when available, a link to the public documentation.
|
|
121176
|
+
|
|
121177
|
+
- The tools do not edit files, install dependencies, or update configuration.
|
|
121178
|
+
- Component, setup, example, and validation calls stay in one selected mode: `styled`, `tailwind`, `primitive`, `headless`, or `hooks` where supported.
|
|
121179
|
+
- `validate_usage` checks documented API metadata. If the required metadata is unavailable or the mode is ambiguous, it reports that limitation instead of guessing.
|
|
121180
|
+
- Run your project type checks, tests, and browser checks after making changes. MCP validation does not replace them.
|
|
121181
|
+
|
|
121182
|
+
If you installed the PrimeReact Plugin, do not register the MCP server again with a manual configuration. Run the CLI `doctor` command if the server is missing or appears more than once.
|
|
121183
|
+
|
|
121184
|
+
# Plugin
|
|
121185
|
+
|
|
121186
|
+
Install PrimeReact workflow skills and the PrimeReact MCP server in a supported AI assistant.
|
|
121187
|
+
|
|
121188
|
+
## Introduction
|
|
121189
|
+
|
|
121190
|
+
The PrimeReact Plugin adds PrimeReact skills and the PrimeReact MCP server to Claude Code, Codex, GitHub Copilot, Cursor, or Gemini CLI. Plugins installed through GitHub Copilot CLI are also available in VS Code. Install the plugin when you want the assistant to follow PrimeReact-specific, mode-aware workflows as well as read the current component documentation.
|
|
121191
|
+
|
|
121192
|
+
The plugin is published from the [primefaces/primeui-plugins](https://github.com/primefaces/primeui-plugins) repository. Use `@primeui/cli` for the same installation flow across supported assistants, or follow the manual setup for your client.
|
|
121193
|
+
|
|
121194
|
+
## What It Installs
|
|
121195
|
+
|
|
121196
|
+
Installing the PrimeReact Plugin adds:
|
|
121197
|
+
|
|
121198
|
+
- Six focused skills covering routing, implementation, setup, theming, accessibility, and troubleshooting.
|
|
121199
|
+
- The PrimeReact MCP server, configured with `@primereact/mcp`.
|
|
121200
|
+
- The manifest required by the selected assistant.
|
|
121201
|
+
|
|
121202
|
+
PrimeVue and PrimeNG are separate plugins. Installing this plugin does not change your application or install PrimeReact dependencies in the project.
|
|
121203
|
+
|
|
121204
|
+
## Skills
|
|
121205
|
+
|
|
121206
|
+
Each skill covers one type of PrimeReact work. The skills use `@primereact/mcp` when they need mode-scoped component APIs, examples, setup guides, hooks, or usage validation.
|
|
121207
|
+
|
|
121208
|
+
| Skill | Use it for |
|
|
121209
|
+
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
121210
|
+
| `primereact-router` | Select the PrimeReact mode and choose the skill that matches the task. |
|
|
121211
|
+
| `primereact-component-implementation` | Choose and implement components, composition, properties, callbacks, and documented hooks. |
|
|
121212
|
+
| `primereact-setup-installation` | Configure a supported React environment in `styled`, `tailwind`, `primitive`, or `headless` mode. |
|
|
121213
|
+
| `primereact-theming-customization` | Work with styled presets and tokens, Tailwind-owned components, primitives, headless markup, or pass-through APIs without mixing modes. |
|
|
121214
|
+
| `primereact-accessibility-icons` | Review semantics, keyboard behavior, focus, accessible names, PrimeIcons, and custom icons in the selected mode. |
|
|
121215
|
+
| `primereact-audit-troubleshooting` | Find invalid APIs and troubleshoot components, setup, MCP, plugin, or duplicate configurations. |
|
|
121216
|
+
|
|
121217
|
+
The current PrimeReact v11 documentation does not provide a supported version migration guide, so the plugin does not advertise a migration workflow.
|
|
121218
|
+
|
|
121219
|
+
Skill names use the `primereact-` prefix because assistants may keep skills from several plugins in one shared namespace.
|
|
121220
|
+
|
|
121221
|
+
## How Skills Work
|
|
121222
|
+
|
|
121223
|
+
You do not need to select a skill manually. Describe the PrimeReact task and the router chooses the relevant workflow.
|
|
121224
|
+
|
|
121225
|
+
- The router checks that the project uses React and PrimeReact, then selects `styled`, `tailwind`, `primitive`, or `headless` from project evidence. It uses `hooks` only for a documented standalone hook.
|
|
121226
|
+
- The selected skill reads only the component or guide information needed for that mode.
|
|
121227
|
+
- When component metadata is available, the skill validates the final PrimeReact usage in the same mode.
|
|
121228
|
+
- If project evidence is ambiguous or the documentation does not confirm an API, the skill reports the limitation instead of borrowing guidance from another mode.
|
|
121229
|
+
|
|
121230
|
+
After implementation, run the checks required by your project, including type checking, tests, browser behavior, accessibility, and visual review where applicable.
|
|
121231
|
+
|
|
121232
|
+
## CLI Setup
|
|
121233
|
+
|
|
121234
|
+
Set `--tool` to the assistant you use. Keep `--library primereact` when you run the command outside a project or from a project that uses more than one PrimeUI library.
|
|
121235
|
+
|
|
121236
|
+
```bash
|
|
121237
|
+
pnpm dlx @primeui/cli plugin install --tool copilot --library primereact
|
|
121238
|
+
```
|
|
121239
|
+
|
|
121240
|
+
Supported tool values are `claude`, `codex`, `copilot`, `cursor`, and `gemini`. Use `copilot` for GitHub Copilot CLI and VS Code.
|
|
121241
|
+
|
|
121242
|
+
## Lifecycle and Doctor
|
|
121243
|
+
|
|
121244
|
+
Use the same CLI to check the installation, update the plugin, or remove it. Each command applies only to PrimeReact in the selected assistant.
|
|
121245
|
+
|
|
121246
|
+
```bash
|
|
121247
|
+
pnpm dlx @primeui/cli plugin status --tool copilot --library primereact
|
|
121248
|
+
pnpm dlx @primeui/cli plugin update --tool copilot --library primereact
|
|
121249
|
+
pnpm dlx @primeui/cli plugin remove --tool copilot --library primereact
|
|
121250
|
+
pnpm dlx @primeui/cli doctor --tool copilot --library primereact
|
|
121251
|
+
|
|
121252
|
+
# Machine-readable diagnostics
|
|
121253
|
+
pnpm dlx @primeui/cli doctor --tool copilot --library primereact --json
|
|
121254
|
+
```
|
|
121255
|
+
|
|
121256
|
+
Run `doctor` when the plugin or MCP server is not working as expected. It checks the installation, starts the MCP server, confirms the available tools, and tests documentation retrieval and component validation. Checks that an assistant does not expose are reported as unsupported.
|
|
121257
|
+
|
|
121258
|
+
## Manual Setup
|
|
121259
|
+
|
|
121260
|
+
### Source
|
|
121261
|
+
|
|
121262
|
+
Claude Code, Codex, and GitHub Copilot can install the plugin directly from the public marketplace. For manual Cursor or Gemini CLI setup, clone the repository to a location you intend to keep because those clients use the selected `plugins/primereact` directory after installation.
|
|
121263
|
+
|
|
121264
|
+
```bash
|
|
121265
|
+
git clone --branch main https://github.com/primefaces/primeui-plugins.git ~/primeui-plugins
|
|
121266
|
+
ls ~/primeui-plugins/plugins/primereact
|
|
121267
|
+
```
|
|
121268
|
+
|
|
121269
|
+
### Claude Code
|
|
121270
|
+
|
|
121271
|
+
Add the PrimeUI marketplace, then install only the PrimeReact plugin.
|
|
121272
|
+
|
|
121273
|
+
```bash
|
|
121274
|
+
claude plugin marketplace add primefaces/primeui-plugins
|
|
121275
|
+
claude plugin install primereact@primeui
|
|
121276
|
+
claude plugin list --json
|
|
121277
|
+
```
|
|
121278
|
+
|
|
121279
|
+
### Codex
|
|
121280
|
+
|
|
121281
|
+
Add the PrimeUI marketplace, inspect its catalog, then install only the PrimeReact plugin. Use the interactive plugin browser to manage enablement.
|
|
121282
|
+
|
|
121283
|
+
```bash
|
|
121284
|
+
codex plugin marketplace add primefaces/primeui-plugins
|
|
121285
|
+
codex plugin list --available
|
|
121286
|
+
codex plugin add primereact@primeui
|
|
121287
|
+
codex plugin list
|
|
121288
|
+
```
|
|
121289
|
+
|
|
121290
|
+
### VS Code Copilot
|
|
121291
|
+
|
|
121292
|
+
Install the PrimeReact Plugin through GitHub Copilot CLI. VS Code automatically discovers plugins installed by Copilot CLI, so it does not need a separate plugin configuration.
|
|
121293
|
+
|
|
121294
|
+
```bash
|
|
121295
|
+
copilot plugin marketplace add primefaces/primeui-plugins
|
|
121296
|
+
copilot plugin install primereact@primeui
|
|
121297
|
+
```
|
|
121298
|
+
|
|
121299
|
+
The installation includes the seven PrimeReact skills and the PrimeReact MCP server. See the [VS Code Agent Plugins](https://code.visualstudio.com/docs/agent-customization/agent-plugins) and [GitHub Copilot CLI Plugins](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/plugins-finding-installing) documentation for client-specific details.
|
|
121300
|
+
|
|
121301
|
+
### Cursor
|
|
121302
|
+
|
|
121303
|
+
For local setup, link the PrimeReact plugin directory into Cursor's local-plugin directory. Restart Cursor or run `Developer: Reload Window` after creating the link.
|
|
121304
|
+
|
|
121305
|
+
```bash
|
|
121306
|
+
mkdir -p ~/.cursor/plugins/local
|
|
121307
|
+
ln -s ~/primeui-plugins/plugins/primereact ~/.cursor/plugins/local/primereact
|
|
121308
|
+
```
|
|
121309
|
+
|
|
121310
|
+
Use Cursor's Customize screen to manage the plugin, its skills, and its MCP server.
|
|
121311
|
+
|
|
121312
|
+
### Gemini CLI
|
|
121313
|
+
|
|
121314
|
+
Validate the PrimeReact extension directory, then install it from the persistent checkout. Do not install from the repository root because it contains plugins for all three PrimeUI libraries.
|
|
121315
|
+
|
|
121316
|
+
```bash
|
|
121317
|
+
gemini extensions validate ~/primeui-plugins/plugins/primereact
|
|
121318
|
+
gemini extensions install ~/primeui-plugins/plugins/primereact --consent
|
|
121319
|
+
gemini extensions list --output-format json
|
|
121320
|
+
```
|
|
121321
|
+
|
|
121322
|
+
Gemini CLI 0.29.3 requires `experimental.extensionManagement` to be enabled. The installed extension contains the seven PrimeReact skills and the PrimeReact MCP server.
|
|
121323
|
+
|
|
120645
121324
|
# Configuration
|
|
120646
121325
|
|
|
120647
121326
|
Application wide configuration for PrimeReact.
|
|
@@ -120939,7 +121618,7 @@ export default function ColorDemo() {
|
|
|
120939
121618
|
|
|
120940
121619
|
## Spin
|
|
120941
121620
|
|
|
120942
|
-
Use a spin animation utility
|
|
121621
|
+
Use the `spin` property to apply a rotation animation to an icon. Alternatively, a spin animation utility such as `animate-spin` from Tailwind can also be used.
|
|
120943
121622
|
|
|
120944
121623
|
```tsx
|
|
120945
121624
|
import { Cog } from '@primeicons/react/cog';
|
|
@@ -120948,8 +121627,8 @@ import { Spinner } from '@primeicons/react/spinner';
|
|
|
120948
121627
|
export default function SpinDemo() {
|
|
120949
121628
|
return (
|
|
120950
121629
|
<div className="flex justify-center gap-4">
|
|
120951
|
-
<Spinner
|
|
120952
|
-
<Cog
|
|
121630
|
+
<Spinner spin size={32} />
|
|
121631
|
+
<Cog spin size={32} />
|
|
120953
121632
|
</div>
|
|
120954
121633
|
);
|
|
120955
121634
|
}
|
|
@@ -121016,7 +121695,7 @@ Start from our <a href="https://github.com/primefaces/primereact-examples/tree/m
|
|
|
121016
121695
|
Install PrimeReact and a theme package using your favorite package manager:
|
|
121017
121696
|
|
|
121018
121697
|
```bash
|
|
121019
|
-
npm install @primereact/ui
|
|
121698
|
+
npm install @primereact/ui @primeuix/themes @primeicons/react
|
|
121020
121699
|
```
|
|
121021
121700
|
|
|
121022
121701
|
</DocStep>
|
|
@@ -121118,7 +121797,7 @@ Start from our <a href="https://github.com/primefaces/primereact-examples/tree/m
|
|
|
121118
121797
|
Install PrimeReact and a theme package using your favorite package manager:
|
|
121119
121798
|
|
|
121120
121799
|
```bash
|
|
121121
|
-
npm install @primereact/ui
|
|
121800
|
+
npm install @primereact/ui @primeuix/themes @primeicons/react
|
|
121122
121801
|
```
|
|
121123
121802
|
|
|
121124
121803
|
</DocStep>
|
|
@@ -121248,7 +121927,7 @@ Start from our <a href="https://github.com/primefaces/primereact-examples/tree/m
|
|
|
121248
121927
|
Install PrimeReact and a theme package using your favorite package manager:
|
|
121249
121928
|
|
|
121250
121929
|
```bash
|
|
121251
|
-
npm install @primereact/ui
|
|
121930
|
+
npm install @primereact/ui @primeuix/themes @primeicons/react
|
|
121252
121931
|
```
|
|
121253
121932
|
|
|
121254
121933
|
</DocStep>
|
|
@@ -121337,7 +122016,7 @@ Start from our <a href="https://github.com/primefaces/primereact-examples/tree/m
|
|
|
121337
122016
|
Install PrimeReact and a theme package using your favorite package manager:
|
|
121338
122017
|
|
|
121339
122018
|
```bash
|
|
121340
|
-
npm install @primereact/ui
|
|
122019
|
+
npm install @primereact/ui @primeuix/themes @primeicons/react
|
|
121341
122020
|
```
|
|
121342
122021
|
|
|
121343
122022
|
</DocStep>
|
|
@@ -121430,7 +122109,7 @@ Start from our <a href="https://github.com/primefaces/primereact-examples/tree/m
|
|
|
121430
122109
|
Install PrimeReact and a theme package using your favorite package manager:
|
|
121431
122110
|
|
|
121432
122111
|
```bash
|
|
121433
|
-
npm install @primereact/ui
|
|
122112
|
+
npm install @primereact/ui @primeuix/themes @primeicons/react
|
|
121434
122113
|
```
|
|
121435
122114
|
|
|
121436
122115
|
</DocStep>
|
|
@@ -123680,6 +124359,260 @@ Add a `.md` to a page’s URL to display a Markdown version of that page.
|
|
|
123680
124359
|
|
|
123681
124360
|
<Button as="a" href="/docs/overview/llms.md" target="_blank">Open /docs/overview/llms.md</Button>
|
|
123682
124361
|
|
|
124362
|
+
# MCP Server
|
|
124363
|
+
|
|
124364
|
+
Connect AI assistants to PrimeReact component documentation, guides, examples, setup, and API metadata.
|
|
124365
|
+
|
|
124366
|
+
## Introduction
|
|
124367
|
+
|
|
124368
|
+
[Model Context Protocol (MCP)](https://modelcontextprotocol.io/) lets AI assistants call external tools. The `@primereact/mcp` package uses those tools to search and read the PrimeReact documentation included with the package.
|
|
124369
|
+
|
|
124370
|
+
- Find components, guides, examples, setup instructions, and hooks.
|
|
124371
|
+
- Read mode-scoped component APIs and documentation sections.
|
|
124372
|
+
- Check component usage against documented properties and callbacks.
|
|
124373
|
+
- Return links to the related PrimeReact documentation when available.
|
|
124374
|
+
|
|
124375
|
+
The server requires Node.js 22 or newer. It is read-only and does not change your project files or PrimeReact configuration.
|
|
124376
|
+
|
|
124377
|
+
## CLI Setup
|
|
124378
|
+
|
|
124379
|
+
The recommended setup is the [PrimeReact Plugin](./plugin). It installs this MCP server together with the PrimeReact skills for implementation, setup, theming, accessibility, and troubleshooting.
|
|
124380
|
+
|
|
124381
|
+
```bash
|
|
124382
|
+
pnpm dlx @primeui/cli plugin install --tool copilot --library primereact
|
|
124383
|
+
pnpm dlx @primeui/cli doctor --tool copilot --library primereact
|
|
124384
|
+
```
|
|
124385
|
+
|
|
124386
|
+
Replace `copilot` with `claude`, `codex`, `gemini`, or `cursor` for another supported assistant. Use Manual Setup when you want the MCP server without the plugin skills.
|
|
124387
|
+
|
|
124388
|
+
## Manual Setup
|
|
124389
|
+
|
|
124390
|
+
### Claude Code
|
|
124391
|
+
|
|
124392
|
+
Add the server to your user configuration to use it in every project, or omit `-s user` for the current project only.
|
|
124393
|
+
|
|
124394
|
+
```bash
|
|
124395
|
+
claude mcp add primereact -s user -- npx -y @primereact/mcp
|
|
124396
|
+
```
|
|
124397
|
+
|
|
124398
|
+
See the [Claude Code MCP documentation](https://docs.anthropic.com/en/docs/claude-code/mcp) for client-specific options.
|
|
124399
|
+
|
|
124400
|
+
### VS Code
|
|
124401
|
+
|
|
124402
|
+
Create `.vscode/mcp.json` for project-level setup. To use the server across projects, add the same `servers` entry to your VS Code user MCP configuration.
|
|
124403
|
+
|
|
124404
|
+
```json
|
|
124405
|
+
{
|
|
124406
|
+
"servers": {
|
|
124407
|
+
"primereact": {
|
|
124408
|
+
"command": "npx",
|
|
124409
|
+
"args": ["-y", "@primereact/mcp"]
|
|
124410
|
+
}
|
|
124411
|
+
}
|
|
124412
|
+
}
|
|
124413
|
+
```
|
|
124414
|
+
|
|
124415
|
+
See the [VS Code MCP documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more details.
|
|
124416
|
+
|
|
124417
|
+
### OpenAI Codex
|
|
124418
|
+
|
|
124419
|
+
Add the server with the Codex CLI, or add the same configuration to `~/.codex/config.toml`.
|
|
124420
|
+
|
|
124421
|
+
```bash
|
|
124422
|
+
codex mcp add primereact -- npx -y @primereact/mcp
|
|
124423
|
+
```
|
|
124424
|
+
|
|
124425
|
+
```toml
|
|
124426
|
+
[mcp_servers.primereact]
|
|
124427
|
+
command = "npx"
|
|
124428
|
+
args = ["-y", "@primereact/mcp"]
|
|
124429
|
+
```
|
|
124430
|
+
|
|
124431
|
+
See the [OpenAI Codex MCP documentation](https://developers.openai.com/codex/mcp/) for more details.
|
|
124432
|
+
|
|
124433
|
+
### Cursor
|
|
124434
|
+
|
|
124435
|
+
Create `.cursor/mcp.json` in your project or `~/.cursor/mcp.json` for global configuration.
|
|
124436
|
+
|
|
124437
|
+
```json
|
|
124438
|
+
{
|
|
124439
|
+
"mcpServers": {
|
|
124440
|
+
"primereact": {
|
|
124441
|
+
"command": "npx",
|
|
124442
|
+
"args": ["-y", "@primereact/mcp"]
|
|
124443
|
+
}
|
|
124444
|
+
}
|
|
124445
|
+
}
|
|
124446
|
+
```
|
|
124447
|
+
|
|
124448
|
+
See the [Cursor MCP documentation](https://docs.cursor.com/context/model-context-protocol) for more details.
|
|
124449
|
+
|
|
124450
|
+
## Tools
|
|
124451
|
+
|
|
124452
|
+
The PrimeReact MCP server provides eight tools.
|
|
124453
|
+
|
|
124454
|
+
| Tool | Purpose |
|
|
124455
|
+
| ---------------- | ----------------------------------------------------------------------------------------- |
|
|
124456
|
+
| `list` | List available components, guides, examples, resources, or modes. |
|
|
124457
|
+
| `search` | Search generated component, guide, section, API, hook, and example text. |
|
|
124458
|
+
| `get_component` | Read mode-scoped component or hook documentation, API metadata, and available sections. |
|
|
124459
|
+
| `get_guide` | Read a generated PrimeReact guide and its source metadata. |
|
|
124460
|
+
| `get_example` | Return an example from a documented component or hook section. |
|
|
124461
|
+
| `get_setup` | Return setup guidance for a supported PrimeReact mode and environment. |
|
|
124462
|
+
| `validate_usage` | Validate component usage against generated PrimeReact API metadata in one selected mode. |
|
|
124463
|
+
| `version` | Report the server version and the status of its documentation data, tools, and resources. |
|
|
124464
|
+
|
|
124465
|
+
## Data and Validation
|
|
124466
|
+
|
|
124467
|
+
The MCP package includes a generated copy of the PrimeReact documentation. This keeps the server usable without a PrimeReact source checkout and makes its answers match the installed package version. Results include a `primeui://primereact` resource URI and, when available, a link to the public documentation.
|
|
124468
|
+
|
|
124469
|
+
- The tools do not edit files, install dependencies, or update configuration.
|
|
124470
|
+
- Component, setup, example, and validation calls stay in one selected mode: `styled`, `tailwind`, `primitive`, `headless`, or `hooks` where supported.
|
|
124471
|
+
- `validate_usage` checks documented API metadata. If the required metadata is unavailable or the mode is ambiguous, it reports that limitation instead of guessing.
|
|
124472
|
+
- Run your project type checks, tests, and browser checks after making changes. MCP validation does not replace them.
|
|
124473
|
+
|
|
124474
|
+
If you installed the PrimeReact Plugin, do not register the MCP server again with a manual configuration. Run the CLI `doctor` command if the server is missing or appears more than once.
|
|
124475
|
+
|
|
124476
|
+
# Plugin
|
|
124477
|
+
|
|
124478
|
+
Install PrimeReact workflow skills and the PrimeReact MCP server in a supported AI assistant.
|
|
124479
|
+
|
|
124480
|
+
## Introduction
|
|
124481
|
+
|
|
124482
|
+
The PrimeReact Plugin adds PrimeReact skills and the PrimeReact MCP server to Claude Code, Codex, GitHub Copilot, Cursor, or Gemini CLI. Plugins installed through GitHub Copilot CLI are also available in VS Code. Install the plugin when you want the assistant to follow PrimeReact-specific, mode-aware workflows as well as read the current component documentation.
|
|
124483
|
+
|
|
124484
|
+
The plugin is published from the [primefaces/primeui-plugins](https://github.com/primefaces/primeui-plugins) repository. Use `@primeui/cli` for the same installation flow across supported assistants, or follow the manual setup for your client.
|
|
124485
|
+
|
|
124486
|
+
## What It Installs
|
|
124487
|
+
|
|
124488
|
+
Installing the PrimeReact Plugin adds:
|
|
124489
|
+
|
|
124490
|
+
- Six focused skills covering routing, implementation, setup, theming, accessibility, and troubleshooting.
|
|
124491
|
+
- The PrimeReact MCP server, configured with `@primereact/mcp`.
|
|
124492
|
+
- The manifest required by the selected assistant.
|
|
124493
|
+
|
|
124494
|
+
PrimeVue and PrimeNG are separate plugins. Installing this plugin does not change your application or install PrimeReact dependencies in the project.
|
|
124495
|
+
|
|
124496
|
+
## Skills
|
|
124497
|
+
|
|
124498
|
+
Each skill covers one type of PrimeReact work. The skills use `@primereact/mcp` when they need mode-scoped component APIs, examples, setup guides, hooks, or usage validation.
|
|
124499
|
+
|
|
124500
|
+
| Skill | Use it for |
|
|
124501
|
+
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
124502
|
+
| `primereact-router` | Select the PrimeReact mode and choose the skill that matches the task. |
|
|
124503
|
+
| `primereact-component-implementation` | Choose and implement components, composition, properties, callbacks, and documented hooks. |
|
|
124504
|
+
| `primereact-setup-installation` | Configure a supported React environment in `styled`, `tailwind`, `primitive`, or `headless` mode. |
|
|
124505
|
+
| `primereact-theming-customization` | Work with styled presets and tokens, Tailwind-owned components, primitives, headless markup, or pass-through APIs without mixing modes. |
|
|
124506
|
+
| `primereact-accessibility-icons` | Review semantics, keyboard behavior, focus, accessible names, PrimeIcons, and custom icons in the selected mode. |
|
|
124507
|
+
| `primereact-audit-troubleshooting` | Find invalid APIs and troubleshoot components, setup, MCP, plugin, or duplicate configurations. |
|
|
124508
|
+
|
|
124509
|
+
The current PrimeReact v11 documentation does not provide a supported version migration guide, so the plugin does not advertise a migration workflow.
|
|
124510
|
+
|
|
124511
|
+
Skill names use the `primereact-` prefix because assistants may keep skills from several plugins in one shared namespace.
|
|
124512
|
+
|
|
124513
|
+
## How Skills Work
|
|
124514
|
+
|
|
124515
|
+
You do not need to select a skill manually. Describe the PrimeReact task and the router chooses the relevant workflow.
|
|
124516
|
+
|
|
124517
|
+
- The router checks that the project uses React and PrimeReact, then selects `styled`, `tailwind`, `primitive`, or `headless` from project evidence. It uses `hooks` only for a documented standalone hook.
|
|
124518
|
+
- The selected skill reads only the component or guide information needed for that mode.
|
|
124519
|
+
- When component metadata is available, the skill validates the final PrimeReact usage in the same mode.
|
|
124520
|
+
- If project evidence is ambiguous or the documentation does not confirm an API, the skill reports the limitation instead of borrowing guidance from another mode.
|
|
124521
|
+
|
|
124522
|
+
After implementation, run the checks required by your project, including type checking, tests, browser behavior, accessibility, and visual review where applicable.
|
|
124523
|
+
|
|
124524
|
+
## CLI Setup
|
|
124525
|
+
|
|
124526
|
+
Set `--tool` to the assistant you use. Keep `--library primereact` when you run the command outside a project or from a project that uses more than one PrimeUI library.
|
|
124527
|
+
|
|
124528
|
+
```bash
|
|
124529
|
+
pnpm dlx @primeui/cli plugin install --tool copilot --library primereact
|
|
124530
|
+
```
|
|
124531
|
+
|
|
124532
|
+
Supported tool values are `claude`, `codex`, `copilot`, `cursor`, and `gemini`. Use `copilot` for GitHub Copilot CLI and VS Code.
|
|
124533
|
+
|
|
124534
|
+
## Lifecycle and Doctor
|
|
124535
|
+
|
|
124536
|
+
Use the same CLI to check the installation, update the plugin, or remove it. Each command applies only to PrimeReact in the selected assistant.
|
|
124537
|
+
|
|
124538
|
+
```bash
|
|
124539
|
+
pnpm dlx @primeui/cli plugin status --tool copilot --library primereact
|
|
124540
|
+
pnpm dlx @primeui/cli plugin update --tool copilot --library primereact
|
|
124541
|
+
pnpm dlx @primeui/cli plugin remove --tool copilot --library primereact
|
|
124542
|
+
pnpm dlx @primeui/cli doctor --tool copilot --library primereact
|
|
124543
|
+
|
|
124544
|
+
# Machine-readable diagnostics
|
|
124545
|
+
pnpm dlx @primeui/cli doctor --tool copilot --library primereact --json
|
|
124546
|
+
```
|
|
124547
|
+
|
|
124548
|
+
Run `doctor` when the plugin or MCP server is not working as expected. It checks the installation, starts the MCP server, confirms the available tools, and tests documentation retrieval and component validation. Checks that an assistant does not expose are reported as unsupported.
|
|
124549
|
+
|
|
124550
|
+
## Manual Setup
|
|
124551
|
+
|
|
124552
|
+
### Source
|
|
124553
|
+
|
|
124554
|
+
Claude Code, Codex, and GitHub Copilot can install the plugin directly from the public marketplace. For manual Cursor or Gemini CLI setup, clone the repository to a location you intend to keep because those clients use the selected `plugins/primereact` directory after installation.
|
|
124555
|
+
|
|
124556
|
+
```bash
|
|
124557
|
+
git clone --branch main https://github.com/primefaces/primeui-plugins.git ~/primeui-plugins
|
|
124558
|
+
ls ~/primeui-plugins/plugins/primereact
|
|
124559
|
+
```
|
|
124560
|
+
|
|
124561
|
+
### Claude Code
|
|
124562
|
+
|
|
124563
|
+
Add the PrimeUI marketplace, then install only the PrimeReact plugin.
|
|
124564
|
+
|
|
124565
|
+
```bash
|
|
124566
|
+
claude plugin marketplace add primefaces/primeui-plugins
|
|
124567
|
+
claude plugin install primereact@primeui
|
|
124568
|
+
claude plugin list --json
|
|
124569
|
+
```
|
|
124570
|
+
|
|
124571
|
+
### Codex
|
|
124572
|
+
|
|
124573
|
+
Add the PrimeUI marketplace, inspect its catalog, then install only the PrimeReact plugin. Use the interactive plugin browser to manage enablement.
|
|
124574
|
+
|
|
124575
|
+
```bash
|
|
124576
|
+
codex plugin marketplace add primefaces/primeui-plugins
|
|
124577
|
+
codex plugin list --available
|
|
124578
|
+
codex plugin add primereact@primeui
|
|
124579
|
+
codex plugin list
|
|
124580
|
+
```
|
|
124581
|
+
|
|
124582
|
+
### VS Code Copilot
|
|
124583
|
+
|
|
124584
|
+
Install the PrimeReact Plugin through GitHub Copilot CLI. VS Code automatically discovers plugins installed by Copilot CLI, so it does not need a separate plugin configuration.
|
|
124585
|
+
|
|
124586
|
+
```bash
|
|
124587
|
+
copilot plugin marketplace add primefaces/primeui-plugins
|
|
124588
|
+
copilot plugin install primereact@primeui
|
|
124589
|
+
```
|
|
124590
|
+
|
|
124591
|
+
The installation includes the seven PrimeReact skills and the PrimeReact MCP server. See the [VS Code Agent Plugins](https://code.visualstudio.com/docs/agent-customization/agent-plugins) and [GitHub Copilot CLI Plugins](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/plugins-finding-installing) documentation for client-specific details.
|
|
124592
|
+
|
|
124593
|
+
### Cursor
|
|
124594
|
+
|
|
124595
|
+
For local setup, link the PrimeReact plugin directory into Cursor's local-plugin directory. Restart Cursor or run `Developer: Reload Window` after creating the link.
|
|
124596
|
+
|
|
124597
|
+
```bash
|
|
124598
|
+
mkdir -p ~/.cursor/plugins/local
|
|
124599
|
+
ln -s ~/primeui-plugins/plugins/primereact ~/.cursor/plugins/local/primereact
|
|
124600
|
+
```
|
|
124601
|
+
|
|
124602
|
+
Use Cursor's Customize screen to manage the plugin, its skills, and its MCP server.
|
|
124603
|
+
|
|
124604
|
+
### Gemini CLI
|
|
124605
|
+
|
|
124606
|
+
Validate the PrimeReact extension directory, then install it from the persistent checkout. Do not install from the repository root because it contains plugins for all three PrimeUI libraries.
|
|
124607
|
+
|
|
124608
|
+
```bash
|
|
124609
|
+
gemini extensions validate ~/primeui-plugins/plugins/primereact
|
|
124610
|
+
gemini extensions install ~/primeui-plugins/plugins/primereact --consent
|
|
124611
|
+
gemini extensions list --output-format json
|
|
124612
|
+
```
|
|
124613
|
+
|
|
124614
|
+
Gemini CLI 0.29.3 requires `experimental.extensionManagement` to be enabled. The installed extension contains the seven PrimeReact skills and the PrimeReact MCP server.
|
|
124615
|
+
|
|
123683
124616
|
# Custom Icons
|
|
123684
124617
|
|
|
123685
124618
|
PrimeReact components can be used with any icon library using the templating features.
|
|
@@ -123825,7 +124758,7 @@ export default function ColorDemo() {
|
|
|
123825
124758
|
|
|
123826
124759
|
## Spin
|
|
123827
124760
|
|
|
123828
|
-
Use a spin animation utility
|
|
124761
|
+
Use the `spin` property to apply a rotation animation to an icon. Alternatively, a spin animation utility such as `animate-spin` from Tailwind can also be used.
|
|
123829
124762
|
|
|
123830
124763
|
```tsx
|
|
123831
124764
|
import { Cog } from '@primeicons/react/cog';
|
|
@@ -123834,8 +124767,8 @@ import { Spinner } from '@primeicons/react/spinner';
|
|
|
123834
124767
|
export default function SpinDemo() {
|
|
123835
124768
|
return (
|
|
123836
124769
|
<div className="flex justify-center gap-4">
|
|
123837
|
-
<Spinner
|
|
123838
|
-
<Cog
|
|
124770
|
+
<Spinner spin size={32} />
|
|
124771
|
+
<Cog spin size={32} />
|
|
123839
124772
|
</div>
|
|
123840
124773
|
);
|
|
123841
124774
|
}
|
|
@@ -123943,7 +124876,7 @@ PrimeReact Tailwind components are distributed through a shadcn-compatible regis
|
|
|
123943
124876
|
Install PrimeReact along with the icon package and the Tailwind utilities the components rely on:
|
|
123944
124877
|
|
|
123945
124878
|
```bash
|
|
123946
|
-
npm install primereact
|
|
124879
|
+
npm install primereact @primeicons/react tailwindcss-primeui tailwind-merge
|
|
123947
124880
|
```
|
|
123948
124881
|
|
|
123949
124882
|
</DocStep>
|
|
@@ -124113,7 +125046,7 @@ PrimeReact Tailwind components are distributed through a shadcn-compatible regis
|
|
|
124113
125046
|
Install PrimeReact along with the icon package and the Tailwind utilities the components rely on:
|
|
124114
125047
|
|
|
124115
125048
|
```bash
|
|
124116
|
-
npm install primereact
|
|
125049
|
+
npm install primereact @primeicons/react tailwindcss-primeui tailwind-merge
|
|
124117
125050
|
```
|
|
124118
125051
|
|
|
124119
125052
|
</DocStep>
|
|
@@ -124283,7 +125216,7 @@ PrimeReact Tailwind components are distributed through a shadcn-compatible regis
|
|
|
124283
125216
|
Install PrimeReact along with the icon package and the Tailwind utilities the components rely on:
|
|
124284
125217
|
|
|
124285
125218
|
```bash
|
|
124286
|
-
npm install primereact
|
|
125219
|
+
npm install primereact @primeicons/react tailwindcss-primeui tailwind-merge
|
|
124287
125220
|
```
|
|
124288
125221
|
|
|
124289
125222
|
</DocStep>
|
|
@@ -124441,7 +125374,7 @@ PrimeReact Tailwind components are distributed through a shadcn-compatible regis
|
|
|
124441
125374
|
Install PrimeReact along with the icon package and the Tailwind utilities the components rely on:
|
|
124442
125375
|
|
|
124443
125376
|
```bash
|
|
124444
|
-
npm install primereact
|
|
125377
|
+
npm install primereact @primeicons/react tailwindcss-primeui tailwind-merge
|
|
124445
125378
|
```
|
|
124446
125379
|
|
|
124447
125380
|
</DocStep>
|
|
@@ -124603,7 +125536,7 @@ PrimeReact Tailwind components are distributed through a shadcn-compatible regis
|
|
|
124603
125536
|
Install PrimeReact along with the icon package and the Tailwind utilities the components rely on:
|
|
124604
125537
|
|
|
124605
125538
|
```bash
|
|
124606
|
-
npm install primereact
|
|
125539
|
+
npm install primereact @primeicons/react tailwindcss-primeui tailwind-merge
|
|
124607
125540
|
```
|
|
124608
125541
|
|
|
124609
125542
|
</DocStep>
|