Spacer component allows you to add customizable vertical or horizontal space between elements in your document.
Usage
Use theSpacer component to create gaps between content. You can specify either height or width.
Props
Vertical space the spacer takes up. Use a number for pixels, a string for other units, or
true for 100%.Horizontal space the spacer takes up. Use a number for pixels, a string for other units, or
true for 100%.CSS display property of the spacer.
Comparison to LaTeX
TheSpacer component serves a similar purpose to LaTeX’s vertical and horizontal spacing commands:
Spacerwithheightis similar to LaTeX’s\vspace{}Spacerwithwidthis similar to LaTeX’s\hspace{}
Spacer offers more flexibility:
- Units: While LaTeX typically uses pt, em, or ex,
Spacercan use any CSS unit. - Responsiveness:
Spacercan adapt to different screen sizes more easily. - Simplicity:
Spaceruses a single component for both vertical and horizontal spacing.