# Dashboard Layout > Add the ShellUI dashboard (sidebar, header, breadcrumb, theme toggle) and make it your app's layout Source: https://shellui.dev/docs/v0.3/dashboard ShellUI ships two dashboard layouts, each a sidebar plus a content area with a header, breadcrumb and theme toggle: | Block | Header | Install | |-------|--------|---------| | `dashboard-02` | Sticky: stays at the top while the page scrolls | `shellui add dashboard-02` | | `dashboard-01` | Scrolls with the content | `shellui add dashboard-01` | In 0.3, `shellui add` installs the files. You then make the dashboard your app's layout, which takes a few steps, all below. The examples use `dashboard-02`; for `dashboard-01`, use `DashboardLayout01` instead. ## 1. Install From your project root, after `shellui init`: ```bash shellui add dashboard-02 ``` This adds: | File | What it is | |------|------------| | `Components/Layout/DashboardLayout02.razor` | The layout: sidebar, header, breadcrumb, theme toggle | | `Components/UI/AppSidebar.razor` | Your app's sidebar: brand, navigation links, user menu | | `Components/UI/Sidebar*.razor`, `SidebarProvider.razor` | The sidebar building blocks | | `Components/UI/Breadcrumb*.razor`, `Separator.razor`, `ThemeToggle.razor`, `Avatar.razor` | Header and sidebar parts | The sidebar needs an interactive render mode and `shellui.js`; `shellui init` already set up both in `App.razor`. ## 2. Make it the default layout Open `Components/Routes.razor` and change `DefaultLayout`: ```razor ``` With ASP.NET Core Identity (`--auth Individual`), the element is ``; change its `DefaultLayout` the same way. > **Only some pages?** > > Leave `Routes.razor` alone and add a `@layout` directive to the pages that should use the dashboard: > > ```razor > @page "/reports" > @layout Layout.DashboardLayout02 > ``` ## 3. Point the sidebar at your pages `AppSidebar.razor` ships with placeholder links (`/`, `/dashboard`, `/settings`), a placeholder brand ("My App") and a placeholder user. Edit them to match your app. In `Components/UI/AppSidebar.razor`, find the `Navigation` group and replace the `` entries inside its ``. For the pages in a new Blazor project: ```razor Navigation Home Counter Weather ``` > **Edit the file, don't replace it** > > Keep the rest of `AppSidebar.razor`: the header, the footer, and the `@code` block at the bottom, which defines `IsCurrentPath`. Replacing the whole file with this snippet fails the build with "The name 'IsCurrentPath' does not exist in the current context". Keep an icon inside each button if you want one; the placeholders show inline SVGs. `IsCurrentPath` highlights the link of the current page. Remove the Settings entry if you have no settings page. ## 4. Remove the old layout (optional) After step 2, the template's `MainLayout` is no longer used. You can delete these from `Components/Layout/`: - `MainLayout.razor` and `MainLayout.razor.css` - `NavMenu.razor` and `NavMenu.razor.css` Keep `ReconnectModal.*` (.NET 10). Before deleting, do these two things, or the build or the error bar will break. **Pages that name `MainLayout`.** The .NET 10 template's `Components/Pages/NotFound.razor` has `@layout MainLayout`, and Identity's `Components/Account/Shared/ManageLayout.razor` does too. Change them to the dashboard: ```razor @layout DashboardLayout02 ``` **The error bar.** `MainLayout.razor` contains Blazor's error bar (`
`). Move it into `Components/App.razor`, just before ``. Its old styles were in `MainLayout.razor.css`, so use this Tailwind-styled version: ```html ``` It stays hidden until Blazor shows it after an error. ## 5. Run it ```bash dotnet watch ``` Your pages now render inside the dashboard. On desktop, **Ctrl+B** (**⌘B** on macOS) collapses and expands the sidebar; on small screens, the menu button in the header opens it. > **JSDisconnectedException in the terminal?** > > With the 0.3.2 CLI, every page reload or closed tab logged `Microsoft.JSInterop.JSDisconnectedException` from `SidebarProvider.DisposeAsync`. It was harmless, and 0.3.3 fixes it: update the tool and run `shellui update sidebar-provider`. Or keep your file and add a second `catch` in `DisposeAsync`: > > ```csharp > try { await JSRuntime.InvokeVoidAsync("ShellUI.disposeSidebar", _handle); } > catch (JSException) { } > catch (JSDisconnectedException) { } > ``` > **Template sample pages** > > `shellui init` removes Bootstrap, so the template's Counter, Weather and Error pages lose their Bootstrap styling. Style them with Tailwind or ShellUI components, for example `