Formatted input for TextField

Hello everybody!
I faced the problem with the formatted input in Vaadin10+
I need to set such kind of Mask for input ex. credit card number.
Or if I write in a text field digits without any spacing in will create spaces automatically.
Thanks!