BitstylesPhoenix.Alpine3.Sidebar.ui_js_sidebar_layout
You're seeing just the function
ui_js_sidebar_layout
, go back to BitstylesPhoenix.Alpine3.Sidebar module for more information.
Renders a sidebar layout with Alpine3.
Supports all attributes and slots from BitstylesPhoenix.Component.Sidebar.ui_sidebar_layout/1
.
Attributes
x_name
- The name of the boolean x-data property for alpine to store the menu state. Defaults to"sidebarOpen"
.
The small_sidebar
and main
/inner
blocks will additionally provide a block argument
with the sidebar context for ui_js_sidebar_open/1
and ui_js_sidebar_close/1
.
Prevent page-flickering
The sidebar small layout sets the x-cloak
property on the menu to avoid flickering on initial page load.
To make this work, you need to add the following snippet to your stylesheets:
[x-cloak] { display: none !important; }
See https://alpinejs.dev/directives/cloak for more information on x-cloak
.