Check out example codes for "css svg width 100%". It will help you in understanding the concepts better.

Code Example 1

<svg height="100%" width="100%" viewBox="0 0 100 100"  preserveAspectRatio="none">
   <path d="M0 0 L100 0 L50 100 Z" />
</svg>

Learn ReactJs, React Native from akashmittal.com