List
List is used to display list items. It renders a <ul> element by default.
Import
import {
List,
ListItem,
ListIcon,
OrderedList,
UnorderedList,
} from '@chakra-ui/react';
Unordered List
Ordered List
Unstyled List with icon
Add icons to the list items by using the ListIcon component. You can pass the
name of the icon or use custom icons. The size of the icon is relative to the
font size of the list item.
Props
List Props
colorScheme
colorSchemeColor Schemes for List are not implemented in the default theme. You can extend the theme to implement them.
stringsize
sizeSizes for List are not implemented in the default theme. You can extend the theme to implement them.
stringspacing
spacingThe space between each list item
SystemProps["margin"]stylePosition
stylePositionShorthand prop for listStylePosition
SystemProps["listStylePosition"]styleType
styleTypeShorthand prop for listStyleType
SystemProps["listStyleType"]variant
variantVariants for List are not implemented in the default theme. You can extend the theme to implement them.
stringList Item Props
ListItem composes Box so you can pass all style
and pseudo style props.