List Item
The List Item component is a text-based item contained within a list.
Properties
Name | Type | Default | Description |
---|---|---|---|
text | string | Specifies the text for the list item. | |
button | bool | false | If true, the list item is a button and enables the selected and disabled properties. |
selected | bool | false | If true, a selected style is applied to the list item. |
disabled | bool | false | If true, the list item is disabled. |
tooltipTitle | string | Defines a tooltip for the list item. | |
tooltipPlacement | bottom-end bottom-start bottom left-end left-start left right-end right-start right top-end top-start top string | bottom | Defines the placement of the tooltip on the list item. |
loopData | array | Defines an array of options in the format id, label, value. The id must be is small letters. | |
itemName | string | Defines a unique identifier name for each menu item. |
You do not need to add a Looper component to a List to create list items dynamically. Each List Item has a built-in looper, called a Loop, that allows you to create list items dynamically.
The Add Left Component allows the placement of an icon, badge, chip or container to the left-hand side of a list item.
Style Attributes
Name | Type | Default | Description |
---|---|---|---|
alignItems | center flex-start | center | Defines the alignment applied to the list item. |
dense | bool | false | If true, compact vertical padding is used for the list item. |
disableGutters | bool | false | If true, removes the gutter on the left-hand side of the list item. |
divider | bool | false | If true, adds a line beneath the list item. |
For more detail on the List Item component, see the MUI developer docs.