A well-organized form with visual separators between sections. You'll learn how to use spacers and horizontal lines to create clear visual boundaries in your forms.
Spacers and dividers help users understand the structure of your form. They create visual breathing room and indicate where one section ends and another begins.
Use them to group related fields and improve form readability!
Let's start by adding a simple spacer between form sections. The addSpacer() method creates vertical space between rows.
You can customize the spacer height using different units like px, rem, or em.
Enable showLine: true to display a horizontal line in the middle of the spacer. This creates a clear visual divider.
Customize the line appearance with lineColor, lineStyle, and lineThickness. Available styles are solid, dashed, and dotted.
Use isVisible with a callback to show or hide spacers based on form state. This is useful when sections appear conditionally.
Let's put it all together! Here's a complete form using multiple spacers to organize different sections.
Great job! You've learned how to use spacers and dividers to organize your forms. Ready to explore subforms for more complex organization?
Continue to Subforms TutorialOther learning paths: