@primevue/mcp 4.5.5 → 5.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +45 -21
- package/README.md +48 -250
- package/data/components.json +47269 -0
- package/data/llms/components/accordion.md +629 -0
- package/data/llms/components/animateonscroll.md +165 -0
- package/data/llms/components/autocomplete.md +995 -0
- package/data/llms/components/avatar.md +264 -0
- package/data/llms/components/badge.md +200 -0
- package/data/llms/components/blockui.md +99 -0
- package/data/llms/components/breadcrumb.md +269 -0
- package/data/llms/components/button.md +902 -0
- package/data/llms/components/card.md +209 -0
- package/data/llms/components/carousel.md +506 -0
- package/data/llms/components/cascadeselect.md +1207 -0
- package/data/llms/components/chart.md +1022 -0
- package/data/llms/components/checkbox.md +401 -0
- package/data/llms/components/chip.md +206 -0
- package/data/llms/components/colorpicker.md +213 -0
- package/data/llms/components/commandmenu.md +660 -0
- package/data/llms/components/compare.md +407 -0
- package/data/llms/components/confirmdialog.md +343 -0
- package/data/llms/components/confirmpopup.md +252 -0
- package/data/llms/components/contextmenu.md +522 -0
- package/data/llms/components/datatable.md +5266 -0
- package/data/llms/components/dataview.md +569 -0
- package/data/llms/components/datepicker.md +964 -0
- package/data/llms/components/deferredcontent.md +96 -0
- package/data/llms/components/dialog.md +702 -0
- package/data/llms/components/divider.md +152 -0
- package/data/llms/components/dock.md +488 -0
- package/data/llms/components/drawer.md +469 -0
- package/data/llms/components/dynamicdialog.md +214 -0
- package/data/llms/components/editor.md +205 -0
- package/data/llms/components/fieldset.md +253 -0
- package/data/llms/components/fileupload.md +459 -0
- package/data/llms/components/floatlabel.md +144 -0
- package/data/llms/components/fluid.md +104 -0
- package/data/llms/components/focustrap.md +59 -0
- package/data/llms/components/forms.md +344 -0
- package/data/llms/components/galleria.md +1119 -0
- package/data/llms/components/gallery.md +1003 -0
- package/data/llms/components/iconfield.md +283 -0
- package/data/llms/components/iftalabel.md +96 -0
- package/data/llms/components/image.md +179 -0
- package/data/llms/components/imagecompare.md +108 -0
- package/data/llms/components/inplace.md +183 -0
- package/data/llms/components/inputcolor.md +869 -0
- package/data/llms/components/inputgroup.md +419 -0
- package/data/llms/components/inputmask.md +345 -0
- package/data/llms/components/inputnumber.md +551 -0
- package/data/llms/components/inputotp.md +345 -0
- package/data/llms/components/inputpassword.md +738 -0
- package/data/llms/components/inputtags.md +432 -0
- package/data/llms/components/inputtext.md +569 -0
- package/data/llms/components/installation.md +1 -0
- package/data/llms/components/keyfilter.md +116 -0
- package/data/llms/components/knob.md +318 -0
- package/data/llms/components/label.md +151 -0
- package/data/llms/components/laravel.md +53 -0
- package/data/llms/components/listbox.md +636 -0
- package/data/llms/components/mask.md +203 -0
- package/data/llms/components/mcp.md +39 -0
- package/data/llms/components/megamenu.md +563 -0
- package/data/llms/components/menu.md +651 -0
- package/data/llms/components/menubar.md +446 -0
- package/data/llms/components/message.md +497 -0
- package/data/llms/components/metergroup.md +281 -0
- package/data/llms/components/multiselect.md +752 -0
- package/data/llms/components/orderlist.md +224 -0
- package/data/llms/components/organizationchart.md +418 -0
- package/data/llms/components/paginator.md +221 -0
- package/data/llms/components/panel.md +321 -0
- package/data/llms/components/panelmenu.md +703 -0
- package/data/llms/components/password.md +657 -0
- package/data/llms/components/picklist.md +286 -0
- package/data/llms/components/popover.md +145 -0
- package/data/llms/components/progressbar.md +242 -0
- package/data/llms/components/progressspinner.md +104 -0
- package/data/llms/components/radiobutton.md +427 -0
- package/data/llms/components/rating.md +312 -0
- package/data/llms/components/ripple.md +91 -0
- package/data/llms/components/scrollarea.md +700 -0
- package/data/llms/components/scrollpanel.md +131 -0
- package/data/llms/components/scrolltop.md +87 -0
- package/data/llms/components/select.md +1251 -0
- package/data/llms/components/selectbutton.md +268 -0
- package/data/llms/components/sidebar.md +2232 -0
- package/data/llms/components/skeleton.md +302 -0
- package/data/llms/components/slider.md +416 -0
- package/data/llms/components/speeddial.md +402 -0
- package/data/llms/components/splitbutton.md +840 -0
- package/data/llms/components/splitter.md +447 -0
- package/data/llms/components/stepper.md +551 -0
- package/data/llms/components/styleclass.md +226 -0
- package/data/llms/components/tabs.md +609 -0
- package/data/llms/components/tag.md +178 -0
- package/data/llms/components/terminal.md +123 -0
- package/data/llms/components/textarea.md +519 -0
- package/data/llms/components/tieredmenu.md +578 -0
- package/data/llms/components/timeline.md +494 -0
- package/data/llms/components/toast.md +472 -0
- package/data/llms/components/togglebutton.md +276 -0
- package/data/llms/components/toggleswitch.md +271 -0
- package/data/llms/components/toolbar.md +140 -0
- package/data/llms/components/tooltip.md +160 -0
- package/data/llms/components/tree.md +1076 -0
- package/data/llms/components/treeselect.md +660 -0
- package/data/llms/components/treetable.md +2493 -0
- package/data/llms/components/virtualscroller.md +265 -0
- package/data/llms/guides/autoimport.md +28 -0
- package/data/llms/guides/cdn.md +72 -0
- package/data/llms/guides/configuration.md +158 -0
- package/data/llms/guides/customicons.md +67 -0
- package/data/llms/guides/guides/accessibility.md +27 -0
- package/data/llms/guides/guides/animations.md +119 -0
- package/data/llms/guides/guides/rtl.md +7 -0
- package/data/llms/guides/icons.md +136 -0
- package/data/llms/guides/installation.md +3 -0
- package/data/llms/guides/laravel.md +66 -0
- package/data/llms/guides/llms.md +15 -0
- package/data/llms/guides/mcp.md +104 -0
- package/data/llms/guides/migration/v4.md +15 -0
- package/data/llms/guides/migration/v5.md +15 -0
- package/data/llms/guides/nuxt.md +141 -0
- package/data/llms/guides/passthrough.md +137 -0
- package/data/llms/guides/primeclt.md +43 -0
- package/data/llms/guides/tailwind.md +151 -0
- package/data/llms/guides/theming/styled.md +497 -0
- package/data/llms/guides/theming/unstyled.md +57 -0
- package/data/llms/guides/uikit.md +3 -0
- package/data/llms/guides/vite.md +90 -0
- package/data/llms/llms-full.txt +54465 -0
- package/data/llms/llms.txt +132 -0
- package/data/llms/pages/accessibility.md +27 -0
- package/data/llms/pages/animations.md +119 -0
- package/data/llms/pages/autoimport.md +28 -0
- package/data/llms/pages/cdn.md +72 -0
- package/data/llms/pages/configuration.md +158 -0
- package/data/llms/pages/contribution.md +31 -0
- package/data/llms/pages/customicons.md +67 -0
- package/data/llms/pages/designer.md +79 -0
- package/data/llms/pages/dynamicimports.md +7 -0
- package/data/llms/pages/forms.md +63 -0
- package/data/llms/pages/guides/accessibility.md +27 -0
- package/data/llms/pages/guides/animations.md +119 -0
- package/data/llms/pages/guides/rtl.md +7 -0
- package/data/llms/pages/icons.md +136 -0
- package/data/llms/pages/installation.md +3 -0
- package/data/llms/pages/introduction.md +23 -0
- package/data/llms/pages/laravel.md +66 -0
- package/data/llms/pages/llms.md +15 -0
- package/data/llms/pages/mcp.md +104 -0
- package/data/llms/pages/migration/v4.md +15 -0
- package/data/llms/pages/migration/v5.md +15 -0
- package/data/llms/pages/nuxt.md +141 -0
- package/data/llms/pages/passthrough.md +137 -0
- package/data/llms/pages/primeclt.md +43 -0
- package/data/llms/pages/rtl.md +7 -0
- package/data/llms/pages/setup.md +3 -0
- package/data/llms/pages/styled.md +497 -0
- package/data/llms/pages/tailwind.md +151 -0
- package/data/llms/pages/theming/styled.md +497 -0
- package/data/llms/pages/theming/unstyled.md +57 -0
- package/data/llms/pages/uikit.md +3 -0
- package/data/llms/pages/unstyled.md +57 -0
- package/data/llms/pages/v4.md +15 -0
- package/data/llms/pages/v5.md +15 -0
- package/data/llms/pages/vite.md +90 -0
- package/data/manifest.json +11117 -0
- package/data/mcp-data.json +55940 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.js +66066 -72541
- package/package.json +10 -12
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Custom Icons
|
|
2
|
+
|
|
3
|
+
PrimeVue components can be used with any icon library using the templating features.
|
|
4
|
+
|
|
5
|
+
## Material
|
|
6
|
+
|
|
7
|
+
Material icons is the official icon library based on Google Material Design.
|
|
8
|
+
|
|
9
|
+
```vue
|
|
10
|
+
<template>
|
|
11
|
+
<Select>
|
|
12
|
+
<template #dropdownicon>
|
|
13
|
+
<span class="material-icons">arrow_drop_down</span>
|
|
14
|
+
</template>
|
|
15
|
+
</Select>
|
|
16
|
+
</template>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## FontAwesome
|
|
20
|
+
|
|
21
|
+
Font Awesome is a popular icon library with a wide range of icons.
|
|
22
|
+
|
|
23
|
+
```vue
|
|
24
|
+
<template>
|
|
25
|
+
<Select>
|
|
26
|
+
<template #dropdownicon>
|
|
27
|
+
<i class="fa-light fa-chevron-down"></i>
|
|
28
|
+
</template>
|
|
29
|
+
</Select>
|
|
30
|
+
</template>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## SVG
|
|
34
|
+
|
|
35
|
+
Inline SVGs are embedded inside the dom.
|
|
36
|
+
|
|
37
|
+
```vue
|
|
38
|
+
<template>
|
|
39
|
+
<Select>
|
|
40
|
+
<template #dropdownicon>
|
|
41
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
42
|
+
<g id="chevron-down">
|
|
43
|
+
<path d="M12,15.25a.74.74,0,0,1-.53-.22l-5-5A.75.75,0,0,1,7.53,9L12,13.44,16.47,9A.75.75,0,0,1,17.53,10l-5,5A.74.74,0,0,1,12,15.25Z"/>
|
|
44
|
+
</g>
|
|
45
|
+
</svg>
|
|
46
|
+
</template>
|
|
47
|
+
</Select>
|
|
48
|
+
</template>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Image
|
|
52
|
+
|
|
53
|
+
Any type of image can be used as an icon.
|
|
54
|
+
|
|
55
|
+
```vue
|
|
56
|
+
<template>
|
|
57
|
+
<Select>
|
|
58
|
+
<template #dropdownicon>
|
|
59
|
+
<img alt="dropdown icon" src="/assets/icons/arrow_down.png">
|
|
60
|
+
</template>
|
|
61
|
+
</Select>
|
|
62
|
+
</template>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Video Tutorial
|
|
66
|
+
|
|
67
|
+
A video tutorial to demonstrate how to customize icons.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Terms and Conditions
|
|
2
|
+
|
|
3
|
+
Theme Designer is the ultimate tool to customize and design your own themes featuring a visual editor, Figma to theme code, cloud storage, and migration assistant.
|
|
4
|
+
|
|
5
|
+
## Dashboard
|
|
6
|
+
|
|
7
|
+
Dashboard is the entry point of the designer. The license key can be configured at this view before getting started with the full set of features. In the My Themes section, you're able to create a theme, and manage existing themes. A theme can be renamed, duplicated and downloaded using the button.
|
|
8
|
+
|
|
9
|
+
## License
|
|
10
|
+
|
|
11
|
+
A license key is required to be able to use all the services provided by the designer. Without a license, the visual editor is still available for trial purposes with various options such as downloads, and cloud storage disabled. The license key can be purchased at PrimeStore , it is valid for 1 year and needs to be renewed manually after a year.
|
|
12
|
+
|
|
13
|
+
## Limitations
|
|
14
|
+
|
|
15
|
+
Current known technical limitations are listed at this section. The border width token in Figma does not support multiple values, related issue .
|
|
16
|
+
|
|
17
|
+
## Migration Assistant
|
|
18
|
+
|
|
19
|
+
Prime UI libraries continue to evolve with each version. New tokens are likely to be added with each major release, in order to keep your themes up to date the migration assistant is available featuring automated migration. The Check for Updates option initially scans a theme for any missing tokens. This tool does not override the values of existing tokens, and only adds missing tokens if necessary. Still, it is recommended to duplicate your theme as a backup and run a preview before the migration. Depending on the result, you may choose to proceed with the migration process. In case there are missing tokens, your theme would receive them with placeholder values so it is recommended to take a note of them before migration and then visit the components to replace the placeholder values with actual values of your choice. These types of newly added tokens would be highlighed in Editor.
|
|
20
|
+
|
|
21
|
+
## Overview
|
|
22
|
+
|
|
23
|
+
The theming api is open and source freely available with an extensive documentation. Theme Designer is a tool build on top of this theming api with important features to make theming easier. Designer consists of 4 key features; The visual editor provides a UI to edit the complete set of tokens. The Figma to theme code generator is extremely useful to automate the design to code process and integrates seamlessly with the Figma UI Kit. The themes are saved in the cloud storage to be accessible from anywhere and any device and finally the migration assistant automatically updates your themes to the latest library version.
|
|
24
|
+
|
|
25
|
+
## Designer Api
|
|
26
|
+
|
|
27
|
+
Theme Designer public endpoint is hosted at PrimeUI Store. Get a Secret Key Visit the PrimeUI Store . Purchase an Extended License of Theme Designer. Navigate to your account settings . Generate a secret key for CI/CD integration. Authentication Define a Authentication: Bearer request header to configure your secret key. Parameters The request type must be POST . Name Type Required Description name string yes Name of the theme to be generated. tokens json yes Content of the json file exported from Figma. project string yes Name of the project, possible values are "primeng" or "primevue". config.font_size string no Font size for theme preview in visual editor at website, defaults to "14px". config.font_family string no Font family for theme preview in visual editor at website, defaults to "Inter Var" Example Response A successful response returns a zip file containing the source code of the generated theme preset. The content-type header of this type of response is application/zip . Error Handling When theme generation fails, a json response is returned with application/json content-type header. The response contains an error object with code and message .
|
|
28
|
+
|
|
29
|
+
## Figma
|
|
30
|
+
|
|
31
|
+
Tokens Studio in Figma is the starting point of a continuous integration pipeline. You can connect a remote repository to sync your tokens data so that changes are saved remotely instead of locally. Tokens Studio offers various remote storage options such as GitHub , GitLab and Bitbucket . Refer to these documentations based on your environment before proceeding to the integrations in the next section.
|
|
32
|
+
|
|
33
|
+
## Live Preview
|
|
34
|
+
|
|
35
|
+
After your CI pipeline completes successfully, your theme also becomes available in the Prime UI Theme Designer. Navigate to the Prime UI library website. Click the ⚙️ icon at topbar to open up Designer Editor. Sign in with your license key and pass key credentials. Then select your theme from the available options to apply it across all demos and website content. Note that CI-generated themes are provided in read-only mode for preview purposes only and cannot be edited within the Theme Designer. The Migration Assistant is available to identify any missing tokens in your preset; however, if tokens are missing, they must be added manually in Figma as needed.
|
|
36
|
+
|
|
37
|
+
## Overview
|
|
38
|
+
|
|
39
|
+
The Figma UI Kit and the theming api is fully synchorized, meaning the design tokens in Figma map to the corresponding properties in a theme preset. The Theme Designer offers a feature to create a theme by uploading a tokens.json file that is exported from the Tokens Studio plugin in Figma. Once the theme is converted, it can either be edited further in the visual editor or downloaded as a zip file to access the full code. Visit the Figma section at the designer documentation for more information. Manually exporting the tokens file from Figma and uploading it to the online designer tool may quickly become tedious in active development cycles. As a solution, theme designer provides a remote API that can be integrated into your CI pipeline.
|
|
40
|
+
|
|
41
|
+
## Video Tutorial
|
|
42
|
+
|
|
43
|
+
Before diving into the implementation details, if you would like to understand the final outcome and see how the solution operates, please refer to the video tutorial for a comprehensive walkthrough and demonstration.
|
|
44
|
+
|
|
45
|
+
## Bitbucket
|
|
46
|
+
|
|
47
|
+
The BitBucket integration is implemented by executing a custom pipe whenever the tokens file changes. 1. Add Secret Key to Repository Secrets Go to your BitBucket repository. Navigate to Repository Settings > Repository Variables . Give a name such as: THEME_DESIGNER_SECRET_KEY . Value: Your API key from Prime Theme Designer. Click Add . 2. Add the pipe configuration to your bitbucket-pipelines.yml Define the configuration parameters for the Designer API and add the pipe as a runnable script to the action. Notice that, the referenced pipe is executed as a script rather than a pipe from the BitBucket pipe registry as PrimeTek currently has no intentions to maintain an official pipe for BitBucket. You may further improve this example by building a dockerized pipe that is accessible in the BitBucket Registry to refer it with the pipe config in yml. 3. Test Integration Edit a token in Tokens Studio in Figma and click Push to BitBucket button to update the tokens file in your Git repository, triggering the configured BitBucket Pipe. The pipe then sends the updated file content to the Theme Designer API, receives the generated theme code, and commits the resulting changes back to your repository. An example repository is available at BitBucket that you may use as a starter.
|
|
48
|
+
|
|
49
|
+
## Git Hub
|
|
50
|
+
|
|
51
|
+
The prime-figma-to-theme-code-generator is a GitHub Action that is available on the marketplace. 1. Add Secret Key to Repository Secrets Go to your GitHub repository. Navigate to Settings > Secrets and variables > Actions . Click New repository secret . Give a name such as: THEME_DESIGNER_SECRET_KEY . Value: Your API key from Prime Theme Designer. Click Add secret . 2. Add the action to your .github/worklows Visit the inputs documentation for more details about the parameters such as the theme-name . 3. Test Integration Edit a token in Tokens Studio in Figma and click Push to GitHub button to update the tokens file in your Git repository, triggering the configured GitHub Action. The GitHub Action then sends the updated file content to the Theme Designer API, receives the generated theme code, and commits the resulting changes back to your repository. An example repository is available at GitHub that you may use as a starter.
|
|
52
|
+
|
|
53
|
+
## Git Lab
|
|
54
|
+
|
|
55
|
+
The GitLab integration is implemented by executing a script whenever the tokens file changes. 1. Add Secret Key to Repository Secrets Go to your GitLab repository. Navigate to Settings > CI/CD > Variables . Click Add variable . Give a name such as: THEME_DESIGNER_SECRET_KEY . Value: Your API key from Prime Theme Designer. Click Add variable . 2. Add the script to your project A sample script named figma-to-theme-converter.sh is available as a starter, copy and paste this script to your project. You may alter the script further per your requirements. 3. Add the script to your .gitlab-ci.yml Define the configuration parameters for the Designer API and add the script to the action. 4. Test Integration Edit a token in Tokens Studio in Figma and click Push to GitLab button to update the tokens file in your Git repository, triggering the configured GitLab Action. The GitLab Action then sends the updated file content to the Theme Designer API, receives the generated theme code, and commits the resulting changes back to your repository. An example repository is available at GitLab that you may use as a starter.
|
|
56
|
+
|
|
57
|
+
## Base
|
|
58
|
+
|
|
59
|
+
In the new theme section, all of the built-in themes are available to use as the base. These are; Aura , Material , Lara and Nora . Each have their own characteristics, and it is recommended to choose the one that best suits your requirements.
|
|
60
|
+
|
|
61
|
+
## Figma
|
|
62
|
+
|
|
63
|
+
For teams with UI designers, we recommend using PrimeOne Figma UI Kit for the design phase and utilizing the Theme Designer service to automate code generation during handoff. This workflow eliminates manual design-to-code translation, reducing implementation time and ensuring consistency between design and production. UI Kit v4 Automated Flow Recommended approach is using the PrimeUI Theme Generator Figma plugin which provides built-in synchronization capabilities that automate the theme generation process. Visit the plugin website to learn more about this workflow. Manual Flow Instead of generating themes directly from Figma using the plugin, for quick prototyping purposes, you may also choose to use to manually export a tokens json file and then upload it to the Theme Designer. Note that, this flow would get tedious and repetitive in active development cycles when compared to an automated flow. Open the PrimeOne UI Kit in which you've modified tokens. In the PrimeUI Theme Generator plugin, click the Export option to export all variable collections. When creating a new theme at Theme Designer, choose the Import Figma Variables option and import the json file. UI Kit v3 (Deprecated) CI Pipeline Recommended approach is setting up the CI Pipeline flow as manually exporting the tokens file from Figma and uploading it to the online designer tool may quickly become tedious in active development cycles. As a solution, theme designer provides a remote API that can be integrated into your flow. Visit the CI Pipeline documentation for comprehensive information and examples for GitHub, GitLab and BitBucket. Manual Flow Instead of setting a CI pipeline, for quick prototyping purposes, you may also choose to use to manually export a tokens json file and then upload it to the designer. Note that, this flow would get tedious and repetitive in active development cycles when compared to an automated CI pipeline. Open the PrimeOne UI Kit in which you've modified tokens. In the Tokens Studio plugin, navigate to the Tools menu and select Export to file/folder. When the Export tokens modal appears, make sure the Single file tab is selected. Check the All tokens sets option, then click Export . In case you utilize custom tokens, create a new token set named custom and define your tokens under this set to make sure they are also exported to the theme code. When creating a new theme at Theme Designer, choose the Import Figma Variables option and import the json file.
|
|
64
|
+
|
|
65
|
+
## Custom Tokens
|
|
66
|
+
|
|
67
|
+
Custom tokens allow bringing in your own design tokens to the theme to go beyond the built-in ones. A design token requires a name and a value where the value can be a static value like a color or another token. The name of the token should be a dot seperated lowercase value e.g. accent.color . For example, a custom token name can be defined as accent.color and the value can either be a value like #eab308 or another token such as {yellow.50} . Custom tokens can also refer to each other, e.g. selection.background custom token can define {accent.color} as a value. If you have created a theme from Figma, use the name custom as the name of your token set group. This keyword is special since the import tool will populate the custom tokens using this set in tokens json file.
|
|
68
|
+
|
|
69
|
+
## Intelligent Completion
|
|
70
|
+
|
|
71
|
+
The editor is packed with features for improved user experience. The input fields in the editor are capable of displaying a color preview when the value is a color, and beginning the value with a curly brace opens up the autocompletion feature to list the available tokens to choose from. The pi-sort-alt symbol over the input, transfers the token between the common tokens and color scheme specific tokens so that you are able to define tokens based on light and dark mode as well.
|
|
72
|
+
|
|
73
|
+
## Token Collections
|
|
74
|
+
|
|
75
|
+
The theming architecture is based on primitive, semantic and components tokens. The visual editor, displays a dedicated section for each collection. For basic purposes such as customizing the primary and surface colors, primitive and semantic sections would be more than enough. The component tokens are displayed per route so navigate to the component page first to view the tokens of the specific component.
|
|
76
|
+
|
|
77
|
+
## Typography
|
|
78
|
+
|
|
79
|
+
The components are not opinionated about the typography. Important properties such as the font family, font size, and line-height do not have design tokens since they can be inherited from the document. For preview purposes, the settings tab displays options to customize the base font and the font family of the document. These values are not available in the generated theme and need to be applied to your application at the document level.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Forms
|
|
2
|
+
|
|
3
|
+
The PrimeVue Forms library provides comprehensive form state management with built-in validation support.
|
|
4
|
+
|
|
5
|
+
## Accessibility
|
|
6
|
+
|
|
7
|
+
Screen Reader Form does not require any roles and attributes. Keyboard Support Component does not include any interactive elements.
|
|
8
|
+
|
|
9
|
+
## Basic
|
|
10
|
+
|
|
11
|
+
All PrimeVue form components are designed for seamless integration with the forms library. Instead of using the standard v-model , the name property is used to link a state object that tracks values, errors, and actions. The form component provides four key properties for state management.
|
|
12
|
+
|
|
13
|
+
## Download
|
|
14
|
+
|
|
15
|
+
Forms add-on is available for download on the npm registry.
|
|
16
|
+
|
|
17
|
+
## Dynamic
|
|
18
|
+
|
|
19
|
+
This section demonstrates how to create a dynamic form using a custom Form component. It showcases an example where form fields are generated dynamically based on the provided configuration, allowing for flexible form structures. The components named Dynamic* shown in this example are not built-in, and only available for sampling purposes. First form uses a declarative approach whereas second form goes for a programmatic approach. We suggest running this sample in StackBlitz to view the comprehensive implementation.
|
|
20
|
+
|
|
21
|
+
## Import
|
|
22
|
+
|
|
23
|
+
The form component is responsible for managing the form state and must encapsulate the form fields.
|
|
24
|
+
|
|
25
|
+
## Resolvers
|
|
26
|
+
|
|
27
|
+
Validations are implemented with the resolver property. A custom resolver is responsible for handling the validation and returning an errors object with key-value pairs where key is the form field name and value is an array of error object data. For productivity, we recommend using a schema validation library instead of building your own custom validation logic. The forms library provide built-in resolvers for popular options including Zod , Yup , Joi , Valibot , and Superstruct that can be imported from @primevue/forms/resolvers path.
|
|
28
|
+
|
|
29
|
+
## States
|
|
30
|
+
|
|
31
|
+
The $form object tracks the state management of the fields. Each field is linked with the name property. View the FormFieldState type in the API documentation for details about each property.
|
|
32
|
+
|
|
33
|
+
## Submit
|
|
34
|
+
|
|
35
|
+
The submit callback returns an object that encapsulates the form's validity, any existing errors, and its current state. This enables access to the form values, validation status, and any errors present at the time of submission. View the FormSubmitEvent in the API documentation for more information about the available event data.
|
|
36
|
+
|
|
37
|
+
## ValidateOn
|
|
38
|
+
|
|
39
|
+
Form component supports flexible validation triggers, allowing validation on value updates, blur events, form mount, or submission. These behaviors can be configured at form level or on specific fields via the validateOnValueUpdate , validateOnBlur , validateOnMount , and validateOnSubmit options of the formControl property. In this example, form disables validateOnValueUpdate and enables validateOnBlur at form level, and validates firstName on mount. The firstName field, overrides the form level setting locally.
|
|
40
|
+
|
|
41
|
+
## Built In
|
|
42
|
+
|
|
43
|
+
Although PrimeVue components have built-in support for the Form API, you may still prefer to utilize the components as wrapped with the FormField. This is a matter of preference, for example in case you are also using FormField for other 3rd party components, your own custom components, and native elements, for consistency it may be an option.
|
|
44
|
+
|
|
45
|
+
## FormField
|
|
46
|
+
|
|
47
|
+
The FormField is a helper component that provides validation and tracking for input elements, offering a more flexible structure to bind PrimeVue, non-PrimeVue components or native HTML elements to Form API. Additionally, with props like validateOn* , initialValue , resolver , and name , behaviors can be controlled directly from this component.
|
|
48
|
+
|
|
49
|
+
## Non Prime Vue
|
|
50
|
+
|
|
51
|
+
Form API is not strictly tied to PrimeVue components, providing a flexible way to manage validation and state for any native HTML elements, your own custom components or third-party libraries.
|
|
52
|
+
|
|
53
|
+
## Resolver
|
|
54
|
+
|
|
55
|
+
Each FormField can have its own dedicated resolver, allowing you to define custom validation logic for individual fields. This flexibility enables tailored validation rules, ensuring that each form field meets specific criteria.
|
|
56
|
+
|
|
57
|
+
## Template
|
|
58
|
+
|
|
59
|
+
It renders as a HTML div element, but this behavior can be modified using the as and asChild props to render different HTML elements or to pass a custom component, allowing for greater flexibility in form structure.
|
|
60
|
+
|
|
61
|
+
## Styled
|
|
62
|
+
|
|
63
|
+
Component does not apply any styling.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Accessibility
|
|
2
|
+
|
|
3
|
+
PrimeVue has WCAG level compliance, refer to the accessibility documentation of each component for detailed information.
|
|
4
|
+
|
|
5
|
+
## Introduction
|
|
6
|
+
|
|
7
|
+
According to the World Health Organization, 15% of the world population has a disability to some degree. As a result, accessibility features in any context such as a ramp for wheelchair users or a multimedia with captions are crucial to ensure content can be consumed by anyone. Types of disabilities are diverse so you need to know your audience well and how they interact with the content created. There four main categories; Visual Impairments Blindness, low-level vision or color blindness are the common types of visual impairments. Screen magnifiers and the color blind mode are usually built-in features of the browsers whereas for people who rely on screen readers, page developers are required to make sure content is readable by the readers. Popular readers are NVDA , JAWS and ChromeVox . Hearing Impairments Deafness or hearing loss refers to the inability to hear sounds totally or partially. People with hearing impairments use assistive devices however it may not be enough when interacting with a web page. Common implementation is providing textual alternatives, transcripts and captions for content with audio. Mobility Impairments People with mobility impairments have disabilities related to movement due to loss of a limb, paralysis or other varying reasons. Assistive technologies like a head pointer is a device to interact with a screen whereas keyboard or a trackpad remain as solutions for people who are not able to utilize a mouse. Cognitive Impairments Cognitive impairments have a wider range that includes people with learning disabilities, depression and dyslexia. A well designed content also leads to better user experience for people without disabilities so designing for cognitive impairments result in better design for any user.
|
|
8
|
+
|
|
9
|
+
## WCAG
|
|
10
|
+
|
|
11
|
+
Correct page structure with the aid of assistive technologies are the core ingridients for an accessible web content. HTML is based on an accessible foundation, form controls can be used by keyboard by default and semantic HTML is easier to be processed by a screen reader. WCAG refers to Web Content Accessibility Guideline , a standard managed by the WAI (Web Accessibility Initiative) of W3C (World Wide Web Consortium). WCAG consists of recommendations for making the web content more accessible. PrimeVue components aim high level of WCAG compliancy in the near future. Various countries around the globe have governmental policies regarding web accessibility as well. Most well known of these are Section 508 in the US and Web Accessibility Directive of the European Union.
|
|
12
|
+
|
|
13
|
+
## Form Controls
|
|
14
|
+
|
|
15
|
+
Native form elements should be preferred instead of elements that are meant for other purposes like presentation. As an example, button below is rendered as a form control by the browser, can receive focus via tabbing and can be used with space key as well to trigger.
|
|
16
|
+
|
|
17
|
+
## Semantic HTML
|
|
18
|
+
|
|
19
|
+
HTML offers various element to organize content on a web page that screen readers are aware of. Preferring Semantic HTML for good semantics provide out of the box support for reader which is not possible when regular div elements with classes are used. Consider the following example that do not mean too much for readers.
|
|
20
|
+
|
|
21
|
+
## WAI ARIA
|
|
22
|
+
|
|
23
|
+
ARIA refers to "Accessible Rich Internet Applications" is a suite to fill the gap where semantic HTML is inadequate. These cases are mainly related to rich UI components/widgets. Although browser support for rich UI components such as a datepicker or colorpicker has been improved over the past years many web developers still utilize UI components derived from standard HTML elements created by them or by other projects like PrimeVue. These types of components must provide keyboard and screen reader support, the latter case is where the WAI-ARIA is utilized. ARIA consists of roles, properties and attributes. Roles define what the element is mainly used for e.g. checkbox , dialog , tablist whereas States and Properties define the metadata of the element like aria-checked , aria-disabled . Consider the following case of a native checkbox. It has built-in keyboard and screen reader support.
|
|
24
|
+
|
|
25
|
+
## Colors
|
|
26
|
+
|
|
27
|
+
Colors on a web page should aim a contrast ratio of at least 4.5:1 and consider a selection of colors that do not cause vibration. Good Contrast Color contrast between the background and the foreground content should be sufficient enough to ensure readability. Example below displays two cases with good and bad samples. GOOD BAD Vibration Color vibration is leads to an illusion of motion due to choosing colors that have low visibility against each other. Color combinations need to be picked with caution to avoid vibration. VIBRATE Dark Mode Highly saturated colors should be avoided when used within a dark design scheme as they cause eye strain. Instead desaturated colors should be preferred. Indigo 500 Indigo 200
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Animations
|
|
2
|
+
|
|
3
|
+
Various PrimeVue Components utilize native CSS animations to provide an enhanced user experience. The default animations are based on the best practices recommended by the usability experts. In case you need to customize the default animations, this documentation covers the entire set of built-in animations.
|
|
4
|
+
|
|
5
|
+
## Introduction
|
|
6
|
+
|
|
7
|
+
Various PrimeVue Components utilize native CSS animations to provide an enhanced user experience. The default animations are based on the best practices recommended by the usability experts. In case you need to customize the default animations, this documentation covers the entire set of built-in animations. Animations are defined using a combination of style classes and keyframes. The .{classname}-enter-active and .{classname}-leave-active classes specify the animation name, duration, and easing function. You can customize animations globally by overriding the default animation classes, affecting all components. Alternatively, you can apply scoped classes to individual components to modify their animations independently. For demo purposes, this second approach is used throughout the next sections.
|
|
8
|
+
|
|
9
|
+
## Anchored Overlays
|
|
10
|
+
|
|
11
|
+
Anchored overlays are the components that have a floating ui positioned relatively to another element such as Select, Popover. The enter and leave animations are defined with the .p-anchored-overlay-enter-active and .p-anchored-overlay-leave-active classes.
|
|
12
|
+
|
|
13
|
+
```vue
|
|
14
|
+
.p-anchored-overlay-enter-active {
|
|
15
|
+
animation: demo-overlay-in 300ms ease-out;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.p-anchored-overlay-leave-active {
|
|
19
|
+
animation: demo-overlay-out 250ms ease-in;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@keyframes demo-overlay-in {
|
|
23
|
+
from {
|
|
24
|
+
opacity: 0;
|
|
25
|
+
transform: translateY(10%);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@keyframes demo-overlay-out {
|
|
30
|
+
to {
|
|
31
|
+
opacity: 0;
|
|
32
|
+
transform: translateY(10%);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Collapsibles
|
|
38
|
+
|
|
39
|
+
Collapsible components have a content that is toggleable including Accordion, Panel, Fieldset, Stepper and PanelMenu. The enter and leave animations are defined with the .p-collapsible-enter-active and .p-collapsible-leave-active classes.
|
|
40
|
+
|
|
41
|
+
```vue
|
|
42
|
+
.p-collapsible-enter-active {
|
|
43
|
+
animation: demo-collapsible-expand 500ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.p-collapsible-leave-active {
|
|
47
|
+
animation: demo-collapsible-collapse 500ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@keyframes demo-collapsible-expand {
|
|
51
|
+
from {
|
|
52
|
+
opacity: 0;
|
|
53
|
+
grid-template-rows: 0fr;
|
|
54
|
+
transform: scale(0.93);
|
|
55
|
+
}
|
|
56
|
+
to {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
grid-template-rows: 1fr;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@keyframes demo-collapsible-collapse {
|
|
63
|
+
from {
|
|
64
|
+
opacity: 1;
|
|
65
|
+
grid-template-rows: 1fr;
|
|
66
|
+
}
|
|
67
|
+
to {
|
|
68
|
+
opacity: 0;
|
|
69
|
+
grid-template-rows: 0fr;
|
|
70
|
+
transform: scale(0.93);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Dialog
|
|
76
|
+
|
|
77
|
+
Overlays such as Dialog and Drawer are positioned relative to the viewport and have their own animations.
|
|
78
|
+
|
|
79
|
+
```vue
|
|
80
|
+
.p-dialog-enter-active {
|
|
81
|
+
animation: demo-dialog-in 500ms ease-out;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.p-dialog-leave-active {
|
|
85
|
+
animation: demo-dialog-out 500ms ease-in;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@keyframes demo-dialog-in {
|
|
89
|
+
from {
|
|
90
|
+
opacity: 0;
|
|
91
|
+
transform: translateY(-10%) scale(1.1);
|
|
92
|
+
filter: blur(10px);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@keyframes demo-dialog-out {
|
|
97
|
+
to {
|
|
98
|
+
opacity: 0;
|
|
99
|
+
transform: translateY(200%) rotate(-90deg);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Disable
|
|
105
|
+
|
|
106
|
+
Individual animations can be reduced and even disabled completely using the animation duration.
|
|
107
|
+
|
|
108
|
+
```vue
|
|
109
|
+
@media (prefers-reduced-motion: reduce) {
|
|
110
|
+
.p-anchored-overlay-enter-active,
|
|
111
|
+
.p-anchored-overlay-leave-active {
|
|
112
|
+
animation-duration: 0s !important;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Reference
|
|
118
|
+
|
|
119
|
+
List of class names of the CSS animations used by the components. Component Enter Class Leave Class Accordion .p-collapsible-enter-active .p-collapsible-leave-active AutoComplete .p-anchored-overlay-enter-active .p-anchored-overlay-leave-active CascadeSelect .p-anchored-overlay-enter-active .p-anchored-overlay-leave-active ColorPicker .p-anchored-overlay-enter-active .p-anchored-overlay-leave-active ConfirmPopup .p-anchored-overlay-enter-active .p-anchored-overlay-leave-active ContextMenu .p-anchored-overlay-enter-active .p-anchored-overlay-leave-active DatePicker .p-anchored-overlay-enter-active .p-anchored-overlay-leave-active Dialog .p-dialog-enter-active .p-dialog-leave-active Drawer .p-drawer-enter-active .p-drawer-leave-active Fieldset .p-collapsible-enter-active .p-collapsible-leave-active Galleria .p-galleria-enter-active .p-galleria-leave-active Image .p-image-original-enter-active .p-image-original-leave-active Menu .p-anchored-overlay-enter-active .p-anchored-overlay-leave-active Message .p-message-enter-active .p-message-leave-active Modal Masks .p-overlay-mask-enter-active .p-overlay-mask-leave-active MultiSelect .p-anchored-overlay-enter-active .p-anchored-overlay-leave-active Panel .p-collapsible-enter-active .p-collapsible-leave-active PanelMenu .p-collapsible-enter-active .p-collapsible-leave-active Password .p-anchored-overlay-enter-active .p-anchored-overlay-leave-active Select .p-anchored-overlay-enter-active .p-anchored-overlay-leave-active Stepper .p-collapsible-enter-active .p-collapsible-leave-active TieredMenu .p-anchored-overlay-enter-active .p-anchored-overlay-leave-active TreeSelect .p-anchored-overlay-enter-active .p-anchored-overlay-leave-active
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# RTL Support
|
|
2
|
+
|
|
3
|
+
Right-to-left direction support of PrimeVue.
|
|
4
|
+
|
|
5
|
+
## Configuration
|
|
6
|
+
|
|
7
|
+
The PrimeVue components natively support Right-to-Left (RTL) text direction through a modern CSS implementation utilizing FlexBox and classes like *-inline-start and *-block-end . Consequently, no JavaScript configuration is necessary; setting the document's text direction to RTL is sufficient to enable this feature. The RTL setting can either be set using the dir attribute or with the direction style property.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Icons
|
|
2
|
+
|
|
3
|
+
@primeicons/vue is the default icon library of PrimeVue with over 300 icons as standalone Vue components developed by PrimeTek. The library is optional as PrimeVue components can use any icon with templating.
|
|
4
|
+
|
|
5
|
+
## Download
|
|
6
|
+
|
|
7
|
+
@primeicons/vue is available at npm, run the following command to download it to your project.
|
|
8
|
+
|
|
9
|
+
```vue
|
|
10
|
+
npm install @primeicons/vue
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Import
|
|
14
|
+
|
|
15
|
+
Each icon is a standalone Vue component. Import them individually for optimal tree-shaking, or use the named exports from the package root.
|
|
16
|
+
|
|
17
|
+
```vue
|
|
18
|
+
// Tree-shakeable, per-icon imports (recommended)
|
|
19
|
+
import Search from '@primeicons/vue/search';
|
|
20
|
+
import User from '@primeicons/vue/user';
|
|
21
|
+
|
|
22
|
+
// Named imports from the package root
|
|
23
|
+
import { Search, User, Check } from '@primeicons/vue';
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Figma
|
|
27
|
+
|
|
28
|
+
PrimeIcons library is now available on Figma Community . By adding them as a library, you can easily use these icons in your designs.
|
|
29
|
+
|
|
30
|
+
## Basic
|
|
31
|
+
|
|
32
|
+
Each icon is a standalone Vue component rendered as an inline SVG, displayed by importing it from @primeicons/vue and using it as a tag.
|
|
33
|
+
|
|
34
|
+
```vue
|
|
35
|
+
<template>
|
|
36
|
+
<Check />
|
|
37
|
+
<Times />
|
|
38
|
+
<Search />
|
|
39
|
+
<User />
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script setup>
|
|
43
|
+
import Check from '@primeicons/vue/check';
|
|
44
|
+
import Times from '@primeicons/vue/times';
|
|
45
|
+
import Search from '@primeicons/vue/search';
|
|
46
|
+
import User from '@primeicons/vue/user';
|
|
47
|
+
<\/script>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Size
|
|
51
|
+
|
|
52
|
+
Size of an icon is controlled with the size property that accepts a number in pixels or any CSS length value.
|
|
53
|
+
|
|
54
|
+
```vue
|
|
55
|
+
<template>
|
|
56
|
+
<Check :size="16" />
|
|
57
|
+
<Times :size="24" />
|
|
58
|
+
<Search :size="32" />
|
|
59
|
+
<User :size="40" />
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script setup>
|
|
63
|
+
import Check from '@primeicons/vue/check';
|
|
64
|
+
import Times from '@primeicons/vue/times';
|
|
65
|
+
import Search from '@primeicons/vue/search';
|
|
66
|
+
import User from '@primeicons/vue/user';
|
|
67
|
+
<\/script>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Color
|
|
71
|
+
|
|
72
|
+
Icon color is defined with the color property which is inherited from the parent with currentColor by default.
|
|
73
|
+
|
|
74
|
+
```vue
|
|
75
|
+
<template>
|
|
76
|
+
<Check color="slateblue" />
|
|
77
|
+
<Times color="green" />
|
|
78
|
+
<Search color="var(--p-primary-color)" />
|
|
79
|
+
<User color="#708090" />
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<script setup>
|
|
83
|
+
import Check from '@primeicons/vue/check';
|
|
84
|
+
import Times from '@primeicons/vue/times';
|
|
85
|
+
import Search from '@primeicons/vue/search';
|
|
86
|
+
import User from '@primeicons/vue/user';
|
|
87
|
+
<\/script>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Spin
|
|
91
|
+
|
|
92
|
+
Use a spin animation utility like animate-spin from Tailwind apply rotation.
|
|
93
|
+
|
|
94
|
+
```vue
|
|
95
|
+
<template>
|
|
96
|
+
<Spinner class="animate-spin" :size="32" />
|
|
97
|
+
<Cog class="animate-spin" :size="32" />
|
|
98
|
+
</template>
|
|
99
|
+
|
|
100
|
+
<script setup>
|
|
101
|
+
import Spinner from '@primeicons/vue/spinner';
|
|
102
|
+
import Cog from '@primeicons/vue/cog';
|
|
103
|
+
<\/script>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Programmatic
|
|
107
|
+
|
|
108
|
+
Icon components can be referenced programmatically by passing the component itself to APIs that accept an icon , such as the model of a Menu.
|
|
109
|
+
|
|
110
|
+
```vue
|
|
111
|
+
<template>
|
|
112
|
+
<div class="card flex justify-center">
|
|
113
|
+
<Menu :model="items" />
|
|
114
|
+
</div>
|
|
115
|
+
</template>
|
|
116
|
+
|
|
117
|
+
<script setup>
|
|
118
|
+
import { ref } from 'vue';
|
|
119
|
+
import Plus from '@primeicons/vue/plus';
|
|
120
|
+
import Download from '@primeicons/vue/download';
|
|
121
|
+
|
|
122
|
+
const items = ref([
|
|
123
|
+
{
|
|
124
|
+
label: 'File',
|
|
125
|
+
items: [
|
|
126
|
+
{ label: 'New', icon: Plus },
|
|
127
|
+
{ label: 'Open', icon: Download }
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
]);
|
|
131
|
+
<\/script>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## List
|
|
135
|
+
|
|
136
|
+
Here is the full list of icons available as Vue components. Click any icon to copy its import statement.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Introduction
|
|
2
|
+
|
|
3
|
+
Next-generation UI Component suite for Vue.
|
|
4
|
+
|
|
5
|
+
## Accessibility
|
|
6
|
+
|
|
7
|
+
PrimeVue has WCAG level compliance; each component has a dedicated accessibility section to document several aspects, including keyboard and screen reader support. Through communication channels such as GitHub or Discord, numerous accessibility experts worldwide continue to provide constant feedback to improve the accessibility features further. View the accessibility guide to learn more.
|
|
8
|
+
|
|
9
|
+
## Add Ons
|
|
10
|
+
|
|
11
|
+
PrimeVue does not require financial sponsorships from its community; instead, to be backed by a solid financial foundation, optional add-ons are offered. These include a Figma UI Kit, premium application templates, and reusable UI blocks called PrimeBlocks. The add-ons are optional and there is no paywall when using PrimeVue.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
PrimeVue is a complete UI suite for Vue.js consisting of a rich set of UI components, icons, blocks, and application templates. The project's primary goal is to boost developer productivity by offering reusable solutions that are easy to tune and customize as an in-house library. The project has been created by PrimeTek a world-renowned vendor of popular UI Component suites, including PrimeFaces , PrimeNG , and PrimeReact. All the members in our team are full time employees of PrimeTek who share the same passion and vision for open source to create awesome UI libraries. Depending on a 3rd party library may introduce risks if the library maintainers decide not to work on the project, however, this is not the case with PrimeVue as the track record of PrimeTek shows. For example, PrimeFaces has been maintained actively since 2008.
|
|
16
|
+
|
|
17
|
+
## Pass Through
|
|
18
|
+
|
|
19
|
+
PassThrough is an innovative API to provide access to the internal DOM elements to add arbitrary attributes. In general, traditional UI component libraries encapsulate UI and logic with limited APIs that makes the developers dependant on the library maintainer to extend this API by adding new props or events. With Pass Through this limitation has been eliminated since, you'll be able to access the internal of the components to add events and attributes. Some common use-cases are adding test attributes, additional aria attributes, custom events and styling.
|
|
20
|
+
|
|
21
|
+
## Theming
|
|
22
|
+
|
|
23
|
+
PrimeVue can be styled in two modes; styled or unstyled. Styled mode is based on pre-skinned components with opinionated theme variants of PrimeOne design like Aura, Lara or Nora presets. Unstyled mode on the other hand, leaves the styling to you while implementing the functionality and accessibility. Unstyled mode provides full control over the styling with no boundaries by implementing a pluggable architecture to utilize CSS libraries like Tailwind CSS, Bootstrap, Bulma or your own custom CSS. We've even further built the Volt UI library that styles the components with utility classes of Tailwind. This design is future proof as PrimeVue can be styled with any CSS library without actually depending on it in its core.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Install PrimeVue with Laravel
|
|
2
|
+
|
|
3
|
+
Setting up PrimeVue in a Laravel project.
|
|
4
|
+
|
|
5
|
+
## Download
|
|
6
|
+
|
|
7
|
+
PrimeVue is available for download on npm registry .
|
|
8
|
+
|
|
9
|
+
```vue
|
|
10
|
+
# Using npm
|
|
11
|
+
npm install primevue @primeuix/themes
|
|
12
|
+
|
|
13
|
+
# Using yarn
|
|
14
|
+
yarn add primevue @primeuix/themes
|
|
15
|
+
|
|
16
|
+
# Using pnpm
|
|
17
|
+
pnpm add primevue @primeuix/themes
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Plugin
|
|
21
|
+
|
|
22
|
+
PrimeVue plugin is required to be installed as an application plugin to set up the default configuration . The plugin is lightweight, and only utilized for configuration purposes.
|
|
23
|
+
|
|
24
|
+
```vue
|
|
25
|
+
import { createApp } from 'vue';
|
|
26
|
+
import PrimeVue from 'primevue/config';
|
|
27
|
+
|
|
28
|
+
const app = createApp(App);
|
|
29
|
+
app.use(PrimeVue);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Theme
|
|
33
|
+
|
|
34
|
+
Configure PrimeVue to use a theme like Aura.
|
|
35
|
+
|
|
36
|
+
```vue
|
|
37
|
+
import { createApp } from 'vue';
|
|
38
|
+
import PrimeVue from 'primevue/config';
|
|
39
|
+
import Aura from '@primeuix/themes/aura';
|
|
40
|
+
|
|
41
|
+
const app = createApp(App);
|
|
42
|
+
app.use(PrimeVue, {
|
|
43
|
+
theme: {
|
|
44
|
+
preset: Aura
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Verify
|
|
50
|
+
|
|
51
|
+
Verify your setup by adding a component such as Button . Each component can be imported and registered individually so that you only include what you use for bundle optimization. Import path is available in the documentation of the corresponding component.
|
|
52
|
+
|
|
53
|
+
```vue
|
|
54
|
+
import Button from "primevue/button"
|
|
55
|
+
|
|
56
|
+
const app = createApp(App);
|
|
57
|
+
app.component('Button', Button);
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Examples
|
|
61
|
+
|
|
62
|
+
We've created various samples for the popular options in the Vue ecosystem. Visit the primevue-examples repository for more samples including laravel-quickstart and inertia-quickstart .
|
|
63
|
+
|
|
64
|
+
## Next Steps
|
|
65
|
+
|
|
66
|
+
Welcome to the Prime UI Ecosystem! Once you have PrimeVue up and running, we recommend exploring the following resources to gain a deeper understanding of the library. Global configuration Auto imports with tree-shaking Customization of styles Pass through attributes Getting support
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# LLMs.txt
|
|
2
|
+
|
|
3
|
+
LLM-optimized documentation endpoints for PrimeVue components.
|
|
4
|
+
|
|
5
|
+
## /llms.txt
|
|
6
|
+
|
|
7
|
+
The llms.txt file is an industry standard that helps AI models better understand and navigate the PrimeVue documentation. It lists key pages in a structured format, making it easier for LLMs to retrieve relevant information. Open llms.txt
|
|
8
|
+
|
|
9
|
+
## /llms-full.txt
|
|
10
|
+
|
|
11
|
+
The llms-full.txt file is a complete list of all the pages in the PrimeVue documentation. It is used to help AI models understand the entire documentation set. Open llms-full.txt
|
|
12
|
+
|
|
13
|
+
## .md extension
|
|
14
|
+
|
|
15
|
+
Add a .md to a page's URL to display a Markdown version of that page. Open /button.md
|