Examples
Props
List
Name | Type | Default | Description |
---|---|---|---|
aria-label | string | Adds an accessible label to the list. | |
children | React.ReactNode | null | Anything that can be rendered inside of the list |
className | string | '' | Additional classes added to the list |
component | 'ol' | 'ul' | ListComponent.ul | Sets the type of the list component. |
iconSize | 'default' | 'large' | 'default' | Modifies the size of the icons in the list |
isBordered | boolean | false | Modifies the list to add borders between items |
isPlain | boolean | false | Modifies the list to include plain styling |
ref | No type info | null | |
type | OrderType | OrderType.number | Sets the way items are numbered if component is set to "ol". |
variant | ListVariant.inline | null | Adds list variant styles |
ListItem
Name | Type | Default | Description |
---|---|---|---|
children | React.ReactNode | null | Anything that can be rendered inside of list item |
icon | React.ReactNode | null | null | Icon for the list item |
CSS variables
Expand or collapse column | Selector | Variable | Value | |
---|---|---|---|---|
.pf-v6-c-list | --pf-v6-c-list--PaddingInlineStart | 1.5rem | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list--ul--ListStyle | disc outside | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list--Gap | 0.5rem | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list--nested--PaddingBlockStart | 0.5rem | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list--m-plain--PaddingInlineStart | 0 | ||
.pf-v6-c-list | --pf-v6-c-list--m-inline--PaddingInlineStart | 0 | ||
.pf-v6-c-list | --pf-v6-c-list--m-inline--ColumnGap | 1.5rem | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list--m-inline--RowGap | 0.25rem | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list--m-bordered--li--PaddingBlockStart | 0.5rem | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list--m-bordered--li--BorderBlockStartColor | (In light theme) #c7c7c7 | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list--m-bordered--li--BorderBlockStartWidth | 1px | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list__item-icon--MinWidth | 0.75rem | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list__item-icon--MarginBlockStart | 0.25rem | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list__item-icon--MarginInlineEnd | 0.5rem | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list__item-icon--Color | (In light theme) #1f1f1f | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list__item-icon--FontSize | 0.75rem | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list--m-icon-lg__item-icon--MinWidth | 1rem | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list--m-icon-lg__item-icon--MarginInlineEnd | 1rem | ||
| ||||
.pf-v6-c-list | --pf-v6-c-list--m-icon-lg__item-icon--FontSize | 1rem | ||
| ||||
.pf-v6-c-list.pf-m-icon-lg | --pf-v6-c-list__item-icon--MinWidth | 1rem | ||
| ||||
.pf-v6-c-list.pf-m-icon-lg | --pf-v6-c-list__item-icon--MarginBlockStart | 0 | ||
.pf-v6-c-list.pf-m-icon-lg | --pf-v6-c-list__item-icon--MarginInlineEnd | 1rem | ||
| ||||
.pf-v6-c-list.pf-m-icon-lg | --pf-v6-c-list__item-icon--FontSize | 1rem | ||
| ||||
.pf-v6-c-list.pf-m-plain | --pf-v6-c-list--PaddingInlineStart | 0 | ||
| ||||
.pf-v6-c-list.pf-m-inline | --pf-v6-c-list--PaddingInlineStart | 0 | ||
| ||||
.pf-v6-c-list.pf-m-inline | --pf-v6-c-list--Gap | 0.25rem 1.5rem | ||
|