• 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

PrimeFlex

PrimeFlex is a CSS utility library featuring various helpers such as a grid system, flexbox, spacing, elevation and more. Although it is not required, it is highly recommended to add PrimeFlex as it is likely to need such utilities when developing applications with PrimeFaces.

Install

PrimeFlex is available at GitHub. Download primeflex.min.css, add it to your application and include the path usign the h:outputStylesheet component.

PrimeFaces Showcase refers to version 4.0.0 of PrimeFlex.


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

Or use WebJars...


        <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" />
        

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


@import './src/_variables';
@import './src/_grid';
@import './src/_formlayout';
@import './src/_display';
@import './src/_text';
@import './src/flexbox/_flexbox';
@import './src/_spacing';
@import './src/_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 src/_variables 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 smaller screens such as desktop monitors. 1200px
$gutter Padding of a grid column. .5rem
$fieldMargin Spacing of a field. Can be vertical of horizontal depending on form layout. .5rem
$fieldLabelMargin Spacing of a field label. Can be vertical of horizontal depending on form layout. .5rem
$helperTextMargin Top spacing of a helper text. .5rem
$spacer Base value to use in spacing utilities, view spacing documentation for details. .5rem