Lists

Lists are a way of displaying separate items of the same type of information in the form of text of images. The items of a list are contained within a row. Within this item/row the content can vary depending on the use case. Some lists contain considerable amounts of information whereas others merely contain a single-line of text.


Anatomy

In Leviy we know are two types of lists; grouped lists and separated lists. Depending on the use case these two types of lists can be styled differently. Lists consist of vertical aligned rows which each contain items of content. Each row has identical height and type of content.
If a list with two-line primary text contains rows where the extra information is blank, the composition of the content stays the same and a ‘-‘ symbol is used to indicate the empty state. This way rows in a list will always adopt the same height.

As an exception row may contain a third line of text with a leading icon. This text should be styled the same as the text on the second line.

Grouped lists

Grouped lists are lists where the rows are grouped together and do not contain any spacing between them. Grouped lists can contain the following content types; single-line or two-line primary text and supporting visuals such as icons and avatars. Rows of a grouped list always contain a chevron icon to indicate navigation.

folder
General 6 files
chevron_right
folder
Employees 4 files
chevron_right
folder
Management Reports 8 files
chevron_right
folder
Protocols 12 files
chevron_right
Example of a grouped list in files
location_city
Bungalowpark 1 open issue
chevron_right
location_city
Hotel -
chevron_right
location_city
Hospital 2 open issues
chevron_right
location_city
Office Building -
chevron_right
Example of a grouped list in objects

Separated lists

Separated lists are lists with a fixed spacing between the rows and an indicator. separated lists can contain the following content types: single-line or two-line primary text, meta data and supporting visuals such as status indicators, icons and avatars. Rows of a separated list do not contain a chevron icon as click leads to an action or to opening a file.

   
   
   
Skeleton of a separated list
Vandaag access_time
4apr-8apr
AWX Audit Schoonmaak
3d access_time
28okt-2nov
Havermolen DKS
6d access_time
1jan-15jan
Flamingo Werkplekinspectie
Example of separated list with audit content
Product Informatieblad 2019-2020
Instructievideo OK Schoonmaak
Werklijst -
Example of separated list with file content
 

States

Rows of grouped lists can have 2 different states: enabled and focused.

folder
General 6 files
chevron_right
folder
Employees 4 files
chevron_right
folder
Management Reports 8 files
chevron_right
folder
Protocols 12 files
chevron_right
Enabled rows
folder
General 6 files
chevron_right
folder
Employees 4 files
chevron_right
folder
Management Reports 8 files
chevron_right
folder
Protocols 12 files
chevron_right
Focused row

Rows of separated lists have 3 different states: muted, enabled and focused.

Days remaining access_time Entity Title Audit Definition
Muted row
Vandaag access_time AWX Audit Schoonmaak
Enabled row
Vandaag access_time AWX Audit Schoonmaak
Focused row
 

Templates

Grouped list

{% include '@leviy-components/list/grouped_list.html.twig' with {
    'items': [
        { ... }, { ... }, { ... }
    ]
} %}

Separated list

{% include '@leviy-components/list/separated_list.html.twig' with {
    'items': [
        { ... }, { ... }, { ... }
    ]
} %}

Parameters

Key Description Default Type
items Array with items that you want to list [] array
items[].title Title of the list item null string
items[].subtitle Subtitle of the list item null string
items[].state Interaction state of the list item null [focused, muted]

Grouped list

Key Description Default Type
items[].prefix Preferred prefix for list item null object
items[].prefix.icon Icon that should be prefixed null string; name of the icon
items[].suffix Preferred suffix for list item { icon: 'chevron_right' } object
items[].suffix.icon Icon that should be suffixed chevron string; name of the icon

Separated list

Key Description Default Type
items[].indicator Color of the indicator. Any theme color name can be used. null string; name of the theme color
items[].info Preferred info for list item null object
items[].info.text Text that should be displayed null string
items[].info.icon Icon that should be prefixed null string; name of the icon
items[].info.color Color of the icon and text. Any theme color name can be used. null string; name of the theme color
items[].label Visible above the title null string

Live preview