Skip to main content

Header

Documentazione ed esempi per la creazione di una testata di navigazione.

L’header di un sito della Pubblica Amministrazione è solitamente composto di 3 elementi principali:

  • Un cosiddetto Slim Header, una sottile fascia dello stesso colore o, preferibilmente, di colore lievemente diverso rispetto al tema principale del sito, che mostra appartenenza e alcuni link funzionali con impatto globale o esterno al sito stesso.
  • Un Header Centrale che identifica in modo chiaro il sito attraverso logo, testo e social, e può contenere un link per effettuare ricerche sul sito.
  • Un Header Nav dedicato alla navigazione, visibile su schermi di grandi dimensioni e attraverso il classico pulsante di tipo “burger menu” () su dispositivi mobili.

Accessibilità

Considerando l’importanza dell’Header per la navigazione, si ricorda porre particolare attenzione all’utilizzo della corretta semantica HTML, alle etichette e agli attributi ARIA, oltre a validare e testare sempre con utenti il risultato.

Il titolo del sito, “Nome dell’Istituzione” negli esempi, è contenuto in un <div> generico e non un tag <h1> per evitare conflitti con gli <h1> presenti nelle singole pagine. Nel caso in cui la home page fosse priva di un titolo (es: primo contenuto è una ultima notizia in evidenza) si può applicare il tag <h1> al titolo dell’header unicamente in quella pagina oppure creare un h1 nei contenuti principali di pagina con classe .visually-hidden. Questa ultima soluzione sarà anche utile a dare focus direttamente al tag <h1> laddove siano presenti skiplinks che permettano agli utenti che navigano da tastiera o con tecnologie assistive di saltare i contenuti dell’Header.

Maggiori dettagli sull’accessibilità del componente megamenu nella relativa pagina.

Breaking feature dalla versione 2.8.0

  • Il toggle del dropdown diventa <button> invece di <a>.
  • Gli altri elementi <a> che si comportano come toggle dropdown (eg. scelta Lingua), hanno l’aggiunta dell’attributo role="button".
  • Il markup del Megamenu cambia come nel nuovo componente, per approfondire andare alla relativa pagina.

Slim Header

Lo Slim Header mostra un’intestazione, solitamente con riferimento all’ente di appartenenza del progetto o riferimenti utili, oltre ad un eventuale menu per il cambio lingua e l’accesso ad area riservata.
Il cambio lingua è gestito con il componente dropdown.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<div class="it-header-slim-wrapper">
  <div class="container">
    <div class="row">
      <div class="col-12">
        <div class="it-header-slim-wrapper-content">
          <a class="d-none d-lg-block navbar-brand" href="#">Ente appartenenza</a>
          <div class="nav-mobile">
            <nav aria-label="Navigazione accessoria">
              <a class="it-opener d-lg-none" data-bs-toggle="collapse" href="#menu1a" role="button" aria-expanded="false" aria-controls="menu4">
                <span>Ente appartenenza</span>
                <svg class="icon" aria-hidden="true"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
              </a>
              <div class="link-list-wrapper collapse" id="menu1a">
                <ul class="link-list">
                  <li><a class="dropdown-item list-item" href="#">Link 1</a></li>
                  <li><a class="list-item active" href="#" aria-current="page">Link 2 (Attivo)</a></li>
                </ul>
              </div>
            </nav>
          </div>
          <div class="it-header-slim-right-zone">
            <div class="nav-item dropdown">
              <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                <span class="visually-hidden">Selezione lingua: lingua selezionata</span>
                <span>ITA</span>
                <svg class="icon d-none d-lg-block"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
              </a>
              <div class="dropdown-menu">
                <div class="row">
                  <div class="col-12">
                    <div class="link-list-wrapper">
                      <ul class="link-list">
                        <li><a class="dropdown-item list-item" href="#"><span>ITA <span class="visually-hidden">selezionata</span></span></a></li>
                        <li><a class="dropdown-item list-item" href="#"><span>ENG</span></a></li>
                      </ul>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="it-access-top-wrapper">
              <a class="btn btn-primary btn-sm" href="#">Accedi</a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Zona destra con pulsante full-responsive

Per trasformare il pulsante di action situato nell’elemento identificato con .it-header-slim-right-zone e renderlo full-responsive è sufficiente applicare la classe .btn-full alla classe .btn del link/pulsante.

Il modificatore .btn-full è disponibile anche con il tema chiaro attivato da .theme-light.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<div class="it-header-slim-wrapper">
  <div class="container">
    <div class="row">
      <div class="col-12">
        <div class="it-header-slim-wrapper-content">
          <a class="d-lg-block navbar-brand" href="#">Ente appartenenza</a>
          <div class="it-header-slim-right-zone">
            <div class="nav-item dropdown">
              <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                <span class="visually-hidden">Selezione lingua: lingua selezionata</span>
                <span>ITA</span>
                <svg class="icon d-none d-lg-block"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
              </a>
              <div class="dropdown-menu">
                <div class="row">
                  <div class="col-12">
                    <div class="link-list-wrapper">
                      <ul class="link-list">
                        <li><a class="dropdown-item list-item" href="#"><span>ITA <span class="visually-hidden">selezionata</span></span></a></li>
                        <li><a class="dropdown-item list-item" href="#"><span>ENG</span></a></li>
                      </ul>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <a href="#" class="btn btn-primary btn-icon btn-full">
              <span class="rounded-icon">
                <svg class="icon icon-primary">
                  <use href="/dist/svg/sprites.svg#it-user"></use>
                </svg>
              </span>
              <span class="d-none d-lg-block">Accedi all'area personale</span>
            </a>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Versione chiara

Per cambiare tema all’header slim è sufficiente aggiungere la classe theme-light al tag <div class="it-header-slim-wrapper">

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<div class="it-header-slim-wrapper theme-light">
  <div class="container">
    <div class="row">
      <div class="col-12">
        <div class="it-header-slim-wrapper-content">
          <a class="d-none d-lg-block navbar-brand" href="#">Ente appartenenza</a>
          <div class="nav-mobile">
            <nav aria-label="Navigazione accessoria">
              <a class="it-opener d-lg-none" data-bs-toggle="collapse" href="#menu1b" role="button" aria-expanded="false" aria-controls="menu4">
                <span>Ente appartenenza</span>
                <svg class="icon" aria-hidden="true"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
              </a>
              <div class="link-list-wrapper collapse" id="menu1b">
                <ul class="link-list">
                  <li><a class="dropdown-item list-item" href="#">Link 1</a></li>
                  <li><a class="list-item active" href="#" aria-current="page">Link 2 (Attivo)</a></li>
                </ul>
              </div>
            </nav>
          </div>
          <div class="it-header-slim-right-zone">
            <div class="nav-item dropdown">
              <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                <span class="visually-hidden">Selezione lingua: lingua selezionata</span>
                <span>ITA</span>
                <svg class="icon d-none d-lg-block"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
              </a>
              <div class="dropdown-menu">
                <div class="row">
                  <div class="col-12">
                    <div class="link-list-wrapper">
                      <ul class="link-list">
                        <li><a class="dropdown-item list-item" href="#"><span>ITA <span class="visually-hidden">selezionata</span></span></a></li>
                        <li><a class="dropdown-item list-item" href="#"><span>ENG</span></a></li>
                      </ul>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="it-access-top-wrapper">
              <a class="btn btn-primary btn-sm" href="#">Accedi</a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Header Centrale

Header Centrale, per mostrare il logo dell’ente e la sua descrizione, link aggiuntivi ai social media e l’accesso al motore di ricerca, se presente.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<div class="it-header-center-wrapper">
  <div class="container">
    <div class="row">
      <div class="col-12">
        <div class="it-header-center-content-wrapper">
          <div class="it-brand-wrapper">
            <a href="#">
              <svg class="icon" aria-hidden="true">
                <use href="/dist/svg/sprites.svg#it-pa"></use>
              </svg>
              <div class="it-brand-text">
                <div class="it-brand-title">Nome dell'Istituzione</div>
                <div class="it-brand-tagline d-none d-md-block">Tag line dell'Istituzione</div>
              </div>
            </a>
          </div>
          <div class="it-right-zone">
            <div class="it-socials d-none d-md-flex">
              <span>Seguici su</span>
              <ul>
                <li>
                  <a href="#" aria-label="Facebook" target="_blank">
                    <svg class="icon">
                      <use href="/dist/svg/sprites.svg#it-facebook"></use>
                    </svg>
                  </a>
                </li>
                <li>
                  <a href="#" aria-label="Github" target="_blank">
                    <svg class="icon">
                      <use href="/dist/svg/sprites.svg#it-github"></use>
                    </svg>
                  </a>
                </li>
                <li>
                  <a href="#" aria-label="Twitter" target="_blank">
                    <svg class="icon">
                      <use href="/dist/svg/sprites.svg#it-twitter"></use>
                    </svg>
                  </a>
                </li>
              </ul>
            </div>
            <div class="it-search-wrapper">
              <span class="d-none d-md-block">Cerca</span>
              <a class="search-link rounded-icon" aria-label="Cerca nel sito" href="#">
                <svg class="icon">
                  <use href="/dist/svg/sprites.svg#it-search"></use>
                </svg>
              </a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Versione compatta

Per utilizzare la versione più compatta in verticale dell’header centrale è sufficiente aggiungere la classe it-small-header al tag <div class="it-header-center-wrapper">

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<div class="it-header-center-wrapper it-small-header">
  <div class="container">
    <div class="row">
      <div class="col-12">
        <div class="it-header-center-content-wrapper">
          <div class="it-brand-wrapper">
            <a href="#">
              <svg class="icon" aria-hidden="true">
                <use href="/dist/svg/sprites.svg#it-pa"></use>
              </svg>
              <div class="it-brand-text">
                <div class="it-brand-title">Nome dell'Istituzione</div>
                <div class="it-brand-tagline d-none d-md-block">Tag line dell'Istituzione</div>
              </div>
            </a>
          </div>
          <div class="it-right-zone">
            <div class="it-socials d-none d-md-flex">
              <span>Seguici su</span>
              <ul>
                <li>
                  <a href="#" aria-label="Facebook" target="_blank">
                    <svg class="icon">
                      <use href="/dist/svg/sprites.svg#it-facebook"></use>
                    </svg>
                  </a>
                </li>
                <li>
                  <a href="#" aria-label="Github" target="_blank">
                    <svg class="icon">
                      <use href="/dist/svg/sprites.svg#it-github"></use>
                    </svg>
                  </a>
                </li>
                <li>
                  <a href="#" aria-label="Twitter" target="_blank">
                    <svg class="icon">
                      <use href="/dist/svg/sprites.svg#it-twitter"></use>
                    </svg>
                  </a>
                </li>
              </ul>
            </div>
            <div class="it-search-wrapper">
              <span class="d-none d-md-block">Cerca</span>
              <a class="search-link rounded-icon" aria-label="Cerca nel sito" href="#">
                <svg class="icon">
                  <use href="/dist/svg/sprites.svg#it-search"></use>
                </svg>
              </a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Versione chiara

Per cambiare tema all’header centrale è sufficiente aggiungere la classe theme-light al tag <div class="it-header-center-wrapper">.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<div class="it-header-center-wrapper theme-light">
  <div class="container">
    <div class="row">
      <div class="col-12">
        <div class="it-header-center-content-wrapper">
          <div class="it-brand-wrapper">
            <a href="#">
              <svg class="icon" aria-hidden="true">
                <use href="/dist/svg/sprites.svg#it-pa"></use>
              </svg>
              <div class="it-brand-text">
                <div class="it-brand-title">Nome dell'Istituzione</div>
                <div class="it-brand-tagline d-none d-md-block">Tag line dell'Istituzione</div>
              </div>
            </a>
          </div>
          <div class="it-right-zone">
            <div class="it-socials d-none d-md-flex">
              <span>Seguici su</span>
              <ul>
                <li>
                  <a href="#" aria-label="Facebook" target="_blank">
                    <svg class="icon">
                      <use href="/dist/svg/sprites.svg#it-facebook"></use>
                    </svg>
                  </a>
                </li>
                <li>
                  <a href="#" aria-label="Github" target="_blank">
                    <svg class="icon">
                      <use href="/dist/svg/sprites.svg#it-github"></use>
                    </svg>
                  </a>
                </li>
                <li>
                  <a href="#" aria-label="Twitter" target="_blank">
                    <svg class="icon">
                      <use href="/dist/svg/sprites.svg#it-twitter"></use>
                    </svg>
                  </a>
                </li>
              </ul>
            </div>
            <div class="it-search-wrapper">
              <span class="d-none d-md-block">Cerca</span>
              <a class="search-link rounded-icon" aria-label="Cerca nel sito" href="#">
                <svg class="icon">
                  <use href="/dist/svg/sprites.svg#it-search"></use>
                </svg>
              </a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Header Nav

