To switch to a gradient sidebar, add data-menu-color="gradient" to the <html> tag in your layout. You can apply this dynamically using the LayoutStoreService with setSidenavColor('gradient').