Unstyled Mode

Theming PrimeVue with alternative styling approaches.

The term unstyled is used to define an alternative styling approach instead of the default theming with design tokens. In unstyled mode the css variables of the design tokens and the css rule sets that utilize them are not included. Here is an example of an Unstyled Select, the core functionality and accessibility is provided whereas styling is not included. Unstyled components still need to be styled on your end, in the next sections, we'll cover the styling solutions for both modes.

Unstyled mode is enabled for the whole suite by enabling unstyled option during PrimeVue installation.

Alternatively even in the default styled mode, a particular component can still be used as unstyled by adding the unstyled prop of the component.

setup-demo

Here is a sample that styles a button component with Tailwind CSS using pass through attributes. Before beginning, head over to the pass through section at button documentation to learn more about the components internals section. We'll style the root element with pass through attributes, and apply utility classes directly to the icon and label placed in the default slot.

example-demo

A global configuration can be created at application level to avoid repetition via the global pt option so that the styles can be shared from a single location. A particular component can still override a global configuration with its own pt property.

Theme Designer