Header Nav, per elencare le voci di navigazione, siano esse semplici link, o pulsanti per Dropdown e Megamenu.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<div class="it-header-navbar-wrapper">
  <div class="container">
    <div class="row">
      <div class="col-12">
        <!--start nav-->
        <nav class="navbar navbar-expand-lg has-megamenu" aria-label="Navigazione principale">
          <button class="custom-navbar-toggler" type="button" aria-controls="nav1" aria-expanded="false" aria-label="Mostra/Nascondi la navigazione" data-bs-toggle="navbarcollapsible" data-bs-target="#nav1">
            <svg class="icon bg-override"><use href="/dist/svg/sprites.svg#it-burger"></use></svg>
          </button>
          <div class="navbar-collapsable" id="nav1" style="display: none;">
            <div class="overlay" style="display: none;"></div>
            <div class="close-div">
              <button class="btn close-menu" type="button">
                <span class="visually-hidden">Nascondi la navigazione</span>
                <svg class="icon"><use href="/dist/svg/sprites.svg#it-close-big"></use></svg>
              </button>
            </div>
            <div class="menu-wrapper">
              <ul class="navbar-nav">
                <li class="nav-item active"><a class="nav-link active" href="#" aria-current="page"><span>Link 1 (attivo)</span></a></li>
                <li class="nav-item"><a class="nav-link disabled" href="#" aria-disabled="true"><span>Link 2 (disabilitato)</span></a></li>
                <li class="nav-item"><a class="nav-link" href="#"><span>Link 3</span></a></li>
                <li class="nav-item"><a class="nav-link" href="#"><span>Link 4</span></a></li>
                <li class="nav-item dropdown">
                  <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false" id="mainNavDropdown1">
                    <span>Menu Dropdown</span>
                    <svg class="icon icon-xs"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                  </a>
                  <div class="dropdown-menu" role="region" aria-labelledby="mainNavDropdown1">
                    <div class="link-list-wrapper">
                      <ul class="link-list">
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 1</span></a></li>
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 2</span></a></li>
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 3</span></a></li>
                        <li><span class="divider"></span></li>
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 4</span></a></li>
                      </ul>
                    </div>
                  </div>
                </li>
                <!-- megamenu -->
                <li class="nav-item dropdown megamenu">
                  <button type="button" class="nav-link dropdown-toggle px-lg-2 px-xl-3" data-bs-toggle="dropdown" aria-expanded="false" id="megamenu-1" data-focus-mouse="false">
                      <span>Megamenu</span><svg role="img" class="icon icon-xs ms-1"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                  </button>
                  <div class="dropdown-menu shadow-lg" role="region" aria-labelledby="megamenu-1">
                    <div class="megamenu pb-5 pt-3 py-lg-0">
                      <div class="row">
                        <div class="col-xs-12 col-lg-4 px-0">
                          <div class="row">
                            <div class="col-12 it-vertical it-description pb-lg-3">
                              <div class="description-content ps-4 ps-sm-5 ms-3">
                                <div class="ratio ratio-21x9 lightgrey-bg-a1 mb-4 rounded">
                                  <figure class="figure">
                                    <img src="https://via.placeholder.com/560x240/ebebeb/808080/?text=Immagine" class="figure-img img-fluid rounded" alt="Segnaposto">
                                  </figure>
                                </div>
                                <p>
                                  Testo utile a fornire una descrizione dei contenuti della sezione <strong>megamenu</strong>.
                                </p>
                              </div>
                            </div>
                          </div>
                        </div>
                        <div class="col-12 col-lg-8">
                          <div class="it-heading-link-wrapper">
                            <a class="it-heading-link" href="#"><svg role="img" class="icon icon-sm me-2 mb-1"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                            <span>Esplora la sezione megamenu</span>
                            </a>
                          </div>
                          <div class="row">
                            <div class="col-12 col-lg-6">
                              <div class="link-list-wrapper">
                                <ul class="link-list">
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 1</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 2</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item " href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 3</span>
                                    </a>
                                  </li>
                                </ul>
                              </div>
                            </div>
                            <div class="col-12 col-lg-6">
                              <div class="link-list-wrapper">
                                <ul class="link-list">
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 4</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 5</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item " href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 6</span>
                                    </a>
                                  </li>
                                </ul>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </nav>
      </div>
    </div>
  </div>
</div>

Temi colore disponibili

I’Header Nav ha due temi colore, uno chiaro (“light”) e uno scuro (“dark”). Lo stile di default ha differenti caratteristiche colore a seconda della versione desktop e mobile:

  • Su desktop lo stile di default ha un background di colore primario e link bianchi. Gli elementi Dropdown e Megamenu hanno background bianco, testi neri e link di colore primario.
  • Su mobile lo stile di default ha un background bianco e testi e link di colore primario.

Per modificare il tema dell’Header Nav è sufficiente aggiungere una o tutte e due le seguenti classi al tag <nav class="it-header-navbar-wrapper">:

  • la classe .theme-dark-mobile riguarda la versione mobile dell’Header Nav, impostando lo sfondo di colore primario con testi e link bianchi;
  • la classe .theme-light-desk riguarda la versione desktop dell’Header Nav, impostando lo sfondo bianco con testi e link di colore primario. Gli elementi Dropdown e Megamenu in questo caso assumono sfondo di colore primario con testi e link bianchi.

