Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Sidebar


How can i make the sidebar permanently collapsed and get the submenus in hover over the side bar menus in metronic 8.2.2v "react". please help i am design a dashboard for my customer.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


Hi Vineet,

Thank you for reaching out to us.

To make the sidebar collapsed by default you can update the configuration file src/_metronic/layout/core/_LayoutConfig.ts.

Change minimize properties as shown below.

minimize: {
desktop: {
enabled: true,
default: true,
hoverable: true,
},
},


Run your app, clear the localStorage, and hard refresh your page to use the updated layout configuration.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



I suggest adding a `sidebar-permanent` class and modifying Javascript to remove the toggle button and enable hover functionality for submenus. Buckshot Roulette

if ($(".sidebar-permanent").length > 0) {
$(".sidebar-toggle").remove(); // Remove the toggle button
$(".sidebar").addClass("sidebar-hover"); // Enable hover functionality
} else {
// Original sidebar toggle logic for non-permanent mode
}



As for implementing hover-over submenus, you'll need to make some adjustments to the sidebar's styling and behavior. Typically, hover-over submenus are achieved through CSS and JavaScript. You can use CSS to hide the submenus by default and show them when the user hovers over the corresponding sidebar menu item. JavaScript can be used to handle the hover event and toggle the visibility of the submenus.



To collapse the sidebar permanently, you need to locate the component responsible for displaying the sidebar in the codebase. Look for a file or component that handles sidebar functionality and layout. In that component, soccer skills world cup will be able to find the logic related to collapsing and expanding the sidebar.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(