You can right click on a container's UI to close it (anywhere but the inventory slots).