Header Nav standard

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<div class="it-header-navbar-wrapper">
  <div class="container">
    <div class="row">
      <div class="col-12">
        <!--start nav-->
        <nav class="navbar navbar-expand-lg has-megamenu" aria-label="Navigazione principale">
          <button class="custom-navbar-toggler" type="button" aria-controls="nav0" aria-expanded="false" aria-label="Mostra/Nascondi la navigazione" data-bs-toggle="navbarcollapsible" data-bs-target="#nav0">
            <svg class="icon bg-override"><use href="/dist/svg/sprites.svg#it-burger"></use></svg>
          </button>
          <div class="navbar-collapsable" id="nav0" style="display: none;">
            <div class="overlay" style="display: none;"></div>
            <div class="close-div">
              <button class="btn close-menu" type="button">
                <span class="visually-hidden">Nascondi la navigazione</span>
                <svg class="icon"><use href="/dist/svg/sprites.svg#it-close-big"></use></svg>
              </button>
            </div>
            <div class="menu-wrapper">
              <ul class="navbar-nav">
                <li class="nav-item active"><a class="nav-link active" href="#" aria-current="page"><span>Link 1 (attivo)</span></a></li>
                <li class="nav-item"><a class="nav-link disabled" href="#" aria-disabled="true"><span>Link 2 (disabilitato)</span></a></li>
                <li class="nav-item"><a class="nav-link" href="#"><span>Link 3</span></a></li>
                <li class="nav-item"><a class="nav-link" href="#"><span>Link 4</span></a></li>
                <li class="nav-item dropdown">
                  <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false" id="mainNavDropdown0">
                    <span>Menu Dropdown</span>
                    <svg class="icon icon-xs"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                  </a>
                  <div class="dropdown-menu" role="region" aria-labelledby="mainNavDropdown0">
                    <div class="link-list-wrapper">
                      <ul class="link-list">
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 1</span></a></li>
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 2</span></a></li>
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 3</span></a></li>
                        <li><span class="divider"></span></li>
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 4</span></a></li>
                      </ul>
                    </div>
                  </div>
                </li>
                <!-- megamenu -->
                <li class="nav-item dropdown megamenu">
                  <button type="button" class="nav-link dropdown-toggle px-lg-2 px-xl-3" data-bs-toggle="dropdown" aria-expanded="false" id="megamenu-2" data-focus-mouse="false">
                      <span>Megamenu</span><svg role="img" class="icon icon-xs ms-1"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                  </button>
                  <div class="dropdown-menu shadow-lg" role="region" aria-labelledby="megamenu-2">
                    <div class="megamenu pb-5 pt-3 py-lg-0">
                      <div class="row">
                        <div class="col-xs-12 col-lg-4 px-0">
                          <div class="row">
                            <div class="col-12 it-vertical it-description pb-lg-3">
                              <div class="description-content ps-4 ps-sm-5 ms-3">
                                <div class="ratio ratio-21x9 lightgrey-bg-a1 mb-4 rounded">
                                  <figure class="figure">
                                    <img src="https://via.placeholder.com/560x240/ebebeb/808080/?text=Immagine" class="figure-img img-fluid rounded" alt="Segnaposto">
                                  </figure>
                                </div>
                                <p>
                                  Testo utile a fornire una descrizione dei contenuti della sezione <strong>megamenu</strong>.
                                </p>
                              </div>
                            </div>
                          </div>
                        </div>
                        <div class="col-12 col-lg-8">
                          <div class="it-heading-link-wrapper">
                            <a class="it-heading-link" href="#"><svg role="img" class="icon icon-sm me-2 mb-1"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                            <span>Esplora la sezione megamenu</span>
                            </a>
                          </div>
                          <div class="row">
                            <div class="col-12 col-lg-6">
                              <div class="link-list-wrapper">
                                <ul class="link-list">
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 1</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 2</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item " href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 3</span>
                                    </a>
                                  </li>
                                </ul>
                              </div>
                            </div>
                            <div class="col-12 col-lg-6">
                              <div class="link-list-wrapper">
                                <ul class="link-list">
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 4</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 5</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item " href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 6</span>
                                    </a>
                                  </li>
                                </ul>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </nav>
      </div>
    </div>
  </div>
</div>

Header Nav mobile scura

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<div class="it-header-navbar-wrapper theme-dark-mobile">
  <div class="container">
    <div class="row">
      <div class="col-12">
        <!--start nav-->
        <nav class="navbar navbar-expand-lg has-megamenu" aria-label="Navigazione principale">
          <button class="custom-navbar-toggler" type="button" aria-controls="nav2" aria-expanded="false" aria-label="Mostra/Nascondi la navigazione" data-bs-toggle="navbarcollapsible" data-bs-target="#nav2">
            <svg class="icon bg-override"><use href="/dist/svg/sprites.svg#it-burger"></use></svg>
          </button>
          <div class="navbar-collapsable" id="nav2" style="display: none;">
            <div class="overlay" style="display: none;"></div>
            <div class="close-div">
              <button class="btn close-menu" type="button">
                <span class="visually-hidden">Nascondi la navigazione</span>
                <svg class="icon"><use href="/dist/svg/sprites.svg#it-close-big"></use></svg>
              </button>
            </div>
            <div class="menu-wrapper">
              <ul class="navbar-nav">
                <li class="nav-item active"><a class="nav-link active" href="#" aria-current="page"><span>Link 1 (attivo)</span></a></li>
                <li class="nav-item"><a class="nav-link disabled" href="#" aria-disabled="true"><span>Link 2 (disabilitato)</span></a></li>
                <li class="nav-item"><a class="nav-link" href="#"><span>Link 3</span></a></li>
                <li class="nav-item"><a class="nav-link" href="#"><span>Link 4</span></a></li>
                <li class="nav-item dropdown">
                  <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false" id="mainNavDropdown2">
                    <span>Menu Dropdown</span>
                    <svg class="icon icon-xs"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                  </a>
                  <div class="dropdown-menu" role="region" aria-labelledby="mainNavDropdown2">
                    <div class="link-list-wrapper">
                      <ul class="link-list">
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 1</span></a></li>
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 2</span></a></li>
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 3</span></a></li>
                        <li><span class="divider"></span></li>
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 4</span></a></li>
                      </ul>
                    </div>
                  </div>
                </li>
                <!-- megamenu -->
                <li class="nav-item dropdown megamenu">
                  <button type="button" class="nav-link dropdown-toggle px-lg-2 px-xl-3" data-bs-toggle="dropdown" aria-expanded="false" id="megamenu-3" data-focus-mouse="false">
                      <span>Megamenu</span><svg role="img" class="icon icon-xs ms-1"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                  </button>
                  <div class="dropdown-menu shadow-lg" role="region" aria-labelledby="megamenu-3">
                    <div class="megamenu pb-5 pt-3 py-lg-0">
                      <div class="row">
                        <div class="col-xs-12 col-lg-4 px-0">
                          <div class="row">
                            <div class="col-12 it-vertical it-description pb-lg-3">
                              <div class="description-content ps-4 ps-sm-5 ms-3">
                                <div class="ratio ratio-21x9 lightgrey-bg-a1 mb-4 rounded">
                                  <figure class="figure">
                                    <img src="https://via.placeholder.com/560x240/ebebeb/808080/?text=Immagine" class="figure-img img-fluid rounded" alt="Segnaposto">
                                  </figure>
                                </div>
                                <p>
                                  Testo utile a fornire una descrizione dei contenuti della sezione <strong>megamenu</strong>.
                                </p>
                              </div>
                            </div>
                          </div>
                        </div>
                        <div class="col-12 col-lg-8">
                          <div class="it-heading-link-wrapper">
                            <a class="it-heading-link" href="#"><svg role="img" class="icon icon-sm me-2 mb-1"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                            <span>Esplora la sezione megamenu</span>
                            </a>
                          </div>
                          <div class="row">
                            <div class="col-12 col-lg-6">
                              <div class="link-list-wrapper">
                                <ul class="link-list">
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 1</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 2</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item " href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 3</span>
                                    </a>
                                  </li>
                                </ul>
                              </div>
                            </div>
                            <div class="col-12 col-lg-6">
                              <div class="link-list-wrapper">
                                <ul class="link-list">
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 4</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 5</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item " href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 6</span>
                                    </a>
                                  </li>
                                </ul>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </nav>
      </div>
    </div>
  </div>
