### Install PrimeFlex Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Installs PrimeFlex version 2.0.0 using npm. This is the initial step for integrating PrimeFlex into an existing application. ```bash npm install primeflex@2.0.0 --save ``` -------------------------------- ### Flexbox Horizontal Spacing Example Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Example showing horizontal spacing using margin utilities in a flex container. ```html
``` -------------------------------- ### Flexbox Vertical Spacing Example Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Example demonstrating vertical spacing using margin utilities for items in a flex column. ```html
Item 1
Item 2
``` -------------------------------- ### PrimeFlex Display Utilities Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Shows examples of using PrimeFlex's display utility classes (p-d-*) for controlling element display properties, including responsive variations based on screen size breakpoints (sm, md, lg, xl) and print visibility. ```html
Displayed as inline.
Displayed as a flexbox container.
Inline for larger screens and block for others.
Visible on a Small Screen
Hidden on a Small Screen
Only visible when printed.
Not available for printing.
``` -------------------------------- ### PrimeFlex 12-Column Grid Layouts Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Illustrates the PrimeFlex 12-column grid system. Columns can be defined with specific widths using 'p-col-{number}' classes. This example shows a column taking 4 units of space, with others auto-adjusting, and another example with explicit column widths. ```html
4
1
1
1
1
1
1
1
1
2
6
4
``` -------------------------------- ### Flexbox Align Self Example Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Demonstrates the usage of 'align-self' classes to control individual item alignment within a flex container. ```html
Start
Center
End
Stretch
``` -------------------------------- ### Nested Columns Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Columns can be nested within each other to create more complex and structured layouts. This example shows a main 8-column layout containing its own grid. ```html
6
6
12
4
``` -------------------------------- ### PrimeFlex Flexbox Align Items Classes Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Aligns flex items along the cross axis of the container. Options include start, end, center, baseline, and stretch, with responsive variations available. ```html
Item 1
Item 2
``` ```html
Item 1
Item 2
``` -------------------------------- ### PrimeFlex Flexbox Justify Content Classes Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Aligns flex items along the main axis of the container. Supports various alignment options like start, end, center, between, around, and evenly, with responsive variants. ```html
Item 1
Item 2
``` ```html
Item 1
Item 2
``` -------------------------------- ### Import PrimeFlex CSS Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Demonstrates two methods for including PrimeFlex CSS in an application: via a CDN link or through an import statement for bundlers. ```html ``` ```javascript import 'primeflex/primeflex.css'; ``` -------------------------------- ### Responsive Form Layout with PrimeFlex Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Implements a responsive form layout using PrimeFlex utility classes. It demonstrates how to structure form fields for different screen sizes, ensuring a consistent user experience across devices. ```html
``` -------------------------------- ### FormLayout Vertical Grid Layout Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Illustrates how to create a multi-column vertical form layout using '.p-formgrid' and '.p-grid' for responsive design. ```html
``` -------------------------------- ### Basic PrimeFlex Grid System Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Demonstrates the fundamental PrimeFlex grid system. A container with the 'p-grid' class and child elements with 'p-col' class create a basic flexbox-based layout where columns share space equally. ```html
1
2
3
``` -------------------------------- ### PrimeFlex Responsive Grid Layouts by Breakpoint Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Illustrates responsive design in PrimeFlex using breakpoint-specific classes. Columns adapt their layout based on screen size: 'p-col-12' for all sizes, 'p-md-6' for medium devices, and 'p-lg-3' for large screens, resulting in 4 columns. ```html
A
B
C
D
``` -------------------------------- ### PrimeFlex Elevation Utility Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Demonstrates how to apply elevation styles to elements using the p-shadow-{level} classes, with levels ranging from 1 to 24. ```html
``` ```html
``` -------------------------------- ### PrimeFlex Flexbox Container Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Illustrates how to define an element as a flexbox container using either the p-d-flex or p-d-inline-flex utility classes. ```html
Flex Container
Inline Flex Container
``` -------------------------------- ### FormLayout Basic Structure Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Shows the fundamental structure of a form field using the '.p-field' class to wrap labels and inputs. ```html
``` -------------------------------- ### Spacing Utilities Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Spacing utilities use the p-{property}{position}-{value} syntax for general spacing and p-{property}{position}-{breakpoint}-{value} for responsive spacing. Properties include margin (m) and padding (p), positions cover all sides (blank), specific sides (t, b, l, r), or axes (x, y). Values range from 0 to 6, with 'auto' available for margins. ```html
Margin bottom with level 2
Margin top with level 4
Margin for all sides with level 2
Auto margins for left and right side
Padding bottom with level 4
Padding for all sides with level 1
Level 3 spacing for lg screens and level 1 for smaller screens (xs).
``` -------------------------------- ### PrimeFlex Flexbox Order Classes Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Provides classes to control the order of flex items within a container. Supports responsive adjustments based on screen size. Uses the 'order' CSS property. ```html
Item 1
Item 2
Item 3
``` ```html
Item 1
Item 2
Item 3
``` -------------------------------- ### PrimeFlex Flexbox Wrap Classes Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Controls how flex items wrap within a container when there isn't enough space. Includes options for nowrap, wrap, and wrap-reverse, with responsive variants. ```html
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
``` ```html
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
``` ```html
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
``` -------------------------------- ### Input Field with Helper Text Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Shows how to add helper text to an input field using a `` tag with an `id` that is referenced by the input's `aria-describedby` attribute. The `.p-field` and `.p-fluid` classes are used for form structure. ```html
Enter your username to reset your password.
``` -------------------------------- ### Inline Form Layout Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Implements an inline form layout using the `.p-formgroup-inline` class. It includes input fields and a submit button on the same row. The `.p-sr-only` class is used for screen reader accessibility on labels. ```html
``` -------------------------------- ### Text Alignment Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Text alignment utilities provide options for left, center, right, and justify alignment for text content within elements. ```html
Left
Center
Right
Justify
``` -------------------------------- ### FormLayout Vertical Fluid Layout Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Demonstrates a vertical form layout where components automatically occupy full width when within a '.p-fluid' container. ```html
``` -------------------------------- ### Horizontal Form with Fixed Width Labels Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Demonstrates a horizontal form layout where labels have a fixed width, and input fields occupy the remaining space. This is achieved using `.p-col-fixed` for labels and `.p-col` for input containers. ```html
``` -------------------------------- ### Text Style Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Text style utilities apply font weight and style changes, including bold, normal, light, and italic. ```html
Bold
Normal
Light
Italic
``` -------------------------------- ### Horizontal Form with Fluid Layout Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Shows a fluid horizontal form layout by applying the `.p-fluid` class to the form container and using responsive grid classes like `.p-col-12` and `.p-md-10` for input elements. ```html
``` -------------------------------- ### PrimeFlex Multi-Line Grid Behavior Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Shows how PrimeFlex handles multi-line layouts. When the total column width exceeds the container's width (e.g., two 'p-col-6' columns on a line), subsequent columns wrap to the next line. ```html
6
6
6
6
``` -------------------------------- ### Text Wrapping Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Text wrapping utilities control how text behaves when it exceeds its container's width. Options include nowrap, wrap, and truncate. ```html
Long text wraps and does not overlow.
Long text does not wrap and overflows the parent.
Long text does not wrap and overflows the parent.
``` -------------------------------- ### Vertical and Horizontal Checkbox Layouts Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Demonstrates layout options for checkboxes. Vertical layout uses `.p-field-checkbox`, while horizontal layout combines `.p-formgroup-inline` with `.p-field-checkbox`. ```html

