Something like this, or are you looking for perhaps a little more advanced?
As a side note I’m currently working on a processing lib to handle gui elements. I wonder if they could be easily ported to p5js. In fact it is something I would like to do anyway, could be a good incentive.