Product List

Product list with status badges and filters

SaaSProducts

Overview

ProductList displays a searchable, sortable table of products with status badges, pricing info, and row-level actions. Supports filters by status and type, bulk operations on selected rows, and customizable empty states.

Usage

import { ProductList } from "@leanicon/web-builder-library/saas";

<ProductList
  products={products}
  totalCount={100}
  page={1}
  pageSize={10}
  onPageChange={(page) => setPage(page)}
  onPageSizeChange={(size) => setPageSize(size)}
  filters={filters}
  onFiltersChange={setFilters}
  sortBy="name"
  sortOrder="asc"
  onSortChange={(col, order) => handleSort(col, order)}
  selectedIds={selectedIds}
  onSelectionChange={setSelectedIds}
  onBulkAction={(action, ids) => handleBulkAction(action, ids)}
  onEdit={(product) => router.push(`/products/${product.id}`)}
  onDelete={(product) => handleDelete(product)}
  onStatusChange={(product, status) => updateStatus(product, status)}
/>;

Variants

Loading

Name
Type
Status
Price
Created

Showing 1 to 0 of 0 results

Rows per page
Page 1 of 0

Empty

No products found

Try adjusting your filters or create a new product.

Error

Failed to load products. Please try again later.

Default (with data)

Name
Type
Status
Price
Created
Enterprise Cloud PlatformFull-featured cloud platform with analytics
Service
Published
$299.00
1/15/2024
Starter PlanPerfect for small teams
Service
Published
$49.00
1/10/2024
Professional LicensePerpetual license with lifetime updates
Digital
Draft
$999.00
2/1/2024

Showing 1 to 3 of 3 results

Rows per page
Page 1 of 1

Dark

Name
Type
Status
Price
Created
Enterprise Cloud PlatformFull-featured cloud platform with analytics
Service
Published
$299.00
1/15/2024
Starter PlanPerfect for small teams
Service
Draft
$49.00
1/10/2024

Showing 1 to 2 of 2 results

Rows per page
Page 1 of 1

ProductStatusBadge - All Statuses

DraftIn ReviewApprovedPublishedArchivedRejectedDeprecated

ProductStatusBadge - All Sizes

PublishedPublishedPublished

With Selected Rows

1 selected
Name
Type
Status
Price
Created
Enterprise CloudCloud platform
Service
Published
$299.00
1/15/2024
Starter PlanSmall teams
Service
Published
$49.00
1/10/2024

Showing 1 to 2 of 2 results

Rows per page
Page 1 of 1

Props

NameTypeDefaultRequiredDescription
productsProduct[]—YesArray of products to display
loadingbooleanfalseNoLoading state
errorstring—NoError message
totalCountnumber—YesTotal number of products
pagenumber—YesCurrent page (1-indexed)
pageSizenumber—YesItems per page
onPageChange(page: number) => void—YesPage change handler
onPageSizeChange(size: number) => void—YesPage size change handler
filtersProductListFilters{}NoCurrent filters
onFiltersChange(filters: ProductListFilters) => void—YesFilter change handler
sortBystring—NoCurrent sort column
sortOrderenumascNoCurrent sort order
onSortChange(column: string, order: "desc" | "asc") => void—YesSort change handler
selectedIdsstring[][]NoCurrently selected product IDs
onSelectionChange(ids: string[]) => void—YesSelection change handler
onBulkAction(action: ProductBulkAction, ids: string[]) => void—YesBulk action handler
onEdit(product: Product) => void—YesEdit product handler
onDelete(product: Product) => void—YesDelete product handler
onStatusChange(product: Product, status: ProductStatus) => void—YesStatus change handler
getRowHref((product: Product) => string)—NoReturns the href for a product row, enabling click-to-navigate
onCreateProduct(() => void)—NoHandler for creating a new product
columnsstring[]—NoVisible columns
emptyStateReactNode—NoCustom empty state