items contains application data. Provide neuDataViewItem to render structured records; default rendering is not a domain-specific card. searchFields enables local matching and sortOptions names sortable fields. Omit total/currentPage for local paging; set both and handle pageChange to load a remote page. modeChange proposes the selected mode; apply it to mode. Templates replace content, not the paging engine.
These inputs require a model or function, not a checkbox. Edit the same-named field in the Source component and bind it in the template; data already used by this preview appears in the state above.
items contains application data. Provide neuDataViewItem to render structured records; default rendering is not a domain-specific card. searchFields enables local matching and sortOptions names sortable fields. Omit total/currentPage for local paging; set both and handle pageChange to load a remote page. modeChange proposes the selected mode; apply it to mode. Templates replace content, not the paging engine.
Inputs, models and Outputs are extracted from the installed Core package. Named public types link to their definitions. Templates below include executable examples.
Inputs
Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.
Name
Type
Default
Template binding
Description
currentPage
number | undefined
undefined
[currentPage]
Applied one-based page for remote paging; omit it for local pagination.
emptyLabel
string
'No items found'
[emptyLabel]
Label for empty collection. Translate it for your application.
items
readonly unknown[]
[]
[items]
Applied item collection. Stable keys and accessors identify entries; the component does not mutate the array.
loading
boolean
false
[loading]
Displays the loading state while the application supplies data.
Reports the selected one-based page and applied pageSize.
searchChange
string
(searchChange)="onSearchChange($event)"
Reports the current query; use it to request remote results when needed.
sortChange
string
(sortChange)="onSortChange($event)"
Reports the selected sort field.
Templates
ng-content projects content into the component. TemplateRef inputs receive a template; ng-template directives identify templates with a typed context. A directive shared by an entrypoint is not necessarily a slot of this component.
Open a type to inspect its definition and interface fields.
NeuDataViewMode.d.ts
import type { NeuDataViewMode } from '@neural-ui/core/data-view';
// Public declaration (reference only)
export type NeuDataViewMode = 'list' | 'grid' | 'table';
NeuDataViewPageEvent.d.ts
import type { NeuDataViewPageEvent } from '@neural-ui/core/data-view';
// Public declaration (reference only)
export interface NeuDataViewPageEvent {
page: number;
pageSize: number;
}
NeuDataViewSortDirection.d.ts
import type { NeuDataViewSortDirection } from '@neural-ui/core/data-view';
// Public declaration (reference only)
export type NeuDataViewSortDirection = 'asc' | 'desc';
NeuDataViewSortOption.d.ts
import type { NeuDataViewSortDirection } from '@neural-ui/core/data-view';
import type { NeuDataViewSortOption } from '@neural-ui/core/data-view';
// Public declaration (reference only)
export interface NeuDataViewSortOption {
direction?: NeuDataViewSortDirection;
label: string;
value: string;
}
Use the supported public tokens listed below. Surrounding layout belongs to your application; validate the result in light and dark modes and narrow containers.
Specific tokens
This component uses shared theme tokens rather than dedicated component hooks.
Shared tokens used
Override these on a local wrapper to affect this example. An override on :root affects other components that use the same token.
Token
Purpose here
Other impact
Default / fallback
--neu-border
Normal control and cell borders
Shared by other Core consumers; scope the override.
rgba(15, 23, 42, 0.08)
--neu-primary
Brand color for active controls and emphasis
Shared by other Core consumers; scope the override.
#007aff
--neu-primary-dark
Dark brand shade; outline and ghost Button text in the light theme
Shared by other Core consumers; scope the override.
#005fcc
--neu-primary-fg
Foreground drawn over the primary background
Shared by other Core consumers; scope the override.
#ffffff
--neu-primary-solid
Solid brand action background
Shared by other Core consumers; scope the override.
#006ee6
--neu-primary-solid-fg
Foreground of solid brand actions
Shared by other Core consumers; scope the override.
#ffffff
--neu-primary-solid-hover
Hover background of solid brand actions
Shared by other Core consumers; scope the override.
#005fcc
--neu-surface
Main field, header or control surface
Shared by other Core consumers; scope the override.