ds-svelte-community
Nais Docs
Pages
  • Home
  • CSS
  • Icons
Typography
  • BodyLong
  • BodyShort
  • Detail
Components
  • Accordion
  • ActionMenu Beta
  • Alert
  • Button
  • Checkbox
  • Chips
  • ConfirmationPanel
  • CopyButton
  • ErrorSummary
  • ExpansionCard
  • GuidePanel
  • HelpText
  • InternalHeader Beta
  • List
  • Loader
  • Modal
  • Pagination
  • Popover
  • Radio
  • ReadMore
  • Search
  • Select
  • Skeleton
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag
  • TextField
  • ToggleGroup
  • Tooltip
Primitives
  • Bleed
  • Box

Version: 1.0.0
Try dark darkside
Try light darkside

List

Lists are used to present content in a concise and clear manner, for example to summarize the main points of a text.

    Default With title List item title List item icons
  • Item 1
  • Item 2
  • Item 3

Properties

List

PropertyDescriptionDefault
Control
Properties
as

HTML list element to render.

"ul" "ol"
"ul"
description

List heading description.

string Snippet
-
headingTag

Allows setting a different HTML h-tag.

"h1" "h2" "h3" "h4" "h5" "h6"
"h3"
size

Changes margin-block on list and font size on items.

"small" "medium" "large"
"medium"
title

List heading title.

string Snippet
-
Snippets
children -
description

List heading description.

 -
title

List heading title.

 -

Properties included from: Omit<HTMLAttributes<HTMLDivElement>, "title">

ListItem

PropertyDescriptionDefault
Control
Properties
icon

Icon to be used instead of bullet (unordered lists only).

Snippet Component
-
title

List item title.

string Snippet
-
Snippets
children

List item content.

 -
icon

Icon to be used instead of bullet (unordered lists only).

 -
title

List item title.

 -

Properties included from: Omit<HTMLLiAttributes, "title">