Separate a Mapbox Geocoder Address Search Box from the Map

Mapbox provides a tutorial on how to place the geocoder input outside the map. But what if you want to render the geocoder input and map on a different screen or app state?

This method uses CSS to render the visibility of the map and geocoder address search input separately