</div>

Header Nav desktop chiara

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<div class="it-header-navbar-wrapper theme-light-desk">
  <div class="container">
    <div class="row">
      <div class="col-12">
        <!--start nav-->
        <nav class="navbar navbar-expand-lg has-megamenu" aria-label="Navigazione principale">
          <button class="custom-navbar-toggler" type="button" aria-controls="nav3" aria-expanded="false" aria-label="Mostra/Nascondi la navigazione" data-bs-toggle="navbarcollapsible" data-bs-target="#nav3">
            <svg class="icon">
              <use href="/dist/svg/sprites.svg#it-burger"></use>
            </svg>
          </button>
          <div class="navbar-collapsable" id="nav3" style="display: none;">
            <div class="overlay" style="display: none;"></div>
            <div class="close-div">
              <button class="btn close-menu" type="button">
                <span class="visually-hidden">Nascondi la navigazione</span>
                <svg class="icon"><use href="/dist/svg/sprites.svg#it-close-big"></use></svg>
              </button>
            </div>
            <div class="menu-wrapper">
              <ul class="navbar-nav">
                <li class="nav-item active"><a class="nav-link active" href="#" aria-current="page"><span>Link 1 (attivo)</span></a></li>
                <li class="nav-item"><a class="nav-link disabled" href="#" aria-disabled="true"><span>Link 2 (disabilitato)</span></a></li>
                <li class="nav-item"><a class="nav-link" href="#"><span>Link 3</span></a></li>
                <li class="nav-item"><a class="nav-link" href="#"><span>Link 4</span></a></li>
                <li class="nav-item dropdown">
                  <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false" id="mainNavDropdown3">
                    <span>Menu Dropdown</span>
                    <svg class="icon icon-xs"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                  </a>
                  <div class="dropdown-menu" role="region" aria-labelledby="mainNavDropdown3">
                    <div class="link-list-wrapper">
                      <ul class="link-list">
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 1</span></a></li>
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 2</span></a></li>
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 3</span></a></li>
                        <li><span class="divider"></span></li>
                        <li><a class="dropdown-item list-item" href="#"><span>Link lista 4</span></a></li>
                      </ul>
                    </div>
                  </div>
                </li>
                <!-- megamenu -->
                <li class="nav-item dropdown megamenu">
                  <button type="button" class="nav-link dropdown-toggle px-lg-2 px-xl-3" data-bs-toggle="dropdown" aria-expanded="false" id="megamenu-4" data-focus-mouse="false">
                      <span>Megamenu</span><svg role="img" class="icon icon-xs ms-1"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                  </button>
                  <div class="dropdown-menu shadow-lg" role="region" aria-labelledby="megamenu-4">
                    <div class="megamenu pb-5 pt-3 py-lg-0">
                      <div class="row">
                        <div class="col-xs-12 col-lg-4 px-0">
                          <div class="row">
                            <div class="col-12 it-vertical it-description pb-lg-3">
                              <div class="description-content ps-4 ps-sm-5 ms-3">
                                <div class="ratio ratio-21x9 lightgrey-bg-a1 mb-4 rounded">
                                  <figure class="figure">
                                    <img src="https://via.placeholder.com/560x240/ebebeb/808080/?text=Immagine" class="figure-img img-fluid rounded" alt="Segnaposto">
                                  </figure>
                                </div>
                                <p>
                                  Testo utile a fornire una descrizione dei contenuti della sezione <strong>megamenu</strong>.
                                </p>
                              </div>
                            </div>
                          </div>
                        </div>
                        <div class="col-12 col-lg-8">
                          <div class="it-heading-link-wrapper">
                            <a class="it-heading-link" href="#"><svg role="img" class="icon icon-sm me-2 mb-1"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                            <span>Esplora la sezione megamenu</span>
                            </a>
                          </div>
                          <div class="row">
                            <div class="col-12 col-lg-6">
                              <div class="link-list-wrapper">
                                <ul class="link-list">
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 1</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 2</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item " href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 3</span>
                                    </a>
                                  </li>
                                </ul>
                              </div>
                            </div>
                            <div class="col-12 col-lg-6">
                              <div class="link-list-wrapper">
                                <ul class="link-list">
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 4</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item" href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 5</span>
                                    </a>
                                  </li>
                                  <li>
                                    <a class="list-item dropdown-item " href="#">
                                      <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                      <span>Link lista 6</span>
                                    </a>
                                  </li>
                                </ul>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </nav>
      </div>
    </div>
  </div>
</div>

Al menu di navigazione principale può essere aggiunto anche un menu di navigazione secondario includendo a .menu-wrapper una seconda lista <ul> con classe .navbar-nav.navbar-secondary e la stessa struttura dati della lista .navbar-nav principale.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<div class="it-header-navbar-wrapper">
  <div class="container">
    <div class="row">
      <div class="col-12">
        <!--start nav-->
        <nav class="navbar navbar-expand-lg has-megamenu" aria-label="Navigazione principale">
          <button class="custom-navbar-toggler" type="button" aria-controls="nav4" aria-expanded="false" aria-label="Mostra/Nascondi la navigazione" data-bs-toggle="navbarcollapsible" data-bs-target="#nav4">
            <svg class="icon bg-override"><use href="/dist/svg/sprites.svg#it-burger"></use></svg>
          </button>
          <div class="navbar-collapsable" id="nav4" style="display: none;">
            <div class="overlay" style="display: none;"></div>
            <div class="close-div">
              <button class="btn close-menu" type="button">
                <span class="visually-hidden">Nascondi la navigazione</span>
                <svg class="icon"><use href="/dist/svg/sprites.svg#it-close-big"></use></svg>
              </button>
            </div>
            <div class="menu-wrapper">
              <ul class="navbar-nav">
                <li class="nav-item active"><a class="nav-link active" href="#" aria-current="page"><span>Link 1 (attivo)</span></a></li>
                <li class="nav-item"><a class="nav-link disabled" href="#" aria-disabled="true"><span>Link 2 (disabilitato)</span></a></li>
                <li class="nav-item"><a class="nav-link" href="#"><span>Link 3</span></a></li>
                <li class="nav-item"><a class="nav-link" href="#"><span>Link 4</span></a></li>
              </ul>
              <ul class="navbar-nav navbar-secondary">
                <li class="nav-item"><a class="nav-link" href="#"><span>Link 5</span></a></li>
                <li class="nav-item"><a class="nav-link" href="#"><span>Link 6</span></a></li>
                <li class="nav-item"><a class="nav-link" href="#"><span>Link 7</span></a></li>
                <li class="nav-item"><a class="nav-link" href="#"><span>Link 8</span></a></li>
              </ul>
            </div>
          </div>
        </nav>
      </div>
    </div>
  </div>
