Header
Read more about the header component on the Gov.UK Design System website
@using GovUkDesignSystemDotNet
@await Html.GovUkHeader(new HeaderViewModel
{
HomepageUrl = "/"
})
Options
| Name | Type | Description |
|---|---|---|
| HomepageUrl | string |
The URL of the homepage.
Defaults to "/".
|
| ProductName | string |
Product name, used when the product name follows on directly from ‘GOV.UK’.
For example, GOV.UK Pay or GOV.UK Design System.
In most circumstances, you should use serviceName.
|
| ContainerClasses | string | Classes for the container, useful if you want to make the header fixed width. |
| Classes | List<string> | Classes to add to the header container. |
| Attributes | Dictionary<string, string> | HTML attributes (for example data attributes) to add to the header container. |
Examples
Using ProductName
@using GovUkDesignSystemDotNet
@await Html.GovUkHeader(new HeaderViewModel
{
HomepageUrl = "/",
ProductName = "Design System"
})