Skip to main content

Definition List ready

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

Examples

Open in new window
<duet-definition-list variation="striped"></duet-definition-list>

<script>
// Select the above definition list
var list = document.querySelector("duet-definition-list")

// Sets list items and their values
list.items = [
{ label: "Nimi", value: "Lasse Mäkinen" },
{ label: "Osoite", value: "Kotikatu 23 A 4, 00220 Helsinki, Suomi" },
{ label: "Puhelin", value: "+358 400 123 456" },
{ label: "Email", value: "lasse.makinen@test.com" },
{ label: "Kieli", value: "Suomi" },
{ label: "Alueyhtiö", value: "Lähitapiola Keskinäinen Vakuutusyhtiö" }
]
</script>
Open in new window
<duet-definition-list></duet-definition-list>

<script>
var list = document.querySelector("duet-definition-list")

list.items = [
{ label: "Nimi", value: "Lasse Mäkinen" },
{ label: "Osoite", value: "Kotikatu 23 A 4, 00220 Helsinki, Suomi" },
{ label: "Puhelin", value: "+358 400 123 456" },
{ label: "Email", value: "lasse.makinen@test.com" },
{ label: "Kieli", value: "Suomi" },
{ label: "Alueyhtiö", value: "Lähitapiola Keskinäinen Vakuutusyhtiö" }
]
</script>

Properties #

Property Attribute Description Type Default
items -- An array of items for the definition list. Items have to include mandatory "label" and "value" fields to work. any[] undefined
margin margin Controls the margin of the component. Can be one of: "auto", "none". string "auto"
theme theme Theme of the definition list. Can be one of: "default", "turva". string ""
variation variation Style variation of the definition list. Can be one of: "default", "striped". string "default"

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

Building Layouts

Tutorials

Server Side Rendering


Troubleshooting

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