You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Severity values are currently hardcoded across multiple components (primefaces/primeuix).
Requested: allow severity to be any string (for example pending, brand, help) without requiring project-level CSS workarounds.
Do the same pattern for Badge, Button, Message, InlineMessage, and Toast.
2. Open theme typing for custom keys
In the related design token types, keep built-in severity fields for IntelliSense and also allow arbitrary severity keys (for example via index signature), so TypeScript accepts custom severities without casts.
3. Widen component severity prop to string
In PrimeVue components, the severity prop should not be restricted to literal unions only; it should accept string.
There is currently a naming inconsistency (danger vs error) across components. (see primefaces/primevue#8268)
Optional improvement: unify naming or provide aliases (danger <-> error) to ease adoption.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Severity values are currently hardcoded across multiple components (primefaces/primeuix).
Requested: allow severity to be any string (for example
pending,brand,help) without requiring project-level CSS workarounds.Affected Components
Current Behavior
Expected Behavior
Technical Proposal
1. Dynamic severity rule generation in styles
Instead of only static CSS blocks for known severities, generate severity rules from available token keys.
Concept example:
.p-tag-pending {
background: dt('tag.pending.background');
color: dt('tag.pending.color');
}
Do the same pattern for Badge, Button, Message, InlineMessage, and Toast.
2. Open theme typing for custom keys
In the related design token types, keep built-in severity fields for IntelliSense and also allow arbitrary severity keys (for example via index signature), so TypeScript accepts custom severities without casts.
3. Widen component
severityprop tostringIn PrimeVue components, the
severityprop should not be restricted to literal unions only; it should acceptstring.Acceptance Criteria
Example
Theme tokens:
Base:
Tag component:
Badge component:
Usage:
Optional Follow-up
Similar issues:
Workaround (primefaces/primevue#7567) only works for tag & badge!
There is currently a naming inconsistency (
dangervserror) across components. (see primefaces/primevue#8268)Optional improvement: unify naming or provide aliases (
danger<->error) to ease adoption.Beta Was this translation helpful? Give feedback.
All reactions