How do I implement a responsive toolbar like the one you use in the user sites?

Could you give the code and a step by step guide to integrate it in my site?