List Panel
A dashboard card with a titled list: header with an action, rows, optional footer, and loading, empty and error states. Use one of 31 ready variants or your own rows.
Playground
Installation
List Panel comes with WunderUI Core and Pro, in the package from your plan. See the plans.
Then import what you need:
import {
ListPanel,
ListPanelPreset,
ListPanelProps,
ListPanelSkeleton,
ListPanelState,
ListPanelVariant,
} from "@wunderui/react"Then use it:
import { ListPanel } from "@wunderui/react"
export function Transactions() {
return (
<ListPanel
title="Recent transactions"
description="Last 7 days"
action="View all"
items={[
{ id: "nora", title: "Nora Lindgren", description: "WunderUI Pro, one-time", trailing: { type: "value", value: "+$299.00", sub: "Today" } },
{ id: "daniel", title: "Daniel Okafor", description: "WunderUI Core, one-time", trailing: { type: "value", value: "+$199.00", sub: "Yesterday" } },
]}
/>
)
}Expected result: You see one bordered card titled Recent transactions with a View all link at the right and two rows, each with an amount on the right.
When to use
Use List Panel for
- A dashboard card with a titled list: recent transactions, orders, activity, approvals
- A list that can be loading, empty or failed and must say so
- A list with a View all link in the header or a button in the footer
Use something else for
- List Group for a card of rows that people select, switch, open, reorder or discuss
- Data Table for many rows that people sort, filter or compare by column
Panels
A variant sets the title, description, action, dividers and the empty and error copy. Pass your own items and the rows follow, with the panel's header and states around them.
Header
A text action draws a link button in the header; pass an element for another control, or false to hide it. The action is hidden while loading.
Action
Footer
A text footer draws one full-width plain button under the rows, and an element is placed as is. The footer shows only when the panel is ready.
Layout
Comfortable rows have 12 px of vertical padding, compact rows 8 px. Without dividers the rows sit 4 px apart.
Rows
A row select handler turns every row into one button and passes it the row's data. Rows that already have their own handler or link keep it.
Loading, empty and error
All four states keep the card's shape. Loading shows as many skeleton rows as there are rows, and empty and error show an icon, a message and one button; a retry handler adds Try again.
State
Height and scrolling
The panel grows with its rows and does not scroll. For a fixed height, give the card a height and put the list in a scrolling region; header and footer stay in place.
Height
Keyboard interactions
The panel handles no keys itself. Every control in it is a native button, so the browser handles focus and activation.
- TaborShiftTab
- Moves focus through the header action, the pressable rows and their controls in order, and then the footer button. In the empty and error states it reaches their button. Static rows are skipped.
- EnterorSpace
- Presses the focused button: a row with , the header action, the footer button, Try again or the empty state's button.
- EnterorSpaceorArrowDown
- Opens the menu of a row's trailing icon button. Inside the menu the arrow keys move, Enter picks and Escape closes it.
- Tab
- Reaches a scrolling region of your own only when it has : add it when the rows inside are static, so people can scroll with the arrow keys.
Arrow keys do not move between rows. A row is a tab stop only when it can be pressed or holds a control.
Behavior and motion
What the panel does with state, content, the DOM and motion.
- Four states
- A panel is ready, loading, empty or error, and a ready panel with no rows shows the empty state. The header always stays; loading hides the action and footer, empty and error hide the footer.
- Loading keeps the shape
- Loading draws skeleton rows with the same padding and dividers, one per real row by default, so the card keeps its height. Screen readers hear Loading and the title.
- Empty and error
- Both show a centred round icon, a message and a button. Empty is a status and error an alert, and Try again appears only when you pass a retry handler.
- Variants and your own rows
- A variant sets the title, action, dividers, loading shape and empty and error copy, with sample rows until you pass items. Anything you pass yourself wins.
- Rows
- Rows are static unless they have their own select handler or link. Pass one item handler and every row becomes a button that receives its data.
- No scroll region
- The card grows with its rows. For a fixed height, give it a height class and pass your own scrolling region as children; header and footer stay put.
- Names for assistive technology
- The panel is a section named by its title. The rows form a list with the same name, and each row's controls are named by the row title.
- Motion and reduced motion
- Rows fill and press quickly and the dividers fade. With reduced motion only colour and opacity change, and the four states swap without animation.
Anatomy
The parts of a panel, numbered in the figure. While loading, empty or failed, the rows give way to skeleton rows or a centred icon, message and button.
Recent transactions
Last 7 days
- Nora LindgrenWunderUI Pro, one-time+$299.00Today
- Daniel OkaforWunderUI Core, one-time+$199.00Yesterday
- data-slot="list-panel"
The card: a section 400 px wide (it shrinks on a narrow screen) with a 1 px border, 16 px radius, card surface, 16 px padding and 16 px between parts. A title names it for assistive technology.
The row above the rows. It shows when the panel has a title or an action, and the action is hidden while the panel loads.
The title as a heading (h3 by default, 16 px semibold) with the description under it in 12 px secondary text.
The action at the right of the header. A string becomes a link button, an element is placed as it is.
The rows. The list sits 8 px outside the card padding, so row text lines up with the title and the hover fill keeps a concentric 8 px radius inside the 16 px card.
The footer under the rows: a string becomes one full-width plain button, an element is placed as it is. It shows only while the panel is ready.
- data-slot="list-panel-skeleton-row"
- data-slot="list-panel-skeleton"
Best practices
- Do
Start from a variant and pass your own items. The variant sets the title, dividers and the empty and error copy, so the panels of a dashboard stay alike.
- Do
Pass a retry handler to give the error state a Try again button, and an action handler when the empty state's button should do something.
- Do
Keep the panel's height while data loads. Loading draws as many skeleton rows as there are rows, so nothing jumps.
- Do
Write an error message that says what failed and what to do, for example: We could not load the transactions. Check your connection and try again.
- Don’t
Don't put more than a handful of rows in a panel without a fixed height. Give the card a height and a scrolling region, or link to the full list.
- Don’t
Don't hide a failed load behind an empty list. Empty means there is nothing to show; a failed load needs the error state.
- Don’t
Don't change the card padding by hand. It matches every chart card at 16 px, and the rows need it for their concentric radius.
API reference
A List Panel takes the props below and every attribute of a section. Rows are ListItemData (see List Item), and a prop you pass wins over the variant.
The card: a section 400 px wide (it shrinks on a narrow screen) with a 1 px border, 16 px radius, card surface, 16 px padding and 16 px between parts. A title names it for assistive technology.
Notes for AI
Give your coding assistant the Markdown reference instead of screenshots.
get_component("list-panel")The full library index for assistants is at /llms.txt.