I am using the Menubar component to show multiple options in my UI.
Now is there any way we can set different label color for each menu items ?
Is there any way to change the font color of the labels in Menubar
Can you open a gitHub ticket please. It looks like a bug. You should be able to do this but its ignoring the style and class for trying to set the color of an individual menu item.
That should make the menu item "green" but the style is not taking hold.
Code: Select all
items: [
{
label: 'Save',
icon: 'pi pi-fw pi-calendar-plus',
className: 'text-green-500',
},
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Posts: 1
- Joined: 29 Dec 2022, 15:47
- Location: Haldwani, Uttarakhand (India)
- Contact:
Hello this is Gulshan Negi
Yes, it is possible to set different label colors for each menu item in the Menubar component. One way to achieve this is by using the style prop on each MenuItem component to apply custom styles.
For example, you can define a CSS class for each label color that you want to use and apply it to the style prop of the corresponding MenuItem component.
Thanks
Yes, it is possible to set different label colors for each menu item in the Menubar component. One way to achieve this is by using the style prop on each MenuItem component to apply custom styles.
For example, you can define a CSS class for each label color that you want to use and apply it to the style prop of the corresponding MenuItem component.
Thanks
Yes but as I stated above that is not working. Its a bug
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 12 guests