separate configuration and state in widgets