Skip to main content

Nav
Ready

Nav is a the main navigation component.

Open in new window
<duet-nav>
<duet-toolbar>
<div slot="left">
<duet-toolbar-link>Henkilöasiakkaat</duet-toolbar-link>
<duet-toolbar-link href="#yritysasiakkaat">Yritysasiakkaat</duet-toolbar-link>
<duet-toolbar-link href="#maatila-asiakkaat">Maatila-asiakkaat</duet-toolbar-link>
<duet-toolbar-dropdown icon="navigation-language" active>
<span slot="label">Yhtiöryhmä</span>
<duet-toolbar-dropdown-link>Valinta</duet-toolbar-dropdown-link>
<duet-toolbar-dropdown-link>Valinta</duet-toolbar-dropdown-link>
<duet-toolbar-dropdown-link>Valinta</duet-toolbar-dropdown-link>
</duet-toolbar-dropdown>
</div>
<div slot="right">
<duet-toolbar-link id="search" href="#search" icon="form-search">Hae</duet-toolbar-link>
<duet-toolbar-dropdown icon="navigation-language">
<span slot="label">FI</span>
<duet-toolbar-dropdown-link active>Suomeksi</duet-toolbar-dropdown-link>
<duet-toolbar-dropdown-link>På Svenska</duet-toolbar-dropdown-link>
<duet-toolbar-dropdown-link>In English</duet-toolbar-dropdown-link>
</duet-toolbar-dropdown>
</div>
</duet-toolbar>
<duet-menu-bar>
<div slot="center">
<duet-menu-bar-link active>Vakuutukset</duet-menu-bar-link>
<duet-menu-bar-link>Sijoittaminen</duet-menu-bar-link>
<duet-menu-bar-link>Rahoitus</duet-menu-bar-link>
<duet-menu-bar-link>Asiakkaalle</duet-menu-bar-link>
</div>
<div slot="right">
<duet-menu-bar-link icon="navigation-user">Omat sivut</duet-menu-bar-link>
<duet-menu-bar-dropdown icon="navigation-user">
<span slot="label">Etunimi</span>
<duet-menu-bar-dropdown-link>Omat tiedot</duet-menu-bar-dropdown-link>
<duet-menu-bar-dropdown-link>Valtuutukset</duet-menu-bar-dropdown-link>
<duet-menu-bar-dropdown-link>Suostumukset</duet-menu-bar-dropdown-link>
<duet-divider margin="none"></duet-divider>
<duet-menu-bar-dropdown-link icon="messaging-logout">Kirjaudu ulos</duet-menu-bar-dropdown-link>
</duet-menu-bar-dropdown>
</div>
</duet-menu-bar>
<duet-submenu-bar>
<duet-submenu-bar-dropdown icon="category-car">
<span slot="label">Ajoneuvot</span>
<duet-submenu-bar-dropdown-link>Autovakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Moottoripyörävakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Mopovakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Pakettiautovakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Moottorivenevakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Purjevenevakuutus</duet-submenu-bar-dropdown-link>
<duet-divider margin="none"></duet-divider>
<duet-submenu-bar-dropdown-link caret highlight>Kaikki ajoneuvovakuutukset</duet-submenu-bar-dropdown-link>
</duet-submenu-bar-dropdown>
<duet-submenu-bar-dropdown icon="category-apartment">
<span slot="label">Koti</span>
<duet-submenu-bar-dropdown-link>Kotivakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Mökkivakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Vuokralaisen kotivakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Vuokranantajan vakuutus</duet-submenu-bar-dropdown-link>
</duet-submenu-bar-dropdown>
<duet-submenu-bar-dropdown icon="category-personal">
<span slot="label">Terveys</span>
<duet-submenu-bar-dropdown-link>Tapaturmavakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Sairaskuluvakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Urheiluvakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Vauvavakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Lapsivakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Työkyvyttömyysvakuutus</duet-submenu-bar-dropdown-link>
<duet-divider margin="none"></duet-divider>
<duet-submenu-bar-dropdown-link caret highlight>Kaikki henkilövakuutukset</duet-submenu-bar-dropdown-link>
</duet-submenu-bar-dropdown>
<duet-submenu-bar-link icon="category-travel">Matka</duet-submenu-bar-link>
<duet-submenu-bar-link icon="category-life-insurance">Henki</duet-submenu-bar-link>
<duet-submenu-bar-dropdown icon="category-pet">
<span slot="label">Eläimet</span>
<duet-submenu-bar-dropdown-link>Koiravakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Kissavakuutus</duet-submenu-bar-dropdown-link>
<duet-submenu-bar-dropdown-link>Hevosvakuutus</duet-submenu-bar-dropdown-link>
</duet-submenu-bar-dropdown>
<duet-submenu-bar-link icon="category-forest">Metsä</duet-submenu-bar-link>
</duet-submenu-bar>
</duet-nav>


<script>
var search = document.querySelector("#search")

search.addEventListener("click", function (e) {
e.preventDefault()
console.log("Search clicked", e)
})
</script>

Properties #

Property Attribute Description Type Default
theme theme Theme. "" | "default" | "turva" ""

Usage #

This section includes guidelines for designers and developers about the usage of this component in different contexts.

When to use #

  • When you want to have duet controlled navigation.

When not to use #

  • Only use it to create navigation.

Accessibility #

This component has been validated to meet the WCAG 2.1 AA accessibility guidelines. You can find additional information regarding accessibility of this component below.


Integration

For integration, event and theming guidelines, please see Using Components. This documentation explains how to implement and use Duet’s components across different technologies like Angular, React or Vanilla JavaScript.



Tutorials

Follow these practical tutorials to learn how to build simple page layouts using Duet’s CSS Framework, Web Components and other features:

Tutorials

Building Layouts

Tutorials

Using CLI Tools

Tutorials

Creating Custom Patterns

Tutorials

Server Side Rendering

Tutorials

Sharing Prototypes

Tutorials

Usage With Markdown


Troubleshooting

If you experience any issues while using a component, please head over to the Support page for more guidelines and help.