</div>

Header Completa

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<header class="it-header-wrapper">
  <div class="it-header-slim-wrapper">
    <div class="container">
      <div class="row">
        <div class="col-12">
          <div class="it-header-slim-wrapper-content">
            <a class="d-none d-lg-block navbar-brand" href="#">Ente appartenenza</a>
            <div class="nav-mobile">
              <nav aria-label="Navigazione secondaria">
                <a class="it-opener d-lg-none" data-bs-toggle="collapse" href="#menuC1" role="button" aria-expanded="false" aria-controls="menuC1">
                  <span>Ente appartenenza</span>
                  <svg class="icon" aria-hidden="true"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                </a>
                <div class="link-list-wrapper collapse" id="menuC1">
                  <ul class="link-list">
                    <li><a class="dropdown-item list-item" href="#">Link 1</a></li>
                    <li><a class="list-item active" href="#" aria-current="page">Link 2 (Attivo)</a></li>
                  </ul>
                </div>
              </nav>
            </div>
            <div class="it-header-slim-right-zone">
              <div class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                  <span class="visually-hidden">Selezione lingua: lingua selezionata</span>
                  <span>ITA</span>
                  <svg class="icon d-none d-lg-block"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                </a>
                <div class="dropdown-menu">
                  <div class="row">
                    <div class="col-12">
                      <div class="link-list-wrapper">
                        <ul class="link-list">
                          <li><a class="dropdown-item list-item" href="#"><span>ITA <span class="visually-hidden">selezionata</span></span></a></li>
                          <li><a class="dropdown-item list-item" href="#"><span>ENG</span></a></li>
                        </ul>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <div class="it-access-top-wrapper">
                <a class="btn btn-primary btn-sm" href="#">Accedi</a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="it-nav-wrapper">
    <div class="it-header-center-wrapper">
      <div class="container">
        <div class="row">
          <div class="col-12">
            <div class="it-header-center-content-wrapper">
              <div class="it-brand-wrapper">
                <a href="#">
                  <svg class="icon" aria-hidden="true"><use href="/dist/svg/sprites.svg#it-pa"></use></svg>
                  <div class="it-brand-text">
                    <div class="it-brand-title">Nome dell'Istituzione</div>
                    <div class="it-brand-tagline d-none d-md-block">Tag line dell'Istituzione</div>
                  </div>
                </a>
              </div>
              <div class="it-right-zone">
                <div class="it-socials d-none d-md-flex">
                  <span>Seguici su</span>
                  <ul>
                    <li>
                      <a href="#" aria-label="Facebook" target="_blank">
                        <svg class="icon"><use href="/dist/svg/sprites.svg#it-facebook"></use></svg>
                      </a>
                    </li>
                    <li>
                      <a href="#" aria-label="Github" target="_blank">
                        <svg class="icon"><use href="/dist/svg/sprites.svg#it-github"></use></svg>
                      </a>
                    </li>
                    <li>
                      <a href="#" aria-label="Twitter" target="_blank">
                        <svg class="icon"><use href="/dist/svg/sprites.svg#it-twitter"></use></svg>
                      </a>
                    </li>
                  </ul>
                </div>
                <div class="it-search-wrapper">
                  <span class="d-none d-md-block">Cerca</span>
                  <a class="search-link rounded-icon" aria-label="Cerca nel sito" href="#">
                    <svg class="icon"><use href="/dist/svg/sprites.svg#it-search"></use></svg>
                  </a>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="it-header-navbar-wrapper">
      <div class="container">
        <div class="row">
          <div class="col-12">
            <!--start nav-->
            <nav class="navbar navbar-expand-lg has-megamenu" aria-label="Navigazione principale">
              <button class="custom-navbar-toggler" type="button" aria-controls="navC1" aria-expanded="false" aria-label="Mostra/Nascondi la navigazione" data-bs-toggle="navbarcollapsible" data-bs-target="#navC1">
                <svg class="icon">
                  <use href="/dist/svg/sprites.svg#it-burger"></use>
                </svg>
              </button>
              <div class="navbar-collapsable" id="navC1" style="display: none;">
                <div class="overlay" style="display: none;"></div>
                <div class="close-div">
                  <button class="btn close-menu" type="button">
                    <span class="visually-hidden">Nascondi la navigazione</span>
                    <svg class="icon">
                      <use href="/dist/svg/sprites.svg#it-close-big"></use>
                    </svg>
                  </button>
                </div>
                <div class="menu-wrapper">
                  <ul class="navbar-nav">
                    <li class="nav-item active"><a class="nav-link active" href="#" aria-current="page"><span>Link 1 (attivo)</span></a></li>
                    <li class="nav-item"><a class="nav-link disabled" href="#" aria-disabled="true"><span>Link 2 (disabilitato)</span></a></li>
                    <li class="nav-item"><a class="nav-link" href="#"><span>Link 3</span></a></li>
                    <li class="nav-item"><a class="nav-link" href="#"><span>Link 4</span></a></li>
                    <li class="nav-item dropdown">
                      <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false" id="mainNavDropdownC1">
                        <span>Menu Dropdown</span>
                        <svg class="icon icon-xs">
                          <use href="/dist/svg/sprites.svg#it-expand"></use>
                        </svg>
                      </a>
                      <div class="dropdown-menu" role="region" aria-labelledby="mainNavDropdownC1">
                        <div class="link-list-wrapper">
                          <ul class="link-list">
                            <li><a class="dropdown-item list-item" href="#"><span>Link lista 1</span></a></li>
                            <li><a class="dropdown-item list-item" href="#"><span>Link lista 2</span></a></li>
                            <li><a class="dropdown-item list-item" href="#"><span>Link lista 3</span></a></li>
                            <li><span class="divider"></span></li>
                            <li><a class="dropdown-item list-item" href="#"><span>Link lista 4</span></a></li>
                          </ul>
                        </div>
                      </div>
                    </li>
                    <!-- megamenu -->
                    <li class="nav-item dropdown megamenu">
                      <button type="button" class="nav-link dropdown-toggle px-lg-2 px-xl-3" data-bs-toggle="dropdown" aria-expanded="false" id="megamenu-5" data-focus-mouse="false">
                          <span>Megamenu</span><svg role="img" class="icon icon-xs ms-1"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                      </button>
                      <div class="dropdown-menu shadow-lg" role="region" aria-labelledby="megamenu-5">
                        <div class="megamenu pb-5 pt-3 py-lg-0">
                          <div class="row">
                            <div class="col-xs-12 col-lg-4 px-0">
                              <div class="row">
                                <div class="col-12 it-vertical it-description pb-lg-3">
                                  <div class="description-content ps-4 ps-sm-5 ms-3">
                                    <div class="ratio ratio-21x9 lightgrey-bg-a1 mb-4 rounded">
                                      <figure class="figure">
                                        <img src="https://via.placeholder.com/560x240/ebebeb/808080/?text=Immagine" class="figure-img img-fluid rounded" alt="Segnaposto">
                                      </figure>
                                    </div>
                                    <p>
                                      Testo utile a fornire una descrizione dei contenuti della sezione <strong>megamenu</strong>.
                                    </p>
                                  </div>
                                </div>
                              </div>
                            </div>
                            <div class="col-12 col-lg-8">
                              <div class="it-heading-link-wrapper">
                                <a class="it-heading-link" href="#"><svg role="img" class="icon icon-sm me-2 mb-1"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                <span>Esplora la sezione megamenu</span>
                                </a>
                              </div>
                              <div class="row">
                                <div class="col-12 col-lg-6">
                                  <div class="link-list-wrapper">
                                    <ul class="link-list">
                                      <li>
                                        <a class="list-item dropdown-item" href="#">
                                          <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                          <span>Link lista 1</span>
                                        </a>
                                      </li>
                                      <li>
                                        <a class="list-item dropdown-item" href="#">
                                          <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                          <span>Link lista 2</span>
                                        </a>
                                      </li>
                                      <li>
                                        <a class="list-item dropdown-item " href="#">
                                          <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                          <span>Link lista 3</span>
                                        </a>
                                      </li>
                                    </ul>
                                  </div>
                                </div>
                                <div class="col-12 col-lg-6">
                                  <div class="link-list-wrapper">
                                    <ul class="link-list">
                                      <li>
                                        <a class="list-item dropdown-item" href="#">
                                          <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                          <span>Link lista 4</span>
                                        </a>
                                      </li>
                                      <li>
                                        <a class="list-item dropdown-item" href="#">
                                          <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                          <span>Link lista 5</span>
                                        </a>
                                      </li>
                                      <li>
                                        <a class="list-item dropdown-item " href="#">
                                          <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                          <span>Link lista 6</span>
                                        </a>
                                      </li>
                                    </ul>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </li>
                  </ul>
                </div>
              </div>
            </nav>
          </div>
        </div>
      </div>
    </div>
  </div>
