Reusable sensor-style key/value row for detail panels, cards, and metadata lists. This is the
same component used inside CwDataList and the expanded CwSensorCard, now with built-in freshness scheduling and a bindable timeout
state.
Standard list
Use it inside a semantic list container
The component renders a list item, so wrap it with ul or ol when you use it standalone.
Device detail rows
Standalone CwCardDataRowItem usage
Temperature
22.40°C
Humidity
67.30%
Last Update
ago
Live duration
Built-in freshness scheduler with bindable state
Use lastSeenAt plus expireAfterMinutes to turn the row into a
freshness monitor. The row now schedules expiry internally and exposes both onExpire and bind:withinTimeout.
Current freshness state: no timer
Freshness monitor
Alarm fires a few seconds after load
Last Update
ago
Flexible icons
Built-ins, emoji, or snippets all work
Use thermo, drop, or timer for the built-in SVGs,
or pass a plain string like an emoji for one-off metadata rows.
CwCardDataRowItem is the reusable detail-row primitive behind CwDataList and the expanded CwSensorCard panel. Use it anywhere you need a compact sensor-style label/value row with optional built-in icons and freshness timers.
How to think about it
Wrap it in a real listThe component renders an `<li>`, so use it inside `ul` or `ol` when you render it directly.
Use built-ins firstSet `icon` to `thermo`, `drop`, or `timer` for the shared SVG icons. Plain strings and snippets still work for custom metadata.
Switch to timer mode with `lastSeenAt`When `lastSeenAt` is present, the value side renders `CwDuration` automatically and appends the `ago` suffix. `lastUpdated` still works as a backwards-compatible alias.
Use expiry callbacks or bind freshness stateUse `onExpire`, `onTimeoutReset`, and `bind:withinTimeout` when a parent needs to react to stale data. You can still pass the legacy `alarmCallback` names if needed.
Row props
Because the component renders `<li>`, the surrounding list container stays your responsibility.
API
Type
Details
idRequired
string
Stable identifier for keyed rendering, telemetry hooks, or debug attributes.
labelRequired
string
Row label shown on the left side.
value
string | number | null
Static value shown on the right side when `lastUpdated` is not supplied.
unit
string
Optional suffix rendered after `value`, for example `%`, `°C`, or `km/h`.
icon
'drop' | 'thermo' | 'timer' | string | Snippet
Built-in icon keyword, plain string content such as emoji, or a custom snippet.
lastSeenAt / lastSeen / LastSeen / lastUpdated
Date | string | number
Switches the row into live timer mode via `CwDuration`. Prefer `lastSeenAt`; `lastUpdated` remains supported for compatibility.