List

List component is used to display list items. It renders a <ul> element by default.

chakra ui pro

Import#

import { List, ListItem, ListIcon, OrderedList, UnorderedList } from "@chakra-ui/react"

Unordered List#

  • Lorem ipsum dolor sit amet
  • Consectetur adipiscing elit
  • Integer molestie lorem at massa
  • Facilisis in pretium nisl aliquet
Editable Example

Ordered List#

  1. Lorem ipsum dolor sit amet
  2. Consectetur adipiscing elit
  3. Integer molestie lorem at massa
  4. Facilisis in pretium nisl aliquet
Editable Example

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.

  • Lorem ipsum dolor sit amet, consectetur adipisicing elit
  • Assumenda, quia temporibus eveniet a libero incidunt suscipit
  • Quidem, ipsam illum quis sed voluptatum quae eum fugit earum
  • Quidem, ipsam illum quis sed voluptatum quae eum fugit earum
Editable Example

Props#

List Props#

colorScheme

Description

Color Schemes for List are not implemented in the default theme. You can extend the theme to implement them.

Type
"whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"

size

Description

Sizes for List are not implemented in the default theme. You can extend the theme to implement them.

Type
string

spacing

Description

The space between each list item

Type
SystemProps["margin"]

stylePosition

Description

Short hand prop for listStylePosition

Type
SystemProps["listStylePosition"]

styleType

Description

Short hand prop for listStyleType

Type
SystemProps["listStyleType"]

variant

Description

Variants for List are not implemented in the default theme. You can extend the theme to implement them.

Type
string

List Item Props#

ListItem composes Box so you can pass all style and pseudo style props.

Edit this page

Proudly made inNigeria by Segun Adebayo