Docs

Documentation versions (currently viewingVaadin 25 (prerelease))

Side Navigation Styling

Styling API reference for the Side Nav component.

Style Variants

Side navigation supports the following style variants.

Variant Description Supported by

filled

Uses a solid background color for active item

Aura

Styling Individual Items

Individual navigation items can be styled by applying a CSS class name to them.

Source code
SideNavStyling.java
nav-item-styling.css
side-nav-styling.tsx
nav-item-styling.css
side-nav-styling.ts
nav-item-styling.css

Style Properties

The following style properties can be used in CSS stylesheets to customize the appearance of this component.

To apply values to these properties globally in your application UI, place them in a CSS block using the html {…​} selector. See Component Style Properties for more information on style properties.

Side Nav Properties

Property Supported by

--vaadin-side-nav-child-indent

Aura, Lumo

--vaadin-side-nav-label-color

Aura

--vaadin-side-nav-label-font-size

Aura

--vaadin-side-nav-label-font-weight

Aura

--vaadin-side-nav-label-line-height

Aura

Side Nav Item Properties

Property Supported by

--vaadin-side-nav-item-background

Aura

--vaadin-side-nav-item-border-color

Aura

--vaadin-side-nav-item-border-radius

Aura

--vaadin-side-nav-item-border-width

Aura

--vaadin-side-nav-item-font-size

Aura

--vaadin-side-nav-item-font-weight

Aura

--vaadin-side-nav-item-line-height

Aura

--vaadin-side-nav-item-gap

Aura

--vaadin-side-nav-item-padding

Aura

--vaadin-side-nav-item-text-color

Aura

CSS Selectors

The following CSS selectors can be used in stylesheets to target the various parts and states of the component. See the Styling documentation for more details on how to style components.

Root element

vaadin-side-nav

Parts

Header (above list)

vaadin-side-nav::part(label)

Label

vaadin-side-nav > [slot="label"]

Expand/collapse toggle

vaadin-side-nav::part(toggle-button)

Expand/collapse icon

vaadin-side-nav::part(toggle-button)::before

States

Collapsible list

vaadin-side-nav[collapsible]

Collapsed list

vaadin-side-nav[collapsed]

Item root element

vaadin-side-nav-item

Current view/page item

vaadin-side-nav-item[current]

Item with link

vaadin-side-nav-item[path]

Item without link

vaadin-side-nav-item:not([path])

Item contents (excl. children)

vaadin-side-nav-item::part(content)

Link label (incl. prefix/suffix)

vaadin-side-nav-item::part(link)

Item prefix element

vaadin-side-nav-item > [slot="prefix"]

Item suffix element

vaadin-side-nav-item > [slot="suffix"]

Item icon

vaadin-side-nav-item > vaadin-icon

Parent and Child Items

Expand/collapse toggle

vaadin-side-nav-item::part(toggle-button)

Expand/collapse toggle icon

vaadin-side-nav-item::part(toggle-button)::before

Expanded item

vaadin-side-nav-item[expanded]

Child item

vaadin-side-nav-item[slot="children"]