Getting Started with PrimeUI is a straightforward process.
PrimeUI is available via bower and npm.
bower install primeui
npm install primeui
PrimeUI is distributed in a zip file that is available at github releases. Once you download the file and extract it in filesystem, you'd see two folders named development and production. Development folder has the uncompressed and the Production folder has the compressed distribution.
Although you can include resources of each widget individually, it is suggested to use the primeui.min.js and primeui.min.css file to register all the widgets at once. As PrimeUI is jQuery UI based, you also need to include jQuery and jQuery UI Core. PrimeUI does not the whole jQuery UI distribution, only core and utilities are needed. In addition, PrimeUI uses FontAwesome for the icons. Some components have images so place the images folder at the same location with primeui css file.
<head> <link rel="stylesheet" href="%PATH%/theme.css" /> <link rel="stylesheet" type="text/css" href="%PATH%/font-awesome.css" /> <link rel="stylesheet" href="%PATH%/jquery-ui.css" /> <link rel="stylesheet" href="%PATH%/primeui.min.css" /> <script type="text/javascript" src="%PATH%/jquery.js"></script> <script type="text/javascript" src="%PATH%/jquery-ui.js"></script> <script type="text/javascript" src="%PATH%/primeui.min.js"></script> </head>
In order to use PrimeElements, add X-Tag library that also includes the pollyfill for custom elements.
<script type="text/javascript" src="%PATH%/x-tag-core.min.js"></script> <script type="text/javascript" src="%PATH%/primeelements-3.0.js"></script>
Some of the widgets like DataGrid offer an alternative way to define custom content called Mustache.js. Please refer to the project homepage for download.
<script type="text/javascript" src="%PATH%/mustache.min.js"></script>