Tesserae

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.

Constructors

Constructor
Sidenav
public Sidenav()

Initializes a new instance of the Sidenav class.

Methods

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.

Properties

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

Method
SidenavButton.Selected
public SidenavButton Selected(bool isSelected = true)

Sets the button as selected.

Method
SidenavButton.OnClick
public SidenavButton OnClick(Action action)

Adds a click handler to the button.

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

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

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 Tesserae. All rights reserved.