Sidenav

Description

A vertical icon-only navigation rail

A Sidenav is a narrow, vertical icon navigation rail intended to be used as the leftmost navigation in an application. Each item shows an icon with a small label below it. The Sidenav can be combined with a Sidebar to its right to create a two-level navigation experience.

The Sidenav (left rail) selects the high-level section, and the Sidebar shows context for that section.

A Sidenav can also be used standalone as the only navigation in a smaller app.

API reference

class

Sidenav

public sealed class Sidenav : IComponent

A vertical icon navigation rail (Sidenav) intended to be used as the leftmost navigation in an application. Each item is rendered as an icon with an optional label below it. Behaves similarly to a Sidebar but is always narrow and icon-centric. Often combined with a Sidebar to its right.

Namespace
Tesserae
Implements
IComponent

Constructors

NameDescription
SidenavInitializes a new instance of the Sidenav class.
Constructor
Sidenav
public Sidenav()

Initializes a new instance of the Sidenav class.

Methods

NameDescription
SecondaryRenders the sidenav using the secondary background color.
HideLabelsHides the labels under the icons.
AddHeaderAdds an item to the sidenav header section (top of the rail).
AddContentAdds an item to the sidenav middle content section.
RemoveContentRemoves an item from the middle content section.
AddFooterAdds an item to the sidenav footer section (bottom of the rail).
ClearClears all sections of the sidenav.
ClearHeaderClears the header section.
ClearContentClears the middle content section.
ClearFooterClears the footer section.
SelectSelects the item with the given identifier (and deselects all the others).
RenderRenders the sidenav.
Method
Sidenav.Secondary
public Sidenav Secondary()

Renders the sidenav using the secondary background color.

Method
Sidenav.HideLabels
public Sidenav HideLabels(bool hide = true)

Hides the labels under the icons.

Method
Sidenav.AddHeader
public Sidenav AddHeader(ISidenavItem item)

Adds an item to the sidenav header section (top of the rail).

Method
Sidenav.AddContent
public Sidenav AddContent(ISidenavItem item)

Adds an item to the sidenav middle content section.

Method
Sidenav.RemoveContent
public Sidenav RemoveContent(ISidenavItem item)

Removes an item from the middle content section.

Method
Sidenav.AddFooter
public Sidenav AddFooter(ISidenavItem item)

Adds an item to the sidenav footer section (bottom of the rail).

Method
Sidenav.Clear
public void Clear()

Clears all sections of the sidenav.

Method
Sidenav.ClearHeader
public void ClearHeader()

Clears the header section.

Method
Sidenav.ClearContent
public void ClearContent()

Clears the middle content section.

Method
Sidenav.ClearFooter
public void ClearFooter()

Clears the footer section.

Method
Sidenav.Select
public Sidenav Select(string identifier)

Selects the item with the given identifier (and deselects all the others).

Method
Sidenav.Render
public HTMLElement Render()

Renders the sidenav.

class

SidenavButton

public class SidenavButton : ISidenavItem

A vertical icon-with-label button intended for use inside a Sidenav. Displays an icon on top with a small text label below it.

Namespace
Tesserae
Implements
ISidenavItem

Properties

NameDescription
IsSelectedGets or sets whether the button is currently selected.
IdentifierGets the identifier of the button.
Property
SidenavButton.IsSelected
public bool IsSelected { get ; set ; }

Gets or sets whether the button is currently selected.

Property
SidenavButton.Identifier
public string Identifier { get; }

Gets the identifier of the button.

Methods

NameDescription
SelectedSets the button as selected.
OnClickAdds a click handler to the button.
TooltipSets a custom tooltip text shown on hover.
ShowDotShows a small dot indicator on the icon (e.g. to mark notifications).
DotDangerSets a danger color for the dot indicator.
AsBrandMarks this button as the brand/logo at the top of the rail.
RenderRenders the button.
ShowShows the button.
CollapseCollapses the button.
Method
SidenavButton.Selected
public SidenavButton Selected(bool isSelected = true)

Sets the button as selected.

Method
SidenavButton.OnClick
Overload
OnClick(Action)Adds a click handler to the button.
OnClick(Action<Button, MouseEvent>)Adds a click handler with the underlying button and mouse event.
OnClick(Action)
public SidenavButton OnClick(Action action)

Adds a click handler to the button.

Parameters

action Action
OnClick(Action<Button, MouseEvent>)
public SidenavButton OnClick(Action<Button, MouseEvent> action)

Adds a click handler with the underlying button and mouse event.

Parameters

action Action<Button, MouseEvent>
Method
SidenavButton.Tooltip
public SidenavButton Tooltip(string text)

Sets a custom tooltip text shown on hover.

Method
SidenavButton.ShowDot
public SidenavButton ShowDot(bool show = true)

Shows a small dot indicator on the icon (e.g. to mark notifications).

Method
SidenavButton.DotDanger
public SidenavButton DotDanger()

Sets a danger color for the dot indicator.

Method
SidenavButton.AsBrand
public SidenavButton AsBrand()

Marks this button as the brand/logo at the top of the rail.

Method
SidenavButton.Render
public IComponent Render()

Renders the button.

Method
SidenavButton.Show
public void Show()

Shows the button.

Method
SidenavButton.Collapse
public void Collapse()

Collapses the button.

Samples

Sidenav + Sidebar

Standalone

See also

© 2026 Curiosity. All rights reserved.