Skip to main content

Skeletons.List

Scrollable, data-driven list containers. Three variants exist for different rendering needs.


Variants

VariantUse for
Skeletons.List.SmartDynamic lists — supports API loading, item templates, spinner, empty state
Skeletons.List.ScrollStatic scrollable lists with custom scrollbar styling
Skeletons.List.TableTabular data with table-specific layout

Common Props

All three variants share these props:

PropTypeDescription
classNameStringCSS class(es) on the list container
innerClassStringCSS class on the inner scroll element
flowStringLayout direction — x, y, wrap, none
sys_pnStringNamed part — enables onPartReady and ensurePart
uiHandlerWidgetRoutes interaction events to onUiEvent
partHandlerWidgetRoutes part lifecycle events to onPartReady
kidsArrayStatic children to render
vendorOptObjectScrollbar appearance (see below)
datasetObjectdata-* attributes

Skeletons.List.Smart

The most capable variant. Supports API-driven loading, item templates (itemsOpt), spinner, empty state, and directional rendering.

Additional Props

PropTypeDescription
apiFunctionCalled to fetch list data from the server
itemsOptObjectTemplate applied to every item — defines kind, uiHandler, and any shared options
spinnerBooleanShow a loading spinner while data loads
spinnerWaitNumberDelay in ms before showing the spinner
placeholderAnySkeleton shown while loading
evArgsAnySkeleton shown when the list is empty
startStringStarting position — "bottom" to scroll to bottom on load
axisStringScroll axis — x or y
timerNumberDebounce delay in ms
formItemStringModel key this list is bound to
dataTypeStringData type hint — e.g. "array"
stateNumberInitial state
radiotoggleStringRadio toggle channel

Examples

Static list with predefined children

Skeletons.List.Smart({
className: `${fig}__list`,
sys_pn: "my-list",
kids: myItems,
});

API-driven list with item template

Skeletons.List.Smart({
className: `${fig}__list`,
sys_pn: "my-list",
api: ui.getItems.bind(ui),
itemsOpt: {
kind: "my_item_widget",
uiHandler: ui,
},
spinner: true,
spinnerWait: 500,
vendorOpt: Preset.List.Orange_e,
});

Chat / messages list — start at bottom, show empty state

Skeletons.List.Smart({
className: `${fig}__messages`,
sys_pn: "messages",
flow: "none",
start: "bottom",
uiHandler: ui,
api: ui.getCurrentApi,
itemsOpt: {
kind: "my_message_item",
uiHandler: ui,
},
spinner: true,
spinnerWait: 500,
evArgs: Skeletons.Note(LOCALE.NO_MESSAGES, "no-content"),
vendorOpt: Preset.List.Orange_e,
});

Skeletons.List.Scroll

A static scrollable container with styled scrollbars. Use it when children are known at render time and no API loading is needed.

Example

Skeletons.List.Scroll({
className: `${fig}__scroll-list`,
sys_pn: "my-scroll",
kids: myItems,
uiHandler: ui,
vendorOpt: Preset.List.Orange_e,
});

Skeletons.List.Table

A tabular list for structured row/column data. Uses the same scrollbar defaults as List.Smart.

Example

Skeletons.List.Table({
className: `${fig}__table`,
sys_pn: "my-table",
kids: myRows,
});

vendorOpt — Scrollbar Styling

All List variants accept vendorOpt to customize the scrollbar appearance. The defaults are:

{
alwaysVisible: true,
size: "2px",
opacity: "1",
color: "#FA8540",
distance: "2px",
railColor: "#E5E5E5",
}

Pass vendorOpt: Preset.List.Orange_e to use the shared preset, or override individual fields:

vendorOpt: {
color: "#0000FF",
size: "4px",
}

Choosing the Right Variant

Data comes from an API? → List.Smart with api + itemsOpt
Static children, needs scrollbar? → List.Scroll
Tabular / row-column data? → List.Table
Need spinner or empty state? → List.Smart with spinner + evArgs
Need to start scrolled to bottom? → List.Smart with start: "bottom"

Quick Reference

List.SmartList.ScrollList.Table
API loading
Item template (itemsOpt)
Spinner / empty state
Styled scrollbar
Static kids