-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: standalone input component should support icons #26297
Comments
Hey @EinfachHans , thanks for your this feature request. I full agree with the necessity of icon event (ie: password reveal, tooltip, data masking, ...) Regarding design of input with icon, it often refers to "inputGroup". Maybe it must be separated in a new component. Another nice feature could be a picker in front of the input (ie: country selector for phone number). Kr |
I was looking for the same thing for the password field. Is also part of the MD3 spec: https://m3.material.io/components/text-fields/guidelines#5c8a5f07-b1a5-455f-bf76-7ff0d724f6b0 |
If this gets implemented, it would be great if it would also be possible to add multiple icons at the end. The use case for that is a password field with a show/hide button and a clear button. |
I was also very surprised today that there is no slot for buttons in inputs. Are there any updates on this? |
it is still in progress? |
Issue number: Resolves #26297 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> With the modern form control syntax, it is not possible to add icon buttons or other decorators to the sides of `ion-input`, `ion-textarea`, or `ion-select`, as you can with `ion-item`. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> `start` and `end` slots added to each component. This PR is a combination of several others that were already approved. If needed, it might be easiest to review the PRs individually by looking at the commit history here. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Docs PR: ionic-team/ionic-docs#3271 Dev build: `7.5.4-dev.11701112913.1ea61220` --------- Co-authored-by: ionitron <hi@ionicframework.com> Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com> Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
This feature has been added via #28583 and will be available in a future minor release of Ionic. Thank you! |
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. |
Prerequisites
Describe the Feature Request
This is a Feature Request to v7 and #26283
To fully be able to get rid of the deprecated usage of form elements within the ion item it would be great to support icon's within these elements as well.
Describe the Use Case
This are inputs in our current app:
Many Password Input's have a toggle icon to show the password at the end. Also a start icon can be great to personalize the form element more.
Describe Preferred Solution
I would prefer a slot solution where deverlopers are able to place something at the start or end slot, similar to the item. With this it would be easier to add a click handler to the icon (to for example toggle the input mode to show or hide a password)
Also it should be somehow possible to not focus the element on icon click. If i think of the password toggle icon, a click on that icon should not focus the element.
Describe Alternatives
An alternative could be two properites
startIcon
andendIcon
, but i don't really think this is the right way, as then there also should be two events for clicking these.Related Code
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: