feat: Support custom icons for `ion-select`
See original GitHub issuePrerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- v4.x
- v5.x
- v6.x
- Nightly
Current Behavior
Developers are unable to customize the icon that is displayed with ion-select
. Developers can change the color of the icon by using CSS:
ion-select::part(icon) {
color: red;
}
But this does not allow the flexibility for developers to customize the icon used.
Ideally, developers would like a property or slot that can be used to customize the icon that is used.
@Prop() toggleIcon = chevronDown;
<ion-select [toggleIcon]="arrowDown"></ion-select>
This icon could then be styled using CSS shadow parts, as the existing implementation is today.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Ionic 4 ion-select set custom icon for select-icon - Stack Overflow
In ionic v4 a workaround is hiding the icon through .scss file. ion-select::part(icon) { display: none !important; } ion-select::part(text) ...
Read more >ion-item-divider - Ionic Framework
Item Dividers are block elements that can be used to separate items in a list. They are similar to list headers, but instead,...
Read more >ion-refresher background color - You.com | The search engine you ...
No need to customize directive, just set spinner value none to disable both spinner or icon. <ion-refresher spinner="none" on-refresh="changeSlide()"> ...
Read more >RD8100™ - Radiodetection
A flashing icon means pairing is in progress. 3.3 Using the menu. The RD8100 locator and transmitter menus allow you to select or...
Read more >Burmax Company
... Black Gold Ion Select for adjustable ionic output to control hair volume and ... cool shot button, removable lint filter, and 9...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello everyone 👋 doing some housekeeping here to get this feature request up to date. I will be updating the original poster’s description to reflect my understanding of this feature request. Please let me know if that is inconsistent with your expectations or if you have additional requirements you would like to include.
The problem Ionic developers are facing is that the
ion-select
icon is created through CSS. Developers can change the color of this icon with the following CSS:But they cannot customize the icon that is rendered. The ask here, is to support either a slot for developers to customize what is used as the “icon” for
ion-select
or allowing developers to pass through anion-icon
to be used.Similar implementation patterns that exist for reference:
ion-accordion
has@Prop() toggleIcon = chevronDown
which allows developers to specify a differenttoggleIcon
in their implementations.I just noticed that this feature was added by #20605 but was then removed for the 5.1 release ( #21108 ). I too would like to be able to customize the style of the icon with an svg instead of the default border one.