</header>

Versione chiara

Nella versione light è consigliabile aggiungere la classe .it-shadow al tag <div class="it-header-wrapper">.
Verrà creata un’ombra per enfatizzare l’Header rispetto alla pagina in cui è contenuto.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<header class="it-header-wrapper it-shadow">
  <div class="it-header-slim-wrapper theme-light">
    <div class="container">
      <div class="row">
        <div class="col-12">
          <div class="it-header-slim-wrapper-content">
            <a class="d-none d-lg-block navbar-brand" href="#">Ente appartenenza</a>
            <div class="nav-mobile">
              <nav aria-label="Navigazione secondaria">
                <a class="it-opener d-lg-none" data-bs-toggle="collapse" href="#menuC2" role="button" aria-expanded="false" aria-controls="menuC2">
                  <span>Ente appartenenza</span>
                  <svg class="icon" aria-hidden="true"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                </a>
                <div class="link-list-wrapper collapse" id="menuC2">
                  <ul class="link-list">
                    <li><a class="dropdown-item list-item" href="#">Link 1</a></li>
                    <li><a class="list-item active" href="#" aria-current="page">Link 2 (Attivo)</a></li>
                  </ul>
                </div>
              </nav>
            </div>
            <div class="it-header-slim-right-zone">
              <div class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                  <span class="visually-hidden">Selezione lingua: lingua selezionata</span>
                  <span>ITA</span>
                  <svg class="icon d-none d-lg-block"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                </a>
                <div class="dropdown-menu">
                  <div class="row">
                    <div class="col-12">
                      <div class="link-list-wrapper">
                        <ul class="link-list">
                          <li><a class="dropdown-item list-item" href="#"><span>ITA <span class="visually-hidden">selezionata</span></span></a></li>
                          <li><a class="dropdown-item list-item" href="#"><span>ENG</span></a></li>
                        </ul>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <div class="it-access-top-wrapper">
                <a class="btn btn-primary btn-sm" href="#">Accedi</a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="it-nav-wrapper">
    <div class="it-header-center-wrapper theme-light">
      <div class="container">
        <div class="row">
          <div class="col-12">
            <div class="it-header-center-content-wrapper">
              <div class="it-brand-wrapper">
                <a href="#">
                  <svg class="icon" aria-hidden="true"><use href="/dist/svg/sprites.svg#it-pa"></use></svg>
                  <div class="it-brand-text">
                    <div class="it-brand-title">Nome dell'Istituzione</div>
                    <div class="it-brand-tagline d-none d-md-block">Tag line dell'Istituzione</div>
                  </div>
                </a>
              </div>
              <div class="it-right-zone">
                <div class="it-socials d-none d-md-flex">
                  <span>Seguici su</span>
                  <ul>
                    <li>
                      <a href="#" aria-label="Facebook" target="_blank">
                        <svg class="icon"><use href="/dist/svg/sprites.svg#it-facebook"></use></svg>
                      </a>
                    </li>
                    <li>
                      <a href="#" aria-label="Github" target="_blank">
                        <svg class="icon"><use href="/dist/svg/sprites.svg#it-github"></use></svg>
                      </a>
                    </li>
                    <li>
                      <a href="#" aria-label="Twitter" target="_blank">
                        <svg class="icon"><use href="/dist/svg/sprites.svg#it-twitter"></use></svg>
                      </a>
                    </li>
                  </ul>
                </div>
                <div class="it-search-wrapper">
                  <span class="d-none d-md-block">Cerca</span>
                  <a class="search-link rounded-icon" aria-label="Cerca nel sito" href="#">
                    <svg class="icon"><use href="/dist/svg/sprites.svg#it-search"></use></svg>
                  </a>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="it-header-navbar-wrapper theme-light-desk">
      <div class="container">
        <div class="row">
          <div class="col-12">
            <!--start nav-->
            <nav class="navbar navbar-expand-lg has-megamenu" aria-label="Navigazione principale">
              <button class="custom-navbar-toggler" type="button" aria-controls="navC2" aria-expanded="false" aria-label="Mostra/Nascondi la navigazione" data-bs-toggle="navbarcollapsible" data-bs-target="#navC2">
                <svg class="icon"><use href="/dist/svg/sprites.svg#it-burger"></use></svg>
              </button>
              <div class="navbar-collapsable" id="navC2" style="display: none;">
                <div class="overlay" style="display: none;"></div>
                <div class="close-div">
                  <button class="btn close-menu" type="button">
                    <span class="visually-hidden">Nascondi la navigazione</span>
                    <svg class="icon"><use href="/dist/svg/sprites.svg#it-close-big"></use></svg>
                  </button>
                </div>
                <div class="menu-wrapper">
                  <ul class="navbar-nav">
                    <li class="nav-item active"><a class="nav-link active" href="#" aria-current="page"><span>Link 1 (attivo)</span></a></li>
                    <li class="nav-item"><a class="nav-link disabled" href="#" aria-disabled="true"><span>Link 2 (disabilitato)</span></a></li>
                    <li class="nav-item"><a class="nav-link" href="#"><span>Link 3</span></a></li>
                    <li class="nav-item"><a class="nav-link" href="#"><span>Link 4</span></a></li>
                    <li class="nav-item dropdown">
                      <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false" id="mainNavDropdownC2">
                        <span>Menu Dropdown</span>
                        <svg class="icon icon-xs"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                      </a>
                      <div class="dropdown-menu" role="region" aria-labelledby="mainNavDropdownC2">
                        <div class="link-list-wrapper">
                          <ul class="link-list">
                            <li><a class="dropdown-item list-item" href="#"><span>Link lista 1</span></a></li>
                            <li><a class="dropdown-item list-item" href="#"><span>Link lista 2</span></a></li>
                            <li><a class="dropdown-item list-item" href="#"><span>Link lista 3</span></a></li>
                            <li><span class="divider"></span></li>
                            <li><a class="dropdown-item list-item" href="#"><span>Link lista 4</span></a></li>
                          </ul>
                        </div>
                      </div>
                    </li>
                    <!-- megamenu -->
                    <li class="nav-item dropdown megamenu">
                      <button type="button" class="nav-link dropdown-toggle px-lg-2 px-xl-3" data-bs-toggle="dropdown" aria-expanded="false" id="megamenu-6" data-focus-mouse="false">
                          <span>Megamenu</span><svg role="img" class="icon icon-xs ms-1"><use href="/dist/svg/sprites.svg#it-expand"></use></svg>
                      </button>
                      <div class="dropdown-menu shadow-lg" role="region" aria-labelledby="megamenu-6">
                        <div class="megamenu pb-5 pt-3 py-lg-0">
                          <div class="row">
                            <div class="col-xs-12 col-lg-4 px-0">
                              <div class="row">
                                <div class="col-12 it-vertical it-description pb-lg-3">
                                  <div class="description-content ps-4 ps-sm-5 ms-3">
                                    <div class="ratio ratio-21x9 lightgrey-bg-a1 mb-4 rounded">
                                      <figure class="figure">
                                        <img src="https://via.placeholder.com/560x240/ebebeb/808080/?text=Immagine" class="figure-img img-fluid rounded" alt="Segnaposto">
                                      </figure>
                                    </div>
                                    <p>
                                      Testo utile a fornire una descrizione dei contenuti della sezione <strong>megamenu</strong>.
                                    </p>
                                  </div>
                                </div>
                              </div>
                            </div>
                            <div class="col-12 col-lg-8">
                              <div class="it-heading-link-wrapper">
                                <a class="it-heading-link" href="#"><svg role="img" class="icon icon-sm me-2 mb-1"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                <span>Esplora la sezione megamenu</span>
                                </a>
                              </div>
                              <div class="row">
                                <div class="col-12 col-lg-6">
                                  <div class="link-list-wrapper">
                                    <ul class="link-list">
                                      <li>
                                        <a class="list-item dropdown-item" href="#">
                                          <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                          <span>Link lista 1</span>
                                        </a>
                                      </li>
                                      <li>
                                        <a class="list-item dropdown-item" href="#">
                                          <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                          <span>Link lista 2</span>
                                        </a>
                                      </li>
                                      <li>
                                        <a class="list-item dropdown-item " href="#">
                                          <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                          <span>Link lista 3</span>
                                        </a>
                                      </li>
                                    </ul>
                                  </div>
                                </div>
                                <div class="col-12 col-lg-6">
                                  <div class="link-list-wrapper">
                                    <ul class="link-list">
                                      <li>
                                        <a class="list-item dropdown-item" href="#">
                                          <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                          <span>Link lista 4</span>
                                        </a>
                                      </li>
                                      <li>
                                        <a class="list-item dropdown-item" href="#">
                                          <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                          <span>Link lista 5</span>
                                        </a>
                                      </li>
                                      <li>
                                        <a class="list-item dropdown-item " href="#">
                                          <svg role="img" class="icon icon-sm me-2"><use href="/dist/svg/sprites.svg#it-arrow-right-triangle"></use></svg>
                                          <span>Link lista 6</span>
                                        </a>
                                      </li>
                                    </ul>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </li>
                  </ul>
                </div>
              </div>
            </nav>
          </div>
        </div>
      </div>
    </div>
  </div>
