ionic-team / ionic-team/ionic-framework

bug: Inputs with icons are strange

Open
#29,871 0 comments 1 reaction 0 assignees View on GitHub
triage
Dominant language
TypeScript
Stars
52.7k
Forks
13.3k
Avg merge
1d 15h
Merged PRs (30d)
51

Description

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v8.x

### Current Behavior

Hi,

Currently inputs with icons are strange, both the normal inputs and the new "ion-input-password-toggle" tag.

According to https://ionicframework.com/docs/api/input#start-and-end-slots-experimental the icons go inside the input, but they look small and without padding.

Captura de pantalla 2024-09-13 124957

1. The input is stuck to the icon and is very small compared to the old way.
2. In ion-input-password-toggle, if you add an icon to the right side, for example indicating that something is wrong, the icon is not the same size as the eye.
3. In a normal input, if you put two icons at the end, apart from being very small, they have no padding.

The last item is the old way in which the icons were outside the input and everything looked fine :(

Greetings to the whole team.

### Expected Behavior

It is expected that everything looks nice and centered, with the correct sizes in all cases. The old way was nice and looked great.

### Steps to Reproduce

You can check everything at the following address:
https://stackblitz.com/edit/angular-6tcmal?file=src%2Fapp%2Fexample.component.html

### Code Reproduction URL

https://stackblitz.com/edit/angular-6tcmal?file=src%2Fapp%2Fexample.component.html

### Ionic Info

```
Ionic:

Ionic CLI : 7.2.0
Ionic Framework : @ionic/angular 8.3.0
@angular-devkit/build-angular : 18.2.4
@angular-devkit/schematics : 18.2.4
@angular/cli : 18.2.4
@ionic/angular-toolkit : 12.1.1

Capacitor:

Capacitor CLI : 6.1.2
@capacitor/android : not installed
@capacitor/core : 6.1.2
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v20.16.0 (C:\Program Files\nodejs\node.exe)
npm : 10.8.1
OS : Windows 10
```

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked StackBlitz reproduction and the Ionic input start/end slots documentation. Compare the rendering of regular inputs and ion-input-password-toggle with one or two end icons, then trace the relevant input components and styling. Done means icons are centered, consistently sized, and padded in all described cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
design, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.