Create textbox inside optionbox

Hello,

I am trying to create a textbox inside dropdown box like in this link:

It is for product variant. The textbox is for custom product variant that the user can enter.