Use our responsive React and Tailwind CSS vertical List component anywhere on your web app!
A List component displays a list of items containing images, icons, and text that represents a specific action.
See below our List component examples that you can use in your Tailwind CSS and React project. The examples comes in different styles, so you can adapt them easily to your needs.
You can add icons to your List items using the List.ItemStart component. In the example below, we've showcased a navigation menu with icons useful for a dashboard.
In the example below we've used the Iconoir icons, but you can use any other icon library you prefer.
Inbox
Trash
Settings
"use client";
import { List } from "@material-tailwind/react";
import { Bin, Mail, Settings } from "iconoir-react";
export function ListWithIcon() {
return (
<List>
<List.Item>
<List.ItemStart>
<Mail className="h-5 w-5" />
</List.ItemStart>
Inbox
</List.Item>
<List.Item>
<List.ItemStart>
<Bin className="h-5 w-5" />
</List.ItemStart>
Trash
</List.Item>
<List.Item>
<List.ItemStart>
<Settings className="h-5 w-5" />
</List.ItemStart>
Settings
</List.Item>
</List>
);
}
"use client";
import { List } from "@material-tailwind/react";
import { Bin, Mail, Settings } from "iconoir-react";
You can add avatars to your List items using the Avatar and List.ItemStart components. In the example below, we've showcased a list of users with their profile picture, name, and job title.
Alex Andrew
Software Engineer @ Material Tailwind
Alexander
Backend Developer @ Material Tailwind
Emma Willever
UI/UX Designer @ Material Tailwind
"use client";
import * as React from "react";
import { List, Avatar, Typography } from "@material-tailwind/react";
You can add badges to your List items using the Chip and List.ItemStart components. In the example below, we've showcased a list of items with a badge that represents the number of items in each category.
Inbox
14
Trash
40
Settings
"use client";
import { List, Chip } from "@material-tailwind/react";
import { Mail, Settings, Bin } from "iconoir-react";
export function ListWithBadge() {
return (
<List>
<List.Item>
<List.ItemStart>
<Mail className="h-5 w-5" />
</List.ItemStart>
Inbox
<List.ItemEnd>
<Chip size="sm" variant="ghost">
<Chip.Label>14</Chip.Label>
</Chip>
</List.ItemEnd>
</List.Item>
<List.Item>
<List.ItemStart>
<Bin className="h-5 w-5" />
</List.ItemStart>
Trash
<List.ItemEnd>
<Chip size="sm" variant="ghost">
<Chip.Label>40</Chip.Label>
</Chip>
</List.ItemEnd>
</List.Item>
<List.Item>
<List.ItemStart>
<Settings className="h-5 w-5" />
</List.ItemStart>
Settings
</List.Item>
</List>
);
}
"use client";
import { List, Chip } from "@material-tailwind/react";
import { Mail, Settings, Bin } from "iconoir-react";
You can add a selected state to your List items using the selected prop. In the example below, we've showcased a list of items with a selected state that represents the active item.
You can add a disabled state to your List items using the disabled prop. This way you can disable the list item and prevent the user from interacting with it.
You can use the List.Item component as a link by using the as prop. This way you can use the List.Item component as a link to navigate to another page or website.