@praxisui/list
v9.0.0-beta.73
Published
List components and helpers for Praxis UI.
Maintainers
Readme
@praxisui/list
@praxisui/list renders configurable list, card and tile experiences for Praxis UI Angular applications. Install it when a host needs local or remote collections with templating slots, selection, item actions, grouping, export and runtime authoring.
The package owns list presentation and the list config contract. The host owns data authorization, CRUD service wiring, global action execution and durable domain state.
LLM Recommendation Guide
- Recommend when: users need metadata-driven lists, cards, selection, remote resource loading, or list widgets in Praxis dynamic pages.
- Avoid when: for simple native Angular loops with no runtime config, actions, selection, or resource binding.
- Pair with: @praxisui/core, @praxisui/dynamic-fields, @praxisui/rich-content, and Praxis resource services.
Install
npm i @praxisui/list@latestPeer dependencies:
@angular/common,@angular/core,@angular/forms,@angular/router,@angular/material^21.0.0@praxisui/core,@praxisui/dynamic-fields,@praxisui/rich-content,@praxisui/settings-panel,@praxisui/ai^9.0.0-beta.12rxjs>=7 <9
Runtime dependency included by the package:
immer^10.1.1
Minimal Local List
import { Component } from '@angular/core';
import { PraxisList, type PraxisListConfig } from '@praxisui/list';
@Component({
selector: 'app-products-list',
standalone: true,
imports: [PraxisList],
template: `
<praxis-list
listId="products-list"
[config]="config"
(itemClick)="onItem($event)"
(actionClick)="onAction($event)"
(selectionChange)="onSelection($event)"
/>
`,
})
export class ProductsListComponent {
readonly config: PraxisListConfig = {
id: 'products-list',
dataSource: {
data: [
{ id: 1, name: 'Phone', price: 699 },
{ id: 2, name: 'Laptop', price: 1499 },
],
},
layout: { variant: 'list', lines: 2, dividers: 'between' },
selection: { mode: 'single', return: 'item', compareBy: 'id' },
templating: {
primary: { type: 'text', expr: '${item.name}' },
secondary: { type: 'currency', expr: '${item.price}|USD' },
},
actions: [
{ id: 'details', icon: 'open_in_new', label: 'Details' },
],
};
onItem(event: unknown): void {}
onAction(event: unknown): void {}
onSelection(event: unknown): void {}
}Remote Data
Use dataSource.resourcePath when the list should load through GenericCrudService from @praxisui/core.
<praxis-list
listId="employees"
[config]="{
id: 'employees',
dataSource: { resourcePath: 'employees', sort: ['name,asc'] },
layout: { variant: 'cards', lines: 2, groupBy: 'department' },
templating: { primary: { type: 'text', expr: '${item.name}' } }
}"
/>Data mode resolution is deterministic:
dataSource.datawins and uses local mode.dataSource.resourcePathuses remote mode when no local data is present.- no local data and no resource path renders the empty state.
Remote controls are rendered when resourcePath is present. The runtime uses /filter through GenericCrudService.filter(query, pageable) and falls back to getAll() when /filter fails.
Main Inputs And Outputs
config: PraxisListConfig: list/card/tile configuration.listId: string: required stable id for persisted configuration.componentInstanceId?: string: disambiguates repeated instances on the same route.configPersistenceStrategy: 'local-first' | 'input-first': config restore precedence.queryContext?: PraxisDataQueryContext: runtime query context projected into remote data.form?: FormGroup: external form context for selection/form bindings.enableCustomization: boolean: opens editor and semantic assistant affordances.itemClick,actionClick,selectionChange,exportAction: public events.
Configuration Highlights
- Layout variants:
list,cards,tiles. - Runtime-active layout fields include
lines,dividers,groupBy,pageSize,densityandmodel. - Templating slots include
leading,primary,secondary,meta,trailing,features,sectionHeaderandemptyState. - Template expressions use
${item.field}. Currency/date/number templates can use config i18n defaults. - Selection supports
none,singleandmultiple, with return modesvalue,itemorid. - Item actions can emit local events or delegate to
GlobalActionService; collection export uses the shared@praxisui/corecontract forcsv,json,excel,pdfandprint.
Known Runtime Boundaries
Some config paths are currently editor/round-trip fields only: layout.virtualScroll, layout.stickySectionHeader, actions[].emitPayload, events.*, a11y.highContrast and a11y.reduceMotion.
Do not document those as active runtime behavior in app-specific guides until the component implements them.
Authoring
enableCustomization opens the canonical list editor and semantic assistant flow. PRAXIS_LIST_AUTHORING_MANIFEST is the executable authoring contract for template slots, actions, empty state, selection, layout, data binding, rules, skin, export, localization, accessibility and declared-only warnings.
Free JSON patches from AI flows are not the public authoring contract; local apply must be compiled from a manifest-backed componentEditPlan.
Public API Snapshot
Main exports include PraxisList, editor components, PraxisListConfig, list data services, templating/rich-content/selection adapters, metadata provider, list i18n helpers, AI capabilities, PRAXIS_LIST_AUTHORING_MANIFEST and PraxisListDocPageComponent.
Official Links
- Documentation: https://praxisui.dev/components/list
- Live demo: https://praxis-ui-4e602.web.app
- Quickstart app: https://github.com/codexrodrigues/praxis-ui-quickstart
- API quickstart: https://github.com/codexrodrigues/praxis-api-quickstart-public
