There’s this theme component which I think does exactly what you need, although I understand it’s currently unmaintained