Skip to content

Stacked List

The StackedList component provides a way to display entities in a vertically stacked list format. It supports flexible item rendering, integration with links or actions, and customizable layouts for presenting structured data consistently.

It is composed of several subcomponents such as StackedList.Root, StackedList.Header, StackedList.Item, and StackedList.Field to offer a structured and customizable interface.

Variations

Item paddings

The StackedList.Item can receive different paddings through the paddingX and paddingY props to match your design solution.

They support the following values: 4xs, 3xs, 2xs, xs, sm, md, lg, xl, 2xl, 3xl, 4xl, 0.

Linked item

The StackedList.Item accepts the linkProps and to props, which allow you to turn the entire item into a link.

If either of these props is provided, the whole item becomes clickable and navigates according to the link configuration. You can still use links and buttons inside as child elements — they will remain fully functional.

Disable hover

The StackedList.Item accepts the disableHover prop, which allows you to turn off the hover effect.

Title color

The StackedList.Field can receive a titleColor prop, which allows you to override the default title color.

Truncating

By default, both title and description have truncation enabled. To disable it, pass the disableTruncate prop to StackedList.Field.

Field position

The StackedList.Field component accepts the right prop, which positions the field on the right side of the Item.

With pagination

The StackedList.Root component can accept pagination props to enable pagination functionality within the list.

With tooltip

The StackedList.Item component can accept a tooltipProps prop to display content in a tooltip.

Installation

import { StackedList } from '@harnessio/ui/components'
//...
return (
<StackedList.Root>
<StackedList.Header>
<StackedList.Field title="Title" />
</StackedList.Header>
<StackedList.Item
thumbnail={<IconV2 name="connectors" size="xs" />}
actions={<Button>Action</Button>}
to="/"
>
<StackedList.Field title="Item 1" description="Description 1" />
</StackedList.Item>
<StackedList.Item
thumbnail={<IconV2 name="star" size="xs" />}
actions={<Button>Action</Button>}
to="/"
>
<StackedList.Field title="Item 2" description="Description 2" />
</StackedList.Item>
<StackedList.Item
thumbnail={<IconV2 name="check" size="xs" />}
actions={<Button>Action</Button>}
to="/"
>
<StackedList.Field title="Item 3" description="Description 3" />
</StackedList.Item>
</StackedList.Root>
)