Back-ported flexible input component from prototype branch