Configuring and using themes
The PrimeFaces components come with a default theme support called aristo and doesn't require any explicit configuration. If you want to use other themes you need to add those themes dependencies and configure them explicitly.
PrimeFaces themes are bundled as JAR files and we can download them from PrimeFaces Themes Repository http://repository.primefaces.org/org/primefaces/themes/.
Currently PrimeFaces provides the following list of community themes, which are free to use:
If you are using the Maven build tool you can add the boostrap
theme jar as a Maven dependency as follows:
<dependency> <groupId>org.primefaces.themes</groupId> <artifactId>bootstrap</artifactId> <version>1.0.10</version> </dependency>
In addition to these individual theme jars, PrimeFaces provides the all-themes
jar, which includes all the themes support. In Maven pom.xml
you can configure the all-themes
jar dependency as follows:
<...