structured ui class for dynamic state toggling