Skip to content

Commit

Permalink
[material-ui][docs] Add docs for complementary List components (#41329)
Browse files Browse the repository at this point in the history
  • Loading branch information
anle9650 committed Mar 12, 2024
1 parent 828f4da commit 2b41c9a
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion docs/data/material/components/lists/lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,20 @@ Lists are a continuous group of text or images. They are composed of items conta

{{"component": "modules/components/ComponentLinkHeader.js"}}

## Basic List
## Introduction

Lists present information in a concise, easy-to-follow format through a continuous, vertical index of text or images.

Material UI Lists are implemented using a collection of related components:

- List: a wrapper for list items. Renders as a `<ul>` by default.
- List Item: a common list item. Renders as an `<li>` by default.
- List Item Button: an action element to be used inside a list item.
- List Item Icon: an icon to be used inside of a list item.
- List Item Avatar: an avatar to be used inside of a list item.
- List Item Text: a container inside a list item, used to display text content.
- List Divider: a separator between list items.
- List Subheader: a label for a nested list.

{{"demo": "BasicList.js", "bg": true}}

Expand All @@ -28,6 +41,13 @@ The last item of the previous demo shows how you can render a link:

You can find a [demo with React Router following this section](/material-ui/integrations/routing/#list) of the documentation.

## Basics

```jsx
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
```

## Nested List

{{"demo": "NestedList.js", "bg": true}}
Expand Down

0 comments on commit 2b41c9a

Please sign in to comment.