Skip to content

<ul> ​

The <ul> element is used as a building block for composites like Card List, and others.

Important: Assistive technologies implicitly add the role="list" to the <ul> element, so unless the list is inside some kind of application widget, like a menu, it's best not to combine them with other roles like role="group".

Basic Usage ​

live preview
editable html
<ul ariaCurrent="true">
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
  <li>Item 4</li>
</ul>

Card List ​

Card lists are implemented by adding the .card class to a <div role="list"> or a <ul> element.

You can indicate that a certain item is active by using aria-current="true".

live preview
editable html
<ul class="card">
  <li>Item 1</li>
  <li aria-current="true">Item 2</li>
  <li>Item 3</li>
  <li>Item 4</li>
</ul>

Intent Variants ​

To convey intent and importance, card lists can be styled with different variants:

live preview
See code

Modifiers ​

.ghost creates transparent background card lists with colored text and borders

live preview
See code

.subtle creates card lists with a more muted appearance.

live preview
See code

.striped creates card lists with alternating background colors for better readability.

live preview
See code

Variants applied individually to an item ​

You can also use variant classes on individual items to indicate their intent and importance.

live preview
See code