Global Header
The <nys-globalheader> component renders an agency-branded header with application and agency names, primary navigation links, and a responsive mobile menu. It sits below <nys-unavheader> and automatically highlights the active navigation link based on the current URL.
<nys-globalheader
appName="User Registration Form"
agencyName="Office of Information Technology Services"
></nys-globalheader>
Can't use NYS Design System web components in your project? Try using the CSS Variables instead.
Accessibility
The <nys-globalheader> component includes the following accessibility-focused features:
-
Renders a
<header>landmark element, which screen readers identify as abannerregion. Users can navigate directly to this landmark using assistive technology shortcuts. -
All navigation links use standard
<a>elements and are fully keyboard-focusable. -
On narrow screens (below 1024px), navigation collapses into a mobile menu toggled by a button with a visible "MENU" / "CLOSE" label and corresponding icon.
-
The active navigation link is visually highlighted with a bold font weight and bottom border (desktop) or left border (mobile), providing clear orientation.
-
When using
<nys-skipnav>on your page, it should target your main content area. The Global Header provides thebannerlandmark that skip navigation helps users bypass. -
The
user-actionsslot supports keyboard-accessible controls like log-out buttons, maintaining tab order within the header.Additional accessibility test and build content is coming soon, in a new format.
Options
With Links
For public-facing sites, the Global Header can include navigation links. To add links, follow this format:
- Use an unordered list (
<ul>) inside the<nys-globalheader>slot. - Each list item (
<li>) should contain an anchor (<a href="">) linking to the desired URL.
Use the prop homepageLink to link your agencyName to your homepage.
The component automatically highlights the active link based on the current URL path. It matches the most specific path, so /services/benefits will match before /services.
Note: On screens below 1024px, navigation links collapse into a mobile menu. A "MENU" button appears to the left of the header content and toggles the full link list. Applications using the Global Header typically do not include links in the application or agency name to reduce distractions. Public-facing sites may include them to aid navigation.
<nys-globalheader homepageLink="https://ny.gov" agencyName="Office of Information Technology Services">
<ul>
<li><a href="https://its.ny.gov/services">Services</a></li>
<li><a href="https://its.ny.gov/get-help">Help Center</a></li>
<li><a href="https://its.ny.gov/cybersecurity">Cybersecurity</a></li>
<li><a href="https://its.ny.gov/policies">Policies and Laws</a></li>
<li><a href="https://its.ny.gov/procurement">Procurement</a></li>
<li><a href="https://its.ny.gov/about-us">About Us</a></li>
</ul>
</nys-globalheader>
Just Agency Name
Use the prop homepageLink to link your agencyName to your homepage.
<nys-globalheader agencyName="Office of Information Technology Services">
</nys-globalheader>
Just Application Name
<nys-globalheader appName="NYS Employee Portal"></nys-globalheader>
User Actions
The <nys-globalheader> component includes a named slot called user-actions. This slot allows you to insert custom HTML content, such as user profile links, settings, or logout buttons, into the header.
<nys-globalheader appName="User Registration Form" agencyName="Office of Information Technology Services">
<nys-button id="my-action-slot" slot="user-actions" label="John Smith" prefixIcon="slotted">
<nys-avatar
slot="prefix-icon"
ariaLabel="User avatar"
initials="JS"
></nys-avatar>
</nys-button>
</nys-globalheader>
<nys-dropdownmenu id="dropdownmenu" for="my-action-slot">
<nys-dropdownmenuitem label="Profile" href="/profile"></nys-dropdownmenuitem>
<nys-dropdownmenuitem label="Repositories & Github Pages" href="/repos"></nys-dropdownmenuitem>
<nys-dropdownmenuitem label="Organizations" href="/organizations" disabled></nys-dropdownmenuitem>
<nys-dropdownmenuitem label="Sign out" href="/logout"></nys-dropdownmenuitem>
</nys-dropdownmenu>
NYS Brand Logo
The NYS Brand Logo can be toggled on via the nysLogo property for back-office applications.
Note: Do not use the NYS brand mark on public-facing applications. This is intended exclusively for internal and back-office use.
<nys-globalheader nysLogo appName="Admin Dashboard"></nys-globalheader>
Usage
Do
- Use on every agency site and application. The Global Header is a required page element.
- Place below
<nys-unavheader>when using the Universal Navigation Header. - Use
agencyNamealone for public-facing agency websites not tied to a specific application; omit it for statewide portals that aren't agency-specific. - Use
appNamefor named applications (e.g., "Employee Time Tracker" or "License Renewal Portal"). - Combine
appNameandagencyNamewhen an application belongs to a specific agency. - Set
homepageLinkto make the header title clickable. On public-facing sites, this is the primary path back to the homepage. - Use the
user-actionsslot for authenticated applications that need log-out buttons or user profile controls. - Keep navigation link lists to 6 items or fewer. On mobile, these collapse into a full-width menu.
- Add the
nysLogoproperty to display the NYS brand mark for internal applications that don't require public-facing agency branding.
Don't
- Don't use
appNamefor an agency name. Use theagencyNameprop instead. - Don't add navigation links to application headers where users should remain focused on a task (e.g., a multi-step form).
- Don't place secondary or utility navigation in the Global Header. Use
<nys-globalfooter>for secondary links. - Don't use the
nysLogoproperty on public-facing sites, instead use the<nys-unavheader>for statewide branding.
Properties
| Property | Type | Default |
|---|---|---|
id |
String | "" |
agencyName |
String | "" |
appName |
String | "" |
homepageLink |
String (URL) | "" |
Style Overrides
There are no existing CSS variables for this component. Explore existing options, or propose a new one with a Component Proposal.
Events
This component does not emit any custom events.
Suggest a New Component
Do you have an idea for a new NYS Design System web component? Look through the existing proposals in our GitHub discussions board to see if someone already proposed something similar. If not, feel free to submit one.
Edit this page on GitHub (Permissions required)
Last updated: June 18, 2026