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 variation="bordered">
<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 variation="inner-bordered">
<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" | "medium" | "small" | "x-large" | "x-small" "small"
labelWidth label-width Set the column width of the first column in percentages. For automatic sizing of the column you can use class "duet-list" with a native <dl> element. See list utilities of the CSS framework. "100" | "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"
responsive responsive Enable or disable the automatic responsive behaviour of the list component. Setting this option to "true" makes sure that contents are stacked vertically on mobile. When "false" is set, contents are always shown in a single row. boolean true
theme theme Theme of the list. "" | "default" | "turva" ""
variation variation Style variation of the list. "bordered" | "default" | "inner-bordered" | "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.

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.