hello,
well technically it's possible to do it, but this will take a lot of time, while in css it will be fast and frankly with the right css commands it can be nice and quite clean.
Anyway, you can pass through an override view to add your button table switcher in your module.
For this, have a look on
this documentation
to see how to use override system
As you can see, this will required some html, php and even here Javascript knowledge.
And for Css side, have a look to see how to add Css,
here
.
Regards