Text only
A plain list-group-item holds one line of text.
{folders.map((item) => {item.title})}
Title and description
Put list-group-item-title and list-group-item-description in list-group-item-content.
{folders.map((item) => )}
With icon
The list-group-item-media slot holds an icon before the content.
{
folders.map((item) => (
))
}
With avatar
The media slot takes an avatar the same way.
{
team.map((person) => (
))
}
With meta
Use list-group-item-meta for a time, a count or a badge at the end.
{
folders.map((item) => (
{item.count}
))
}
All slots
Media, content, meta and list-group-item-actions in one item.
{
team.map((person, index) => (
{index === 0 ? : `${index * 3} d`}
))
}
Links
Add list-group-item-action to a link item. It supports active and disabled.
{
folders.map((item, index) => (
))
}
Actions on hover
In a list-group-hoverable list the actions show on hover. Add show to keep them visible.
{
team.map((person, index) => (
))
}
Buttons
The actions slot holds any control, for example a button.
{
team.map((person, index) => (
))
}
Radios
Radio inputs with one name make a single choice list. Use a label as the item.
{
plans.map((plan, index) => (
{plan.price}
))
}
Switches
Put a switch in the actions slot to build a settings list.
{
channels.map((channel) => (
))
}
Wrapped description
Add align-items-start to the item and text-wrap to the description for longer text.
{
comments.map((comment, index) => (
{comment.text}
{comment.time}
))
}
Nested items
Put list-group-nested on a collapse after the parent item. list-group-item-toggle turns the chevron.
{
tree.map((group) => (
<>
{group.items.map((item) => (
{item}
))}
>
))
}
Drag handle
Add data-sortable to the list and put the handle in the media slot.
{
team.map((person) => (
))
}
{
sizes.map((item) => (
{item.title}
{team.map((person) => (
))}
))
}
{
notifications.map((item) => (
{item.time}
))
}
{
transactions.map((item) => (
{item.amountLabel}
))
}
{
files.map((file) => (
))
}
{
visits.map((item) => (
{item.value}%
))
}
Inside a card body
Without list-group-flush the list keeps its own border and rounded corners.
{
files.slice(0, 3).map((file) => (
{file.size}
))
}
{
team.map((_, index) => (
))
}