Skip to main content

What are you looking for?

Try searching for…

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.

HTML

Press Enter to start editing
Unable to parse html
const Preview = () => {
  return (
    <List.Unordered>
      <List.Item>Bøyabreen</List.Item>
      <List.Item>Briksdalsbreen</List.Item>
      <List.Item>Nigardsbreen</List.Item>
    </List.Unordered>
  );
};

render(<Preview />)

Usage

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

Sizes are controlled with data-size. The component will inherit the closest parent where this is set.

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.

Example

Unordered list

Ordered list

React

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.

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