Skip to main content

Tabs Ready

This template shows how to build a simple responsive view that utilizes Tab and Tab Group components. Please note that the example below does not represent a real use case.

Hint: Press F on your keyboard to view both templates and components in fullscreen and ESC to exit the fullscreen mode. You can also open the template in a new browser window.


Open in new window
<!DOCTYPE html>
<html class="duet-sticky-footer" lang="fi">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>LähiTapiola</title>
<link rel="stylesheet" href="https://cdn.duetds.com/api/fonts/3.0.36/lib/localtapiola.css" integrity="sha384-5JYmtSD7nykpUvSmTW1CHMoBDkBZUpUmG0vuh+NUVtZag3F75Kr7+/JU3J7JV6Wq" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.duetds.com/api/css/4.0.18/lib/duet.min.css" integrity="sha384-lXsZJzvyiyIDxPLVC56+vhjfm/vPD4eEAE1z2Q8niyNbr0NgPl6nxGKEkjg18yQf" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.duetds.com/api/tokens/4.0.36/lib/tokens.custom-properties.css" integrity="sha384-bdxOmb87eo3bfxU+AHyrr4fo/iBSqSRZs4tIRaXT/e/8FCLFnV3mcABYDi1/CNQU" crossorigin="anonymous" />
<script type="module" src="https://cdn.duetds.com/api/components/8.4.0/lib/duet/duet.esm.js" integrity="sha384-k6jjwTqRDqMj48MzOlZv4UbSJQpGjVArPXKS4EYcxmUU+huiJgRO+66K7KN+kohP" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.duetds.com/api/components/8.4.0/lib/duet/duet.js" integrity="sha384-uWHPeiybdN7WPOxcNK/EM2ZkaVcXuGUpqYw9IFr+t6Qy6bZ2O6LAlphjvuSrrPei" crossorigin="anonymous"></script>
</head>
<body>
<duet-header
language="fi"
skip-to-id="#content"
contact="Ota yhteyttä"
current-href="/vakuutukset/">

</duet-header>
<duet-hero
heading="Vakuutukset"
image="https://cdn.duetds.com/api/assets/illustrations/placeholder-light.svg"
button-label="Osta vakuutus"
button-url="/e-laskutus/"
margin="none"
id="content"
description="Tämä ingressi kappale on asetettu Hero-komponentin description asetuksella.">

</duet-hero>
<duet-layout>
<div slot="main">
<duet-tab-group>
<duet-tab label="Yhteenveto" selected>
<duet-card padding="large">
<duet-heading level="h2" visual-level="h4" border>Yhteenveto</duet-heading>
<duet-spacer size="x-large"></duet-spacer>
<duet-list variation="striped">
<duet-list-item>
<span slot="label">Kotivakuutus</span>
<span slot="value">Tunnus: 2191167, voimassa 21.6.2019 asti</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Autovakuutus</span>
<span slot="value">Tunnus: 4693062389, voimassa 21.6.2019 asti</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Henkivakuutus</span>
<span slot="value">Tunnus: 83062, voimassa 21.6.2019 asti</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Eläketurva</span>
<span slot="value">Tunnus: 99300, voimassa 21.6.2019 asti</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Vastuuvakuutus</span>
<span slot="value">Tunnus: 2191167, voimassa 21.6.2019 asti</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Tapaturmavakuutus</span>
<span slot="value">Tunnus: 4693062389, voimassa 21.6.2019 asti</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Eläinvakuutus</span>
<span slot="value">Tunnus: 83062, voimassa 21.6.2019 asti</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Sairausvakuutus</span>
<span slot="value">Tunnus: 99300, voimassa 21.6.2019 asti</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Venevakuutus</span>
<span slot="value">Tunnus: 2191167, voimassa 21.6.2019 asti</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Metsävakuutus</span>
<span slot="value">Tunnus: 4693062389, voimassa 21.6.2019 asti</span>
</duet-list-item>
</duet-list>
<duet-spacer size="x-large"></duet-spacer>
<duet-heading level="h2" visual-level="h4" border>Lisätietoja</duet-heading>
<duet-spacer size="x-large"></duet-spacer>
<duet-grid responsive breakpoint="medium">
<duet-grid-item margin="none" min-width="50%" fill>
<duet-card padding="x-small" variation="info">
<duet-heading level="h3" visual-level="h5">Turvan taso</duet-heading>
<duet-paragraph margin="none">
Eläintuho, sienituho, tulva, hyönteistuho, lumituho, myrsky, palo, vahingonteko ja varkaus.
</duet-paragraph>
</duet-card>
<duet-card padding="x-small" variation="info">
<duet-heading level="h3" visual-level="h5">Vuosimaksu</duet-heading>
<duet-paragraph margin="none">456,50&thinsp;</duet-paragraph>
</duet-card>
<duet-card padding="x-small" variation="info">
<duet-heading level="h3" visual-level="h5">Vakuutuskausi</duet-heading>
<duet-paragraph margin="none">16.04.2019&thinsp;&thinsp;15.4.2020</duet-paragraph>
</duet-card>
<duet-card padding="x-small" variation="info">
<duet-heading level="h3" visual-level="h5">Sopimustyyppi</duet-heading>
<duet-paragraph margin="none">Jatkuva</duet-paragraph>
</duet-card>
<duet-spacer size="xx-large"></duet-spacer>
</duet-grid-item>
<duet-grid-item margin="none" min-width="10%" fill></duet-grid-item>
<duet-grid-item margin="none" min-width="40%" fill>
<duet-heading level="h3" visual-level="h5">Tietoa vakuutusturvasta</duet-heading>
<duet-paragraph>
Metsätilalla voi olla yksi tai useampia metsätalousrakennuksia,
esimerkiksi vajoja ja puuliitereitä.
</duet-paragraph>
<duet-paragraph>
Metsätalouden rakennusten korvattavia vahinkotapahtumia ovat palo-,
myrsky-, varkaus- ja ilkivaltavahingot sekä ulkoiset rikkoutumiset.
</duet-paragraph>
<duet-paragraph>
Lue lisää <duet-link url="#">vakuutuskirjasta</duet-link> ja
<duet-link url="#">vakuutusehdoista</duet-link>.
</duet-paragraph>
<duet-spacer size="xx-large"></duet-spacer>
</duet-grid-item>
</duet-grid>
<duet-grid responsive breakpoint="medium">
<duet-grid-item margin="none" min-width="50%" fill>
<duet-heading level="h3">
Lue tästä esimerkkejä millaisia vahinkoja vakuutuksesi kattaa
</duet-heading>
<duet-paragraph>
Huomaathan, että jos vakuutukseen liittyy yksilöllisiä rajoituksia,
niin näitä poisrajattuja vahinkoja ei vakuutuksesta korvata. Vakuutuksen
yleiset rajoitukset löydät vakuutusehdoista.
</duet-paragraph>
</duet-grid-item>
<duet-grid-item margin="none" min-width="10%" fill></duet-grid-item>
<duet-grid-item margin="none" min-width="40%" fill>
</duet-grid-item>
</duet-grid>
</duet-card>
</duet-tab>
<duet-tab label="Kotivakuutus">
<duet-card padding="large">
<duet-heading level="h2" visual-level="h4" border>Kotivakuutus</duet-heading>
<duet-spacer size="x-large"></duet-spacer>
<duet-paragraph>Tab 2 content</duet-paragraph>
</duet-card>
</duet-tab>
<duet-tab label="Autovakuutus">
<duet-card padding="large">
<duet-heading level="h2" visual-level="h4" border>Autovakuutus</duet-heading>
<duet-spacer size="x-large"></duet-spacer>
<duet-paragraph>Tab 3 content</duet-paragraph>
</duet-card>
</duet-tab>
<duet-tab label="Henkivakuutus">
<duet-card padding="large">
<duet-heading level="h2" visual-level="h4" border>Henkivakuutus</duet-heading>
<duet-spacer size="x-large"></duet-spacer>
<duet-paragraph>Tab 4 content</duet-paragraph>
</duet-card>
</duet-tab>
<duet-tab label="Eläketurva">
<duet-card padding="large">
<duet-heading level="h2" visual-level="h4" border>Eläketurva</duet-heading>
<duet-spacer size="x-large"></duet-spacer>
<duet-paragraph>Tab 5 content</duet-paragraph>
</duet-card>
</duet-tab>
</duet-tab-group>
</div>
</duet-layout>
<duet-footer logo-href="#" language="fi"></duet-footer>
<script>
// Save references to components we want to adjust below
var header = document.querySelector("duet-header")
var footer = document.querySelector("duet-footer")

