Separator
Separator is a layout utility for creating a subtle visual divider between regions.
It wraps bs.Separator and is used to separate content sections without adding heavy visual noise -- common in
forms, panels, tool areas, and menus.
Quick start
Horizontal separator
import bootstack as bs
app = bs.App()
bs.Label(app, text="Section A").pack(anchor="w", padx=20, pady=(20, 8))
bs.Separator(app, orient="horizontal").pack(fill="x", padx=20, pady=8)
bs.Label(app, text="Section B").pack(anchor="w", padx=20, pady=(8, 20))
app.mainloop()
Vertical separator
sep = bs.Separator(app, orient="vertical")
sep.pack(side="left", fill="y", padx=8, pady=8)
When to use
Use Separator when:
-
you need a light visual break between groups
-
whitespace alone doesn't provide enough structure
Consider a different control when:
-
spacing and alignment already clearly indicate grouping
-
too many lines would add visual clutter
Appearance
Separators are best used sparingly to:
-
separate groups of controls
-
distinguish header/content/footer regions
-
divide side-by-side panes (vertical separators)
Design System
For theming details and color tokens, see Design System.
accent / style
If your theme exposes separator variants, apply them via accent or style.
bs.Separator(app, accent="secondary")
Examples & patterns
orient
-
"horizontal"(default) -
"vertical"
bs.Separator(app, orient="horizontal")
bs.Separator(app, orient="vertical")
Behavior
-
Separators do not receive focus and are not interactive.
-
Use geometry manager options (
fill,padx,pady) to control length and spacing.
Additional resources
Related widgets
-
Frame -- group related controls into regions
-
LabelFrame -- labeled container grouping
-
PanedWindow -- resizable split regions