SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.47k stars 254 forks source link

[Feature Request]: SidenavigationItem - allow customizing the icon color #8787

Open ilhan007 opened 2 months ago

ilhan007 commented 2 months ago

Feature Request Description

Author(quoted from the comment):

" I would like to be able to customize the icon color, because.... the possibility to have the color of the icon changed would allow for additional semantic grouping. If we associate the color green to some money-related icons, or blue for ordering, etc; it permits more diversity on the icon choice themselves. For example, a green "add" icon would represent adding something on the money-oriented theme, blue for ordering, etc.

It is understood that the colors would need to match the color theme mapping and adapt to the morning or evening theme. The wish would be to have a few build-in color options as an attribute, like "Accent 1" or something similar. The input will be that color by name, id or index and the icon will pick that color, adjusting based on the theme. "

If possible, the possibility of supplying a specific hex for a specific color would be nice to have.

Proposed Solution

Add CSS Shadow part for the icon.

Proposed Alternatives

No response

Organization

No response

Additional Context

No response

Priority

None

Privacy Policy

lahuCS commented 2 months ago

Hi, Thanks for opening this FR on my behalf!

So, having the possibility to have the color of the icon changed would allow for additional semantic grouping. If we associate the color green to some money-related icons, or blue for ordering, etc; it permits more diversity on the icon choice themselves. For example, a green "add" icon would represent adding something on the money-oriented theme, blue for ordering, etc.

It is understood that the colors would need to match the color theme mapping and adapt to the morning or evening theme. The wish would be to have a few build-in color options as an attribute, like "Accent 1" or something similar. The input will be that color by name, id or index and the icon will pick that color, adjusting based on the theme.

If possible, the possibility of supplying a specific hex for a specific color would be nice to have.

Thanks

ilhan007 commented 2 months ago

Hello @SAP/ui5-webcomponents-topic-rd this FR is for the SidenavigationItem icon.

One possible solution would be CSS ShadowPart to allow changing the color of the icon from outside + suggestion to the author which SAP Base Parameters to use (the Accent* ones). Or, enhancing the SideNavigationItem even more to allow slotting an icon in addition to the icon property (as done in the StandardListItem). Both would work, the first is quicker to implement.