• Settings
    • Locale
    • Change the locale of the datepicker, schedule and client side validation messages.

      Language
      English
      English
      English
      French
      German
      German
      German
      Italian
      Korean
      Spanish
      Catalan
      Dutch
      Portuguese
      Portuguese
      Arabic
      Arabic
      Bulgarian
      Bangla
      Bosnian
      Czech
      Greek
      Estonian
      Persian
      Finnish
      Danish
      Hindi
      Indonesian
      Icelandic
      Croatian
      Japanese
      Hungarian
      Hebrew
      Georgian
      Central Kurdish
      Khmer
      Kyrgyz
      Kazakh
      Lithuanian
      Latvian
      Malay
      Norwegian
      Polish
      Romanian
      Russian
      Slovak
      Slovenian
      Serbian
      Serbian
      Swedish
      Thai
      Turkish
      Ukrainian
      Uzbek
      Vietnamese
      Chinese
      Chinese
  • Resources
Theme
Theme
Preset primefaces.THEME
Apple Liquid Glass style: translucent overlays, menus and bars that blur the page behind them, capsule buttons.
Color scheme color-scheme
Input style p-input-filled
Density data-p-density
Direction primefaces.DIR
Colors
Primary --p-primary-base
Surface --p-surface-*
Shape and motion
Button shape --p-button-border-radius
Shadows --p-*-shadow
Animations --p-transition-duration
Ripple --p-ripple-opacity
Border radius --p-border-radius-*
Typography
Focus ring
Form field
CSS
Only the tokens that differ from the preset.

                        
                    

PrimeFlex

PrimeFlex is a CSS utility library featuring various helpers such as a grid system, flexbox, spacing, elevation and more.

PrimeFlex is not required, but it is highly recommended to add it, as such utilities are likely to be needed when developing applications with PrimeFaces. The PrimeFaces Showcase uses version 4.0.0 of PrimeFlex.

Install

The easiest way is the WebJar: add the dependency and include the stylesheet with the h:outputStylesheet component.


<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>primeflex</artifactId>
    <version>4.0.0</version>
</dependency>


<h:outputStylesheet library="webjars" name="primeflex/4.0.0/primeflex.min.css" />

Alternatively, PrimeFlex is available at GitHub. Download primeflex.min.css, add it to the resources of your application and include its path.


<h:outputStylesheet name="%YOUR_PATH%/primeflex.min.css" />

Custom Build

PrimeFlex is a lightweight library, still it is possible to pick the utilities you need to make the file even smaller. For this, remove the imports you do not need from primeflex.scss and create your own build by compiling it with SASS. For example, if you do not use the elevation utilities, comment the import out and build your own file. Note that the sass cli has to be available in your system, refer to the documentation for details.


@import './core/_variables';
@import './core/_mixins';
@import './core/_grid';
@import './core/_formlayout';
@import './core/_display';
@import './core/_typography';
@import './core/_flexbox';
@import './core/_spacing';
// @import './core/_elevation';
...


sass --update primeflex.scss:primeflex.min.css --style compressed

Variables

Predefined values like breakpoints can be customized when creating your own build using the core/_variables.scss file.

Variable Description Default
$sm Breakpoint of screens such as phones. 576px
$md Breakpoint of screens such as tablets. 768px
$lg Breakpoint of screens such as notebook monitors. 992px
$xl Breakpoint of larger screens such as desktop monitors. 1200px
$gutter Padding of a grid column. .5rem
$fieldMargin Spacing of a field. Can be vertical or horizontal depending on form layout. 1rem
$fieldLabelMargin Spacing of a field label. Can be vertical or horizontal depending on form layout. .5rem
$helperTextMargin Top spacing of a helper text. .25rem
$spacer Base value to use in spacing utilities, view spacing documentation for details. 1rem