Feature

Persistent Behavior

Auto-collapse supports only Persistent & Permanent EdgeSidebar if they are configure to be collapsible.

The calculation happens only at client side (not in SSR) since it use window’s width to compare between breakpoint. The first calculation is when component mounted to DOM, the logic compare current viewport with the value specified in config

Example 1

scheme.enableAutoCollapse('primarySidebar', 'md')
xssmmdlgxl
collapsed

Example 2

scheme.enableAutoCollapse('primarySidebar', 'sm')
xssmmdlgxl
collapsed

When you open you website at xs | sm | md, primarySidebar will collapse. After that, when user increase viewport it will trigger recalculation.

If current viewport > breakpoint, the sidebar will be uncollapsed and if user lower the viewpoint <= breakpoint, the sidebar will collapse.

gif