@primereact/styles
v11.0.0
Published
Styles for PrimeReact components.
Downloads
4,127
Keywords
Readme
PrimeReact Styles
Component styles for PrimeReact. Each component's style module maps props and state to CSS class names using design tokens from the active preset, resolved at runtime by @primeuix/styled.
How it works
Styles are defined as JavaScript objects rather than static CSS. Class names are computed from component state, so a button with severity="danger" and outlined gets the right combination of classes without any manual toggling:
import { ButtonStyle } from '@primereact/styles/button';
// ButtonStyle.root({ instance, props }) → 'p-button p-button-danger p-button-outlined'All class names follow the .p- prefix convention (p-button, p-datatable, p-dialog-header). The @primeuix/styled runtime resolves dt('token.path') references inside the token values, so swapping the active preset re-themes every component automatically.
Pass Through (PT) hooks into the same style layer — a consumer can override classes or attributes on any element without editing the style module.
License
Licensed under the PrimeUI License - Copyright (c) PrimeTek Informatics
