ClassNames

ClassNames provides extended class binding functionality that is not possible with the native Angular directives.

import { ClassNamesModule } from 'primeng/classnames'

pClass directive accepts a string, array, object or any combination of these types with support for nesting. Angular's native class directive does not support combining multiple types with a single directive, nor white-space separated values in a single string.

Note: For Tailwind Users, it is recommended to use the classAttributes configuration for intellisense support.

pClass Directive
String
Array
Combined
Nested
Native Class Directive
String
Array
Combined
Templates
Highly customizable application templates to get started in no time with style. Designed and implemented by PrimeTek.