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 group of related actions within an
ActionListcomponent.An individual item within anActionListcomponent.A data list is used to display large data sets when you need a flexible layout or need to include interactive content like charts.An action area within aDataListItem.A content cell within aDataListItem.The expandable content area of aDataListItem.An individual item within aDataListcomponent.A description list contains terms and their corresponding descriptions.The description content within aDescriptionListGroup.A term-description pair within aDescriptionListcomponent.The term element within aDescriptionListGroup.A list component embeds a formatted list (bulleted or numbered list) into page content.An individual item within aListcomponent.A simple list provides a list of selectable items that can be shown within a page.A group of related items within aSimpleListcomponent.An individual item within aSimpleListcomponent.