How to automatically hide notifications after a timeout in OS X Sierra?
System Prefs > Notifications
On a per-app basis, you need to switch from Alerts to Banners ...


  Banners appear in the upper-right corner and go away automatically. Alerts stay on screen until dismissed.