Resource List
Paginated resource list view
Overview
ResourceList displays resources in a filterable, searchable list using ResourceCard components. It supports search by name or type, status and type dropdown filters, loading skeleton state, and empty state messaging. Each card can trigger selection and detail navigation callbacks.
Usage
import { ResourceList } from "@leanicon/web-builder-library/saas";
<ResourceList
resources={[
{
id: "room-1",
name: "Conference Room A",
type: "meeting-room",
status: "active",
capacity: { min: 1, max: 10, unit: "people" },
},
{
id: "desk-1",
name: "Hot Desk Area",
type: "desk",
status: "active",
capacity: { min: 1, max: 20, unit: "people" },
},
]}
showSearch
showStatusFilter
onResourceSelect={(r) => console.log("Selected:", r.id)}
onViewDetails={(r) => router.push(`/resources/${r.id}`)}
/>;Variants
Default
5 resources found
Conference Room A
meeting-room
Capacity: 1-10 people
Conference Room B
meeting-room
Capacity: 1-6 people
Hot Desk Area
desk
Capacity: 1-20 people
Projector HP-2000
equipment
Training Room
meeting-room
Capacity: 1-30 people
Default (Dark)
3 resources found
Conference Room A
meeting-room
Capacity: 1-10 people
Conference Room B
meeting-room
Capacity: 1-6 people
Hot Desk Area
desk
Capacity: 1-20 people
With Search
3 resources found
Conference Room A
meeting-room
Capacity: 1-10 people
Conference Room B
meeting-room
Capacity: 1-6 people
Hot Desk Area
desk
Capacity: 1-20 people
With Filters
3 resources found
Conference Room A
meeting-room
Capacity: 1-10 people
Projector HP-2000
equipment
Training Room
meeting-room
Capacity: 1-30 people
Loading
Empty
0 resources found
No resources found
Single Resource
1 resource found
Conference Room A
meeting-room
Capacity: 1-10 people
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
resources | (ResourceSummary | ResourceData)[] | — | Yes | List of resources to display |
loading | boolean | false | No | Whether list is in loading state |
selectedId | string | — | No | Currently selected resource ID |
showSearch | boolean | true | No | Show search filter |
showStatusFilter | boolean | true | No | Show status filter |
showTypeFilter | boolean | false | No | Show type filter |
statusOptions | ResourceStatus[] | ["active", "inactive", "maintenance"] | No | Available status options for filter |
typeOptions | string[] | [] | No | Available type options for filter |
emptyMessage | string | — | No | Empty state message |
labels | Record<string, string> | — | No | Optional label overrides |
className | string | — | No | Custom class name |
onResourceSelect | ((resource: ResourceSummary | ResourceData) => void) | — | No | Called when a resource is selected |
onViewDetails | ((resource: ResourceSummary | ResourceData) => void) | — | No | Called when view details is clicked |