How to make floating widgets?

And how can I refer to the squares?