Logo Ready
Logo is a component used inside the Header and Footer components. Logo prodives options to customize the language and appearance in addition to theme.
<duet-logo language="fi" size="medium"></duet-logo>
<duet-logo language="fi" size="large"></duet-logo>
<div class="duet-background-secondary-turva duet-p-large duet-mt-large duet-radius-default">
<duet-logo language="sv" size="medium" inverse></duet-logo>
<duet-logo language="en" size="large" inverse></duet-logo>
</div>
Properties #
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
accessibleLabel | accessible-label | Accessible label. Defaults to what is in accessibleLabelDefaults prop. | string | getLocaleString(this.accessibleLabelDefaults) |
accessibleLabelDefaults | -- | Default translations for accessible label. | DuetLangObject | { fi: "Siirry etusivulle.", sv: "Gå till förstasidan.", en: "Go to front page.", } |
href | href | Where the logo links to. | string | "/" |
inverse | inverse | Use inverse version of the logo (white logo on dark background). | boolean | false |
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 language of the logo. | "en" | "fi" | "sv" | getLanguage() |
margin | margin | Controls the margin of the component. | "auto" | "none" | "auto" |
size | size | Size variation of the logo. | "large" | "medium" | "medium" |
theme | theme | Theme of the logo. | "" | "default" | "turva" | "" |
Methods #
setFocus(options?: FocusOptions) => Promise<void>
#
Sets focus on the specified duet-logo
. Use this method instead of the global
logo.focus()
.
Parameters #
Name | Type | Description |
---|---|---|
options | FocusOptions |
Returns #
Type: Promise<void>
Usage #
This section includes guidelines for designers and developers about the usage of this component in different contexts.
When to use #
- If you need LocalTapiola or Turva logo or their language variants.
When not to use #
- If you need another brand’s logo.
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.
- Logo renders as either regular anchor tag or a div depending whether a
href
was passed or not. - Logo doesn’t currently have any added functionality for assistive technologies.
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.
Tutorials
Follow these practical tutorials to learn how to build simple page layouts using Duet’s CSS Framework, Web Components and other features:
Building Layouts
TutorialsUsing CLI Tools
TutorialsCreating Custom Patterns
TutorialsServer Side Rendering
TutorialsSharing Prototypes
TutorialsUsage With Markdown
Troubleshooting
If you experience any issues while using a component, please head over to the Support page for more guidelines and help.