<h1>Use <code>@layout</code> directive</h1>
<p>The <code>@layout</code> directive is used to set the layout for the component and overriding the settings from <code>_Imports.razor</code> and <code>&lt;RouteView&gt;</code>.</p>
<blockquote>You can <a href="https://github.com/Blazor-School/route-view-blazor-wasm" target="_blank" rel="noopener">download the example</a> code used in this topic on GitHub.</blockquote>
<h1>Creating a layout</h1>
<p>Before setting the layout for components, you need a layout first