diff --git a/src/components/NcAppSidebar/NcAppSidebar.vue b/src/components/NcAppSidebar/NcAppSidebar.vue index 813d8a3be1..4bd4d80d47 100644 --- a/src/components/NcAppSidebar/NcAppSidebar.vue +++ b/src/components/NcAppSidebar/NcAppSidebar.vue @@ -361,14 +361,17 @@ A working alternative would be using an icon together with an `aria-label`: ``` -### Conditionally show the sidebar +### Conditionally show the sidebar with `open` -If the sidebar should be shown conditionally (e.g. using a button) -and the users are expected to open and close the sidebar multiple times, -then using `v-if` might result in bad performance. -So instead use the `open` property. +If the sidebar should be shown conditionally, you can use `open` prop to define sidebar visibility. +It automatically shows a toggle button to open the sidebar if it is closed. -You can also use `--app-sidebar-offset` CSS variable to preserve space for the toggle button, for example, in top bar of NcAppContent. +You can also use `--app-sidebar-offset` CSS variable to preserve space +for the toggle button, for example, in top bar of `NcAppContent`. + +The built-in toggle button can be removed with `no-toggle` prop. + +Note: the built-in toggle button is only available then NcAppSidebar is used in NcContent. ```vue