Skip to main content

List
Ready

Lists are used to display name/value pairs such as terms and definitions. Particularly useful for glossaries.

Examples

Open in new window
<duet-list variation="striped">
<duet-list-item>
<span slot="label">Nimi</span>
<span slot="value">Lasse Mäkinen</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Osoite</span>
<span slot="value">Kotikatu 23 A 4, 00220 Helsinki, Suomi</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Puhelin</span>
<span slot="value">+358 400 123 456</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Email</span>
<span slot="value">lasse.makinen@test.com</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Kieli</span>
<span slot="value">Suomi</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Alueyhtiö</span>
<span slot="value">Lähitapiola Keskinäinen Vakuutusyhtiö</span>
</duet-list-item>
</duet-list>
Open in new window
<duet-list>
<duet-list-item>
<span slot="label">Nimi</span>
<span slot="value">Lasse Mäkinen</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Osoite</span>
<span slot="value">Kotikatu 23 A 4, 00220 Helsinki, Suomi</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Puhelin</span>
<span slot="value">+358 400 123 456</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Email</span>
<span slot="value">lasse.makinen@test.com</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Kieli</span>
<span slot="value">Suomi</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Alueyhtiö</span>
<span slot="value">Lähitapiola Keskinäinen Vakuutusyhtiö</span>
</duet-list-item>
</duet-list>
Open in new window
<duet-list label-width="30" variation="striped">
<duet-list-item>
<span slot="label">Nimi</span>
<span slot="value">Lasse Mäkinen</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Osoite</span>
<span slot="value">Kotikatu 23 A 4, 00220 Helsinki, Suomi</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Puhelin</span>
<span slot="value">+358 400 123 456</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Email</span>
<span slot="value">lasse.makinen@test.com</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Kieli</span>
<span slot="value">Suomi</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Alueyhtiö</span>
<span slot="value">Lähitapiola Keskinäinen Vakuutusyhtiö</span>
</duet-list-item>
</duet-list>

<duet-list label-width="50" variation="striped">
<duet-list-item>
<span slot="label">Nimi</span>
<span slot="value">Lasse Mäkinen</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Osoite</span>
<span slot="value">Kotikatu 23 A 4, 00220 Helsinki, Suomi</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Puhelin</span>
<span slot="value">+358 400 123 456</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Email</span>
<span slot="value">lasse.makinen@test.com</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Kieli</span>
<span slot="value">Suomi</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Alueyhtiö</span>
<span slot="value">Lähitapiola Keskinäinen Vakuutusyhtiö</span>
</duet-list-item>
</duet-list>

<duet-list label-width="70" variation="striped">
<duet-list-item>
<span slot="label">Nimi</span>
<span slot="value">Lasse Mäkinen</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Osoite</span>
<span slot="value">Kotikatu 23 A 4, 00220 Helsinki, Suomi</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Puhelin</span>
<span slot="value">+358 400 123 456</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Email</span>
<span slot="value">lasse.makinen@test.com</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Kieli</span>
<span slot="value">Suomi</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Alueyhtiö</span>
<span slot="value">Lähitapiola Keskinäinen Vakuutusyhtiö</span>
</duet-list-item>
</duet-list>
Open in new window
<duet-card accessible-label="Pariturva-henkivakuutus, Laura-Karoliina Mäkinen" url="#" padding="large">
<duet-grid responsive distribution="space-between" alignment="top">
<duet-grid alignment="center" responsive breakpoint="medium">
<duet-grid-item fill>
<duet-heading level="h2" visual-level="h3">Pariturva-henkivakuutus</duet-heading>
<duet-spacer size="xx-small"></duet-spacer>
<duet-list padding="none" margin="none">
<duet-list-item>
<span slot="label">Hakemuksen luoja</span>
<span slot="value">Laura-Karoliina Mäkinen</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Vakuutusmäärä</span>
<span slot="value">55&nbsp;000,00&nbsp;</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Hinta</span>
<span slot="value">480,77&nbsp;€ / vuosi</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Hakemus luotu</span>
<span slot="value">20.2.2020</span>
</duet-list-item>
</duet-list>
</duet-grid-item>
<duet-grid-item margin="none">
<duet-grid mobile="center">
<duet-spacer breakpoint="medium" direction="horizontal" size="xxxx-large">
</duet-spacer>
<duet-button tabindex="-1" wrapping="none" margin="none" variation="primary">
Valitse
</duet-button>
</duet-grid>
<duet-spacer breakpoint="x-small" direction="vertical" size="large"></duet-spacer>
</duet-grid-item>
</duet-grid>
</duet-grid>
</duet-card>
Open in new window
<duet-list breakpoint="large" mobile="center" variation="striped">
<duet-list-item>
<span slot="label">Nimi</span>
<span slot="value">Lasse Mäkinen</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Osoite</span>
<span slot="value">Kotikatu 23 A 4, 00220 Helsinki, Suomi</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Puhelin</span>
<span slot="value">+358 400 123 456</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Email</span>
<span slot="value">lasse.makinen@test.com</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Kieli</span>
<span slot="value">Suomi</span>
</duet-list-item>
<duet-list-item>
<span slot="label">Alueyhtiö</span>
<span slot="value">Lähitapiola Keskinäinen Vakuutusyhtiö</span>
</duet-list-item>
</duet-list>

Properties #

Property Attribute Description Type Default
breakpoint breakpoint Switch the breakpoint used to trigger the content stacking. These match to similar media query tokens: $media-query-small and $media-query-large. "large" | "small" "small"
labelWidth label-width Set the column width of the first column in percentages. "30" | "50" | "70" "30"
margin margin Controls the margin of the component. "auto" | "none" "auto"
mobile mobile Adjusts the alignment of the list items on mobile breakpoint. "center" | "left" "left"
padding padding Controls the padding of the component. "auto" | "none" "auto"
theme theme Theme of the list. "" | "default" | "turva" ""
variation variation Style variation of the list. "default" | "striped" "default"

Usage #

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

When to use #

  • To display name/value pairs such as terms and definitions.
  • To display a glossary list.

When not to use #

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.


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:

Tutorials

Abstract

Tutorials

Building Layouts

Tutorials

Using CLI Tools

Tutorials

Creating Custom Patterns

Tutorials

Server Side Rendering

Tutorials

Sharing Prototypes

Tutorials

Usage With Markdown

Tutorials

VS Code

Tutorials

Zeplin


Troubleshooting

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