s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All UI components

Commerce · Components

CustomerDirectory

Props for the searchable, paginated customer directory.

Public export

typescript
import { CustomerDirectory } from '@happyvertical/smrt-commerce/svelte';
Import path
@happyvertical/smrt-commerce/svelte
Props
24
Props described
24 of 24
Bindable state
0
Callback events
0
Verified release
0.57.40

Props

NameTypeRequiredDescription
itemsPartyDirectoryItem<CustomerDisplayData>[]NoCustomer rows and caller-owned detail links.
totalnumberNoTotal matching rows across every page.
pagenumberNoCurrent one-based page number.
pageSizenumberNoNumber of rows requested per page.
querystringNoSearch text reflected from the caller's query state.
statusstringNoStatus filter reflected from the caller's query state.
searchActionstringNoCaller-owned URL for the native search form.
queryNamestringNoHTML name used for the search query field.
statusNamestringNoHTML name used for the status field.
hiddenFieldsRecord<string, string>NoCaller-owned state carried through the native GET form. Query and status names are ignored.
filtersPartyDirectoryFiltersNoCaller-owned GET controls rendered beside search and status.
filterNamesstring[]NoNames rendered by `filters`; same-named hidden fields are omitted.
hasAdditionalFiltersbooleanNoWhether caller-owned filters currently narrow the result.
emptyDescriptionstringNoOverrides the empty-state guidance for this directory.
previousHrefstringNoCaller-owned URL for the previous page.
nextHrefstringNoCaller-owned URL for the next page.
addHrefstringNoCaller-owned URL for creating a customer.
canCreatebooleanNoControls whether the create affordance is presented.
loadingbooleanNoRenders loading placeholders instead of current rows.
errorMessagestringNoServer or upstream failure to present instead of current rows.
labelsPartySurfaceLabelsNoCustomer terminology and action-label overrides.
extensionPartyDirectoryExtension<CustomerDisplayData>NoConsumer content appended to every customer row.
headlessbooleanNoOmits the built-in page header (title, subtitle, and its create/edit action) for hosts that frame the page themselves.
headerSnippetNoReplaces the built-in page header; not rendered when `headless` is set.

Bindable state

This component has no bindable public state.

Callback events

This component declares no callback event props.

Examples and explanation