1

I'm trying to achieve Input line that cut for 4 lines, I'm using angular material with the mat-input directive. I don't want to make 4 mat-inputs that the user need to move between then when he write the code, I thought I could use one input and maybe with CSS to make it look like 4 lines for better user experience.

Any suggestions?

Image attached below:

Edric
  • 24,639
  • 13
  • 81
  • 91
Roberto
  • 187
  • 3
  • 15
  • you can use 4 inputs and catch the keyup event to focus on next input – לבני מלכה Jan 17 '19 at 08:36
  • please check this https://stackoverflow.com/questions/41698357/how-to-partition-input-field-to-appear-as-separate-input-fields-on-screen – Pramvir Raghav Jan 17 '19 at 09:06
  • How about creating a custom form-field-item? This is the example from the material docs, which is kind of similar to your intended behaviour: https://stackblitz.com/angular/pmqxmennvqe?file=app%2Fform-field-custom-control-example.ts – Lars Rødal Jan 17 '19 at 09:44

0 Answers0