ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.02k stars 13.51k forks source link

feat: ion-radio with icon placeholder #22669

Closed indraraj26 closed 3 years ago

indraraj26 commented 3 years ago

Feature Request

Ionic version:

[x] 5x

Describe the Feature Request

I would like to have custom icon instead of radio with that i do not have to deal with state. Currently i am dealing with selected Index + ion-item ion-icon slot start

image

Describe Preferred Solution

icon placeholder on ion-radio element

Describe Alternatives

Related Code

Additional Context

liamdebeasi commented 3 years ago

Thanks for the feature request. I think this use case may be out of scope for what ion-radio should handle. My main concern with this is changing the radio to display a custom icon removes any indication that the component is a radio, which may result in a poor user experience.

It might make sense to make this a custom component in your app where the component internally deals with a simple state (active button/item). That way you can deal with state once and then abstract away the rest of the details.

indraraj26 commented 3 years ago

I agree with you. Lets stick with state.

ionitron-bot[bot] commented 3 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.