// Set the header main navigation items
header.items = [
{ label: 'Etusivu', href: '#' },
{ label: 'Vakuutukset', href: '/vakuutukset/' },
{ label: 'Vahinkoasiat', href: '#' },
{ label: 'Säästöt ja sijoitukset', href: '#' },
{ label: 'Laskut', href: '#', badge: true },
{ label: 'Viestit', href: '#' }
]

// Set the contact menu items
header.contactItems = [
{ label: "Lähetä viesti", href: "/viestit/laheta" },
{ label: "Avaa chat", href: "/chat/" },
{ label: "Yhteystiedot", href: "/yhteystiedot/" }
]

// Set the language menu items
header.languageItems = [
{ label: "Suomeksi", country: "fi", href: "/?lang=fi" },
{ label: "På Svenska", country: "sv", href: "/?lang=sv" },
{ label: "In English", country: "en", href: "/?lang=en" }
]

// Set label and href for session link
header.session = {
label: "Kirjaudu ulos",
href: "/?logout",
type: "logout"
}

// Set label and href for user profile link
header.user = {
label: "Laura",
href: "/?userId=1234"
}

// Listen for change events inside the header component
// prevent header links causing a navigation
function preventDefault(e) {
e.detail.originalEvent.preventDefault()
}

header.addEventListener("duetSessionClick", preventDefault)
header.addEventListener("duetUserClick", preventDefault)
header.addEventListener("duetLanguageSelect", preventDefault)
header.addEventListener("duetLogoClick", preventDefault)
header.addEventListener("duetContactClick", preventDefault)
header.addEventListener("duetItemClick", preventDefault)

// Set the main links in footer
footer.items = [
{ label: 'Hae korvausta', href: '#', icon: 'navigation-make-claim' },
{ label: 'Osta vakuutus', href: '#', icon: 'action-buy-insurance' },
{ label: 'Yhteystiedot', href: '#', icon: 'form-tel' }
]

// Set the help menu items in footer
footer.menu = [
{ label: 'Turvallisuus ja käyttöehdot', href: '#' },
{ label: 'Evästeet', href: '#' },
{ label: 'Henkilötietojen käsittely', href: '#' },
]
</script>
</body>
</html>

Integration

To install this template’s dependencies into your project, run:

npm install @duetds/components
npm install @duetds/css
npm install @duetds/fonts

For further guidelines, please see each package’s documentation.



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 template, please head over to the Support page for more guidelines and help.