At least on the Steam Deck it's great. With or without Steam. In terms of compatibility it's probably best to get an Xbox or PlayStation controller. As far as I know most off-brand controllers present themselves as Xbox controllers.
If you want to do emulation I'd recommend PlayStation controllers because some PlayStation games only work with those because of unique features like the touchpad and motion controls.
Most modern games actually show different buttons depending on whether you have a Nintendo, Microsoft or PlayStation controller. And they all have Linux drivers and also work especially well with Steam and Proton.