</header>

Header Sticky

Affinché la testata rimanga visibile in formato ridotto anche allo scorrere della pagina, è sufficiente utilizzare la classe .it-header-sticky nell’elemento identificato con la classe .it-header-wrapper.

1
<div class="it-header-wrapper it-header-sticky">...</div>

È disponibile una pagina di esempio dedicata a questa funzionalità per comprenderne appieno significato ed utilizzo.

Tramite JavaScript

È possibile inizializzare il componente tramite JavaScript:

1
var headerSticky = new bootstrap.HeaderSticky(document.getElementById('myHeaderSticky'), options)

Metodi

Metodi asincroni e transizioni

Tutti i metodi API sono asincroni e avviano una transizione. Ritornano al chiamante non appena viene avviata la transizione ma prima che termini. Inoltre, una chiamata al metodo su un componente in transizione verrà ignorata.

Per maggiori informazioni consulta la documentazione Javascript di Bootstrap (in inglese).

getOrCreateInstance

Metodo statico che consente di ottenere l’istanza di un HeaderSticky associata ad un elemento del DOM o di crearne una nuova nel caso non fosse stata inizializzata.

1
2
var headerStickyElement = document.querySelector('#myHeaderSticky')
var headerSticky = bootstrap.HeaderSticky.getOrCreateInstance(headerStickyElement) // Returns a Bootstrap modal instance