Horizontal Navigation

You can achieve horizontal navigation by hiding the side nav and adding links to the NavbarLinks array.

$Page1 = New-UDPage -Name "Page1" -Content {}
$Page2 = New-UDPage -Name "Page2" -Content {}

$Navigation = New-UDSideNav -None
$Dashboard = New-UDDashboard -Title "Test" -Pages @($Page1, $Page2) -Navigation $Navigation -NavbarLinks @(
    New-UDLink -Text "Page 1" -Url "/page1"
    New-UDLink -Text "Page 2" -Url "/page2"
)

Start-UDDashboard -Dashboard $Dashboard -Port 10000

1 Like

Is there an updated way of hiding the navigation button?

This works, but seems… unintuitive to me


Invoke-UDJavaScript -JavaScript 'const style = document.createElement("style");style.innerHTML = `.MuiIconButton-edgeStart { display: none; } `;document.head.appendChild(style);'


Not at the moment. I’ll open an issue for this.

1 Like