Textinput: Implement classes option

Fixes gh-7730