Microsite header

Communicate what stage the service is at, connect to Alberta.ca, and gather feedback on your service.

Props

feedbackUrl
string
URL to a feedback page displayed when provided.
feedbackUrlTarget
GoabLinkTarget
Sets the target attribute for the feedback URL link.
Defaults to blank.
headerUrlTarget
GoabLinkTarget
Sets the target attribute for the header link.
Defaults to blank.
maxContentWidth
string
Maximum width of the content area.
Defaults to 100%.
testId
string
Sets a data-testid attribute for automated testing.
type
GoabServiceLevel
The service type which determines the badge style. "live" shows official government site text, "alpha" and "beta" show development stage badges.
feedbackUrl
string
Url to feedback page that will be displayed when provided.
feedbackUrlTarget
GoabLinkTarget
For internal feedback urls sets target.
headerUrlTarget
GoabLinkTarget
Sets the target attribute for the header link.
maxContentWidth
string
Maximum width of the content area.
testId
string
Sets a data-testid attribute for automated testing.
type
GoabServiceLevel
The service type which determines the badge style. "live" shows official government site text, "alpha" and "beta" show development stage badges.
feedbackurl
string
Url to feedback page that will be displayed when provided.
feedbackurltarget
GoabMicrositeHeaderUrlTargetType self | blank
For internal feedback urls sets target=
Defaults to blank.
hasfeedbackhandler
boolean
When true, enables a custom feedback click handler via the _feedbackClick event instead of navigating to feedbackurl.
Defaults to false.
headerurltarget
GoabMicrositeHeaderUrlTargetType self | blank
Sets the target attribute for the header link.
Defaults to blank.
maxcontentwidth
any
Maximum width of the content area
Defaults to 100%.
testId
string
Sets a data-testid attribute for automated testing.
type
GoabMicrositeHeaderType live | alpha | beta
The service type which determines the badge style. "live" shows official government site text, "alpha" and "beta" show development stage badges.
version
string
App or service version displayed on the right side of the header.

Events

onFeedbackClick
() => void
Callback fired when the feedback link is clicked, enables custom feedback handling.
onFeedbackClick
CustomEvent
Emits when the feedback link is clicked.
_feedbackClick
CustomEvent

Slots

version
App or service version displayed on the right side of the header. Accepts a string or custom ReactNode for rich content.
version
App or service version displayed on the right side of the header. Accepts a string or custom ReactNode for rich content.
version
App or service version displayed on the right side of the header. Accepts a string or custom ReactNode for rich content.
Examples
import { GoabMicrositeHeader } from "@abgov/react-components";

export function LinkTheUserToGiveFeedbackToTheService() {
  const onClick = () => {
    console.log("Feedback clicked");
    alert("Thank you for your feedback!");
  };

  return <GoabMicrositeHeader type="alpha" onFeedbackClick={onClick} />;
}
onFeedbackClick(): void {
    console.log("Feedback clicked");
    alert("Thank you for your feedback!");
  }
<goab-microsite-header type="alpha" (onFeedbackClick)="onFeedbackClick()"></goab-microsite-header>
document.getElementById("microsite-header").addEventListener("_feedbackClick", () => {
  console.log("Feedback clicked");
  alert("Thank you for your feedback!");
});
<goa-microsite-header type="alpha" id="microsite-header"></goa-microsite-header>

Show version number

<GoabMicrositeHeader
      type="alpha"
      version={
          <span>Slotted <b>version text</b>.</span>
          <span>v1.23</span>
      }
    />
<goab-microsite-header type="alpha" [version]="versionTemplate">
  <ng-template #versionTemplate>
    <span>Slotted <b>version text</b>.</span>
    <span>v1.23</span>
  </ng-template>
</goab-microsite-header>
<goa-microsite-header type="alpha">
  <div slot="version">
    <span>Slotted <b>version text</b>.</span>
    <span>v1.23</span>
  </div>
</goa-microsite-header>

No usage guidelines have been documented for this component yet.

All GoA Design System components are built to meet WCAG 2.2 AA standards. The following guidelines provide additional context for accessible implementation.

No accessibility-specific guidelines have been documented for this component yet.

View old component docs