DashboardNavbar
The top bar of a panel: sidebar toggle, title, and left, center and right areas.
On this page
Examples
Title and actions
Customers
The title is a heading level 1; Leading, Trailing, Left, the center and Right place the rest.
Razor
<div class="h-64 w-full overflow-hidden rounded-xl border border-(--klyroo-border)">
<KlyDashboardGroup>
<KlyDashboardPanel>
<Header>
<KlyDashboardNavbar Title="Customers" Toggle="false" data-testid="dashboard-navbar">
<Leading><span class="inline-flex size-8 items-center justify-center rounded-full bg-(--klyroo-bg-elevated) text-xs font-medium" aria-hidden="true">C</span></Leading>
<Right>
<KlyButton Label="Invite" Size="KlySize.Sm" Variant="ButtonVariant.Outline" Color="KlyColor.Neutral" />
<KlyButton Label="New customer" Size="KlySize.Sm" />
</Right>
</KlyDashboardNavbar>
</Header>
<Body><p class="text-sm text-(--klyroo-text-muted)">The title is a heading level 1; Leading, Trailing, Left, the center and Right place the rest.</p></Body>
</KlyDashboardPanel>
</KlyDashboardGroup>
</div>API
KlyDashboardNavbar
Top bar of a dashboard panel with the sidebar toggle, a title and left, center and right areas.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
As |
Dashboard |
Dashboard |
The element to render: Header (default) or Div . A header outside a sectioning element is the banner landmark and a page has one: use Div for the second navbar of a page, such as the one of a detail panel next to a list. Values: Header, Div. |
Class |
string |
Classes added to the root element, merged last so they win over the theme. | |
HeadingLevel |
int |
1 |
Level of the title heading, 1 to 6. A page has one h1: give the navbars after the first one a lower level, or no Title . |
Title |
string |
The title, a heading of HeadingLevel (1 by default). | |
Toggle |
bool |
true |
Shows the KlyDashboardSidebarToggle at the start, below the lg breakpoint. |
Ui |
Dashboard |
Per-instance class overrides of the slots of the dashboard navbar, see DashboardNavbarUi . They are merged after the theme and the Class parameter wins on the root slot. |
Slots
| Name | Type | Description |
|---|---|---|
Leading |
RenderFragment |
Before the title. |
Left |
RenderFragment |
Left area, after the title. |
Right |
RenderFragment |
Right area: actions, the user menu. |
Trailing |
RenderFragment |
After the title. |
ChildContent |
RenderFragment |
The center area, between the left and the right ones. |
Ui slots
Ui takes a Dashboard with one class string per slot, merged after the theme.
| Slot | Styles |
|---|---|
Root |
Classes merged into the root slot of KlyDashboardNavbar , after the theme and the app configuration. |
Left |
Classes merged into the left slot of KlyDashboardNavbar , after the theme and the app configuration. |
Title |
Classes merged into the title slot of KlyDashboardNavbar , after the theme and the app configuration. |
Center |
Classes merged into the center slot of KlyDashboardNavbar , after the theme and the app configuration. |
Right |
Classes merged into the right slot of KlyDashboardNavbar , after the theme and the app configuration. |