The viewBox attribute in SVG is used to control the scaling and positioning of the vector image. It defines the coordinates and dimensions for the SVG, including horizontal and vertical axes. By adjusting the min-x, min-y, width, and height values, you can move, resize, and pan the SVG element. This is useful for optimizing SVG display across different screen sizes.
For more details, check out the article here.