Vertical Checkbox

Horizontal Checkbox

``` -------------------------------- ### Vertical and Horizontal RadioButton Layouts Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Illustrates layout options for radio buttons. Vertical layout uses `.p-field-radiobutton`, and horizontal layout uses `.p-formgroup-inline` with `.p-field-checkbox` (note: `.p-field-checkbox` is used here for styling consistency with checkboxes in inline groups). ```html

Vertical RadioButton

Horizontal RadioButton

``` -------------------------------- ### PrimeFlex Fixed Width Column Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Demonstrates how to create a column with a fixed width in PrimeFlex. Applying the 'p-col-fixed' class to a column allows it to maintain its specified width while other sibling columns adjust automatically. ```html
Fixed
Auto
``` -------------------------------- ### Offset Columns Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Offset classes are used to define a left margin on a column, avoiding empty columns for spacing. Classes range from p-col-offset-1 to p-col-offset-12 and have responsive variants for different screen sizes. ```html
6
4
4
``` -------------------------------- ### Gutter Control Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 PrimeFlex applies a .5rem padding to columns, creating gutters. These gutters can be removed by applying the .p-nogutter class to the container or individual columns. ```html
1
2
3
``` -------------------------------- ### PrimeFlex Flexbox Direction Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Shows how to control the direction of flex items within a flex container using p-flex-{direction} classes (row, row-reverse, column, column-reverse), including responsive adjustments. ```html
Item 1
Item 2
Item 3
``` ```html
Item 1
Item 2
Item 3
``` ```html
Item 1
Item 2
Item 3
``` -------------------------------- ### Text Transformation Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Text transformation utilities allow changing the case of text to lowercase, uppercase, or capitalize. ```html
LOWERCASE
uppercase
capitalize
``` -------------------------------- ### PrimeFlex Flexbox Direction Classes Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Defines classes for controlling flex container direction (row, column) and their responsive variants. These classes set the 'flex-direction' CSS property. ```css .p-flex-row { flex-direction: row !important; } .p-flex-row-reverse { flex-direction: row-reverse !important; } .p-flex-column { flex-direction: column !important; } .p-flex-column-reverse { flex-direction: column-reverse !important; } /* Responsive variants */ .p-flex-sm-row { flex-direction: row !important; } .p-flex-sm-row-reverse { flex-direction: row-reverse !important; } .p-flex-sm-column { flex-direction: column !important; } .p-flex-sm-column-reverse { flex-direction: column-reverse !important; } .p-flex-md-row { flex-direction: row !important; } .p-flex-md-row-reverse { flex-direction: row-reverse !important; } .p-flex-md-column { flex-direction: column !important; } .p-flex-md-column-reverse { flex-direction: column-reverse !important; } .p-flex-lg-row { flex-direction: row !important; } .p-flex-lg-row-reverse { flex-direction: row-reverse !important; } .p-flex-lg-column { flex-direction: column !important; } .p-flex-lg-column-reverse { flex-direction: column-reverse !important; } .p-flex-xl-row { flex-direction: row !important; } .p-flex-xl-row-reverse { flex-direction: row-reverse !important; } .p-flex-xl-column { flex-direction: column !important; } .p-flex-xl-column-reverse { flex-direction: column-reverse !important; } ``` -------------------------------- ### Flexbox Align Content Classes Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Classes for controlling the alignment of flex lines along the cross axis. ```css .p-ac-start { align-content: flex-start; } .p-ac-end { align-content: flex-end; } .p-ac-center { align-content: center; } .p-ac-around { align-content: space-around; } .p-ac-stretch { align-content: stretch; } .p-ac-between { align-content: space-between; } /* Responsive variants */ .p-ac-sm-start { align-content: flex-start; } .p-ac-sm-end { align-content: flex-end; } .p-ac-sm-center { align-content: center; } .p-ac-sm-around { align-content: space-around; } .p-ac-sm-stretch { align-content: stretch; } .p-ac-sm-between { align-content: space-between; } .p-ac-md-start { align-content: flex-start; } .p-ac-md-end { align-content: flex-end; } .p-ac-md-center { align-content: center; } .p-ac-md-around { align-content: space-around; } .p-ac-md-stretch { align-content: stretch; } .p-ac-md-between { align-content: space-between; } .p-ac-lg-start { align-content: flex-start; } .p-ac-lg-end { align-content: flex-end; } .p-ac-lg-center { align-content: center; } .p-ac-lg-around { align-content: space-around; } .p-ac-lg-stretch { align-content: stretch; } .p-ac-lg-between { align-content: space-between; } .p-ac-xl-start { align-content: flex-start; } .p-ac-xl-end { align-content: flex-end; } .p-ac-xl-center { align-content: center; } .p-ac-xl-around { align-content: space-around; } .p-ac-xl-stretch { align-content: stretch; } .p-ac-xl-between { align-content: space-between; } ``` -------------------------------- ### Flexbox Align Items Classes Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Classes for controlling the alignment of flex items along the cross axis. ```css .p-ai-start { align-items: flex-start; } .p-ai-end { align-items: flex-end; } .p-ai-center { align-items: center; } .p-ai-baseline { align-items: baseline; } .p-ai-strech { align-items: stretch; } /* Responsive variants */ .p-ai-sm-start { align-items: flex-start; } .p-ai-sm-end { align-items: flex-end; } .p-ai-sm-center { align-items: center; } .p-ai-sm-baseline { align-items: baseline; } .p-ai-sm-strech { align-items: stretch; } .p-ai-md-start { align-items: flex-start; } .p-ai-md-end { align-items: flex-end; } .p-ai-md-center { align-items: center; } .p-ai-md-baseline { align-items: baseline; } .p-ai-md-strech { align-items: stretch; } .p-ai-lg-start { align-items: flex-start; } .p-ai-lg-end { align-items: flex-end; } .p-ai-lg-center { align-items: center; } .p-ai-lg-baseline { align-items: baseline; } .p-ai-lg-strech { align-items: stretch; } .p-ai-xl-start { align-items: flex-start; } .p-ai-xl-end { align-items: flex-end; } .p-ai-xl-center { align-items: center; } .p-ai-xl-baseline { align-items: baseline; } .p-ai-xl-strech { align-items: stretch; } ``` -------------------------------- ### Flexbox Align Self Classes Source: https://github.com/primefaces/primeflex/wiki/PrimeFlex-v2 Classes for controlling the alignment of a flex item along the cross axis. ```css .p-as-start { align-self: flex-start; } .p-as-end { align-self: flex-end; } .p-as-center { align-self: center; } .p-as-baseline { align-self: baseline; } .p-as-strech { align-self: stretch; } /* Responsive variants */ .p-as-sm-start { align-self: flex-start; } .p-as-sm-end { align-self: flex-end; } .p-as-sm-center { align-self: center; } .p-as-sm-baseline { align-self: baseline; } .p-as-sm-strech { align-self: stretch; } .p-as-md-start { align-self: flex-start; } .p-as-md-end { align-self: flex-end; } .p-as-md-center { align-self: center; } .p-as-md-baseline { align-self: baseline; } .p-as-md-strech { align-self: stretch; } .p-as-lg-start { align-self: flex-start; } .p-as-lg-end { align-self: flex-end; } .p-as-lg-center { align-self: center; } .p-as-lg-baseline { align-self: baseline; } .p-as-lg-strech { align-self: stretch; } .p-as-xl-start { align-self: flex-start; } .p-as-xl-end { align-self: flex-end; } .p-as-xl-center { align-self: center; } .p-as-xl-baseline { align-self: baseline; } .p-as-xl-strech { align-self: stretch; } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.