Package org.patternfly.component.list
package org.patternfly.component.list
Provides list components for displaying collections of items in various formats.
This package contains several list components: basic lists (List),
action lists (ActionList), data lists
(DataList), description lists
(DescriptionList), and simple lists
(SimpleList). Each list type serves a different purpose, from
simple unordered lists to complex data display with expandable content and actions.
Components
ActionList- List of actions (buttons, dropdowns)ActionListGroup- Group of action list items with a separatorActionListItem- Individual item within an action listDataList- Flexible list for displaying structured dataDataListAction- Action area within a data list itemDataListCell- Content cell within a data list itemDataListExpandableContent- Expandable content area of a data list itemDataListItem- Individual item within a data listDescriptionList- Key-value pair list with terms and descriptionsDescriptionListDescription- Description value in a description list groupDescriptionListGroup- Group containing a term and its descriptionDescriptionListTerm- Term label in a description list groupList- Basic unordered or ordered listListItem- Item within a basic listSimpleList- Selectable list with grouped itemsSimpleListGroup- Group of items within a simple listSimpleListItem- Individual selectable item in a simple list
Usage
Basic lists with different styles:
import static org.jboss.elemento.Elements.ol;
import static org.patternfly.component.list.List.list;
import static org.patternfly.component.list.ListItem.listItem;
import static org.patternfly.icon.IconSets.fas.bookOpen;
import static org.patternfly.icon.IconSets.fas.desktop;
// Basic unordered list
List basicList = list()
.addItem(listItem("item-0").text("First"))
.addItem(listItem("item-1").text("Second"))
.addItem(listItem("item-2").text("Third"));
// Ordered list
List orderedList = list(ol())
.addItem(listItem("item-0").text("First"))
.addItem(listItem("item-1").text("Second"))
.addItem(listItem("item-2").text("Third"));
// Plain list with icons
List iconList = list().plain()
.addItem(listItem("item-0").text("Books").icon(bookOpen()))
.addItem(listItem("item-1").text("Computers").icon(desktop()));
// Inline list
List inlineList = list().inline()
.addItem(listItem("item-0").text("First"))
.addItem(listItem("item-1").text("Second"));
- See Also:
-
ClassesClassDescriptionAn action list is a group of actions, controls, or buttons with set spacing.A action list group within a
ActionListcomponent.A action list item within aActionListcomponent.A data list is used to display large data sets when you need a flexible layout or need to include interactive content like charts.A data list action within aDataListcomponent.A data list cell within aDataListcomponent.A expandable content within a data list item within aDataListItemcomponent.A data list item within aDataListcomponent.A description list contains terms and their corresponding descriptions.A description list description within aDescriptionListcomponent.A description list group within aDescriptionListcomponent.A description list term within aDescriptionListcomponent.A list component embeds a formatted list (bulleted or numbered list) into page content.A list item within aListcomponent.A simple list provides a list of selectable items that can be shown within a page.A simple list group within aSimpleListcomponent.A simple list item within aSimpleListcomponent.