Skip to content

Layout ​

Handling the overall layout of a page.

Basic Usage ​

Basic usage of Layout.




Customize Button ​

Setting the trigger property of Menu.Sider, the icon of the collapse button can be customized.

Navigation 1
Navigation 2
Navigation 3
Navigation 4
Home
Channel
News

Customize Collapse Button ​

Setting the trigger property of Menu.Sider to null, the built-in trigger of Sider will not be displayed. At this time, you can customize the collapse button.

Navigation 1
Navigation 2
Navigation 3
Navigation 4
Home
Channel
News

Responsive Sider ​

The Slider on the left can be set to expand/collapse in conjunction with Menu, and set breakpoint for responsive contraction.

Navigation 1
Navigation 2
Navigation 3
Navigation 4
...
Navigation 1
Navigation 2
Navigation 3
Navigation 4
Home
Channel
News

Resize Sider ​

By resizeDirections, using the mouse to drag the sidebar to zoom in and out.

Layout API ​

Layout Attributes ​

NameDescriptionTypeDefault
has-siderIndicates that there is a Sider in the sub-element, which generally does not need to be specified. Used to avoid style flicker when rendering on the server side.Booleanfalse

Layout-Header Slots ​

NameDescription
defaultContent

Layout-Content Slots ​

NameDescription
defaultContent
NameDescription
defaultContent

Layout-Sider Attributes ​

NameDescriptionTypeDefault
themeThemeStringlight
collapsedCurrent collapsed stateBoolean-
default-collapsedThe default collapsed stateBooleanfalse
collapsibleWhether is collapsibleBooleanfalse
widthWidthBoolean200
collapsed-widthCollapsed widthBoolean48
reverse-arrowFlip and fold the direction of the hint arrow, which can be used when Sider is on the rightBooleanfalse
breakpointTrigger breakpoints for responsive layout.String-
resize-directionsCan replace the native aside tag with ResizeBox. This is the directions parameter of ResizeBox.Array-
hide-triggerWhether to hide the bottom fold triggerBooleanfalse

Layout-Sider Events ​

NameDescriptionType
collapseEvents on expand/collapse. There are two ways to trigger click trigger and responsive feedbackFunction
breakpointEvents when a responsive layout breakpoint is triggeredFunction

Layout-Sider Slots ​

NameDescription
triggerCustom bottom folding trigger.