Skip to main content

Footer Ready

Footer component is used as the global footer for all views. Contains copyright data and links to related documents.

Footer contains your application’s secondary menu items that perform an action when clicked. Each action in the footer should navigate to a href or trigger another action like a Modal overlay.

Examples #

Properties #

Property Attribute Description Type Default
accessibleLabel accessible-label Accessible label for footer string undefined
accessibleLabelExternal accessible-label-external Adds accessible label for tooltip that is shown in external link (url & external have both been set) string getLocaleString(this.accessibleLabelExternalDefaults)
accessibleLabelExternalDefaults accessible-label-external-default Property to change accessibleLabelExternal defaults on the component. normally you would handle these strings on an application level and override accessibleLabelExternal when needed DuetLangObject | string DuetStringsExternalDefaults
items items An array of items for the main footer links. Items have to include mandatory "label" and "href" fields to work. Additionally, you can pass an "id" that is added as an HTML identifier for the anchor tag. Note that previously mandatory "icon" field has now been removed - setting it has no effect. any undefined
language language [DEPRECATED] this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing

The currently active language. This setting changes the logo to match the chosen language.
"en" | "fi" | "sv" getLanguage()
logoHref logo-href URL that the logo link points to. string "/"
margin margin Controls the margin of the component. "auto" | "none" "auto"
menu menu An array of items for the small footer menu. Items have to include mandatory "label" and "href" fields to work. Additionally, you can pass an "id" that is added as an HTML identifier for the anchor tag. any undefined
theme theme Theme of the navigation. "" | "default" | "turva" ""
variation variation Style variation of the footer. "default" | "multilevel" | "simple" "default"

Events #

Event Description Type
duetAnalytics Event raised when an items with an associated analytics ID is clicked. Analytics ID can be accessed via event.detail.analyticsId CustomEvent<{ analyticsId: string; component: "duet-footer"; }>
duetChange [DEPRECATED] in favour of the more specific events like duetLogoClick. Callback for when a user is about to navigate to another page. You can prevent the default browser functionality by calling event.detail.originalEvent.preventDefault() inside your listener. Additionally, the passed data is available via event.detail.data.

CustomEvent<{ component: "duet-footer"; data: DuetFooterItem; originalEvent: Event; }>
duetEvent General event stream for the following events: item: onMouseEnter, onTouchDown; menuItem: onMouseEnter, onTouchDown;. You can prevent the default browser functionality by calling event.detail.originalEvent.preventDefault() inside your listener. Additionally, the passed data is available via event.detail.data. CustomEvent<{ component: "duet-footer"; data: DuetFooterItem; originalEvent: Event; }>
duetItemClick Event raised when the items are clicked. You can prevent the default browser functionality by calling event.detail.originalEvent.preventDefault() inside your listener. Additionally, the passed data is available via event.detail.data. CustomEvent<{ component: "duet-footer"; data: DuetFooterItem; originalEvent: Event; }>
duetLogoClick Event raised when the logo is clicked. You can prevent the default browser functionality by calling event.detail.originalEvent.preventDefault() inside your listener. Additionally, the passed data is available via event.detail.data. CustomEvent<{ component: "duet-footer"; data: DuetFooterItem; originalEvent: Event; }>
duetMenuClick Event raised when the menu links are clicked. You can prevent the default browser functionality by calling event.detail.originalEvent.preventDefault() inside your listener. Additionally, the passed data is available via event.detail.data. CustomEvent<{ component: "duet-footer"; data: DuetFooterItem; originalEvent: Event; }>

Slots #

Slot Description
"extra" A slot for extra links.
"info" A slot for additional info above footer items.

Shadow Parts #

Part Description
"menu" piercing selector for styling the menu section of the footer
"top" piercing selector for styling the top part of the footer

Usage #

This section includes guidelines for designers and developers about the usage of this component in different contexts.

When to use #

  • Footer component is used as the global footer for all views.

When not to use #

  • Inside HTML footer element as Duet Footer already uses it internally.

Variations #

This section describes the different component variations, their purpose, and when to use each variation.

Name Purpose
default Default style is the most common footer variation. Only switch to another variation if you need to adjust the visual weight of the element.
simple Simple variation should be used sparingly in views such as error pages.

Accessibility #

This component has been validated to meet the WCAG 2.1 AA accessibility guidelines. You can find additional information regarding accessibility of this component below.

Additional considerations #


Integration

For integration, event and theming guidelines, please see Using Components. This documentation explains how to implement and use Duet’s components across different technologies like Angular, React or Vanilla JavaScript.

Integration guidelines


Tutorials

Follow these practical tutorials to learn how to build simple page layouts using Duet’s CSS Framework, Web Components and other features:

Tutorials

Building Layouts

Tutorials

Using CLI Tools

Tutorials

Creating Custom Patterns

Tutorials

Server Side Rendering

Tutorials

Sharing Prototypes

Tutorials

Usage With Markdown


Troubleshooting

If you experience any issues while using a component, please head over to the Support page for more guidelines and help.