Router component with css transitions