<mds-header-bar> <div class="flex gap-200 items-center"> <mds-img src="./logo.svg"></mds-img> <mds-text typography="h6">Portale Enti</mds-text> </div> <mds-button slot="nav" variant="dark" tone="outline">Accedi</mds-button> <mds-button slot="nav" variant="primary" tone="strong">Registrati</mds-button></mds-header-bar><mds-header> <mds-header-bar> <mds-text typography="h6">Gestione Pratiche</mds-text> <mds-button slot="nav" variant="dark" tone="text" icon="mi/baseline/person">Account</mds-button> <mds-button slot="nav" variant="primary" tone="strong">Nuovo documento</mds-button> </mds-header-bar> <!-- drawer and other header regions go here --></mds-header><!-- Always show the hamburger (single-column layout, any viewport) --><mds-header-bar menu="all"> <mds-text typography="h6">Area Personale</mds-text></mds-header-bar>
<!-- No hamburger at all (branding-only bar) --><mds-header-bar menu="none"> <mds-img src="./logo.svg"></mds-img></mds-header-bar><!-- Always show inline nav (no responsive collapsing) --><mds-header-bar menu="none" nav="all"> <mds-img src="./logo.svg"></mds-img> <mds-button slot="nav" variant="dark" tone="text">Chi siamo</mds-button> <mds-button slot="nav" variant="dark" tone="text">Servizi</mds-button> <mds-button slot="nav" variant="primary" tone="strong">Contatti</mds-button></mds-header-bar><mds-header-bar id="main-bar"> <mds-text typography="h6">Applicazione</mds-text></mds-header-bar>
<script> document.getElementById('main-bar').addEventListener('mdsHeaderBarOpen', () => { console.log('menu aperto'); });</script><mds-header id="main-header"> <mds-header-bar> <mds-text typography="h6">Dashboard</mds-text> </mds-header-bar> <div slot="menu"> <mds-button label="Pratiche" variant="dark" tone="text"></mds-button> </div></mds-header>
<script> // Close the drawer after the user selects a menu item const header = document.getElementById('main-header'); header.setOpened(false);</script>mds-header-bar { --mds-header-bar-hamburger-color: rgb(var(--magma-accent-fg));}/* Increase the gap between the nav buttons and the hamburger */mds-header-bar::part(actions) { gap: calc(var(--spacing) * 600);}
/* Visually highlight the hamburger button in a branded theme */mds-header-bar::part(hamburger) { border-radius: var(--magma-radius-md); background-color: rgb(var(--magma-accent-surface));}