Skip to main content

Components

List

List is used to present content in a clear and structured way, for example to summarize main points or show the user which steps must be followed in a specific order.

asChild
Description

Change the default rendered element for the one passed as a child, merging their props and behavior.

Type
boolean
Default
false
NameTypeDefaultDescription
asChildbooleanfalse

Change the default rendered element for the one passed as a child, merging their props and behavior.

ListUnordered

asChild
Description

Change the default rendered element for the one passed as a child, merging their props and behavior.

Type
boolean
Default
false
NameTypeDefaultDescription
asChildbooleanfalse

Change the default rendered element for the one passed as a child, merging their props and behavior.

ListOrdered

asChild
Description

Change the default rendered element for the one passed as a child, merging their props and behavior.

Type
boolean
Default
false
NameTypeDefaultDescription
asChildbooleanfalse

Change the default rendered element for the one passed as a child, merging their props and behavior.

Usage

Example

Unordered list

Ordered list

HTML

You use either <ul> or <ol> with the class name ds-list. <li> is used for each list item, and does not need a class name.

CSS variables and data attributes

CSS Variables
NameValue
--dsc-list-padding-inlinevar(--ds-size-6) 0
--dsc-list-margin-topvar(--ds-size-3)
--dsc-list-margin-top-nestedvar(--ds-size-2)

No relevant data attributes found.

Edit this page on github.com (opens in a new tab)