Shut down slider

I was wondering if it'd be possible to have a shut down button similar to the one on some smartphones. I tried to install a simple one on my touchbar but had problems. I'm thinking of a button that, when pressed, makes a move-right-to-turn-off slider to appear, or something like that.

If that's possible, it'd be great!