Expandable List

v0.4.0

Generic accordion/expandable list with a built-in default row design (severity accent, progress ring, secondary progress bar). Supply renderCollapsed/renderExpanded to replace the row design entirely. Supports loading, empty, and error states.

View as Markdown

Install

npx shadcn@latest add @signalos/expandable-list

Requires a configured @signalos registry and a valid SIGNALOS_REGISTRY_TOKEN - get access. Registry dependencies (@signalos/tokens, @signalos/utils, @signalos/skeleton, @signalos/badge, @signalos/progress, @signalos/circular-progress) are pulled automatically.

Preview

Example & code

expandable-list.example.tsx
// Example: default row design, driven entirely by generic item data.
import { ExpandableList } from "@/components/widgets/expandable-list/ExpandableList"
import type { ExpandableListDefaultItem } from "@/components/widgets/expandable-list/ExpandableList.types"

const items: ExpandableListDefaultItem[] = [
  {
    id: "ITEM-1042",
    title:
      "Lane rate deviates from contracted baseline on the Midwest corridor",
    description:
      "Observed spot rates are tracking 8% above the contracted baseline for three consecutive weeks.",
    severity: "high",
    status: "Investigating",
    category: "Pricing",
    metrics: [
      { label: "signals", value: "6" },
      { label: "max deviation", value: "8.2%" },
    ],
    progressPercent: 74,
    progressLabel: "Confidence",
    secondaryProgressLabel: "TTL",
    secondaryProgressPercent: 40,
    relatedLabel: "2 related",
  },
  {
    id: "ITEM-2091",
    title: "SLA breach imminent on carrier onboarding queue",
    severity: "critical",
    banner: "SLA breach imminent",
    secondaryProgressLabel: "TTL",
    secondaryProgressPercent: 12,
    progressPercent: 62,
    progressLabel: "Confidence",
    metrics: [{ label: "signals", value: "3" }],
  },
]

export default function Example() {
  return (
    <ExpandableList
      items={items}
      onViewDetail={(item) => console.info("open detail view", item.id)}
      renderExpandedContent={(item) => (
        <p className="text-[12.5px] text-muted-foreground">
          Additional detail available for {item.title}.
        </p>
      )}
      defaultExpandedIds={["ITEM-1042"]}
    />
  )
}

Props

ExpandableListItem

PropTypeDefaultDescription
id*string-

ExpandableListMetric

PropTypeDefaultDescription
label*string-
value*string-

ExpandableListDefaultItem

PropTypeDefaultDescription
title*string-
descriptionstring | undefined-
severityExpandableListItemSeverity | undefined-
statusstring | undefined-
categorystring | undefined-
metricsreadonly ExpandableListMetric[] | undefined-
createdAtLabelstring | undefined-
progressPercentnumber | undefined-
progressLabelstring | undefined-
secondaryProgressLabelstring | undefined-
secondaryProgressPercentnumber | undefined-
relatedLabelstring | undefined-
bannerstring | null | undefined-
footerNoteLabelstring | undefined-
footerNoteTextstring | undefined-
eventsDecisionLogEvent[] | undefined-
act_by_reasonstring | null | undefined-
act_by_deadlinestring | null | undefined-
id*string-

DecisionLogEvent

PropTypeDefaultDescription
event_type*string-
occurred_at*string-
actor_id*string | null-
summary*string-
payload*Record<string, unknown>-

ExpandableListProps

PropTypeDefaultDescription
items*readonly TItem[]-
renderCollapsed((item: TItem, index: number, expanded: boolean) => ReactNode) | undefined-Renders the always-visible row shown before expansion (and while collapsed). Receives the current expanded state so the caller can adapt its own chrome (e.g. a chevron) without extra plumbing. When omitted (together with `renderExpanded`), each item renders using the built-in default design, driven directly by `TItem`'s `ExpandableListDefaultItem` fields. Supply both to fully replace the row design with your own.
renderExpanded((item: TItem, index: number) => ReactNode) | undefined-Renders the panel revealed after expansion. Only mounted while the item is expanded. See `renderCollapsed` for the default-design fallback.
renderExpandedContent((item: TItem) => ReactNode) | undefined-Extra content appended to the expanded body, below the description. Only used by the built-in default row design.
onViewDetail((item: TItem) => void) | undefined-Shows a "View detail" action row and fires on click. Only used by the built-in default row design.
variantExpandableListVariant | undefined-
allowMultipleboolean | undefined-Allow more than one item to be expanded at a time. Defaults to false (accordion behavior).
disableCollapseboolean | undefinedfalseRenders every item permanently expanded and removes the collapse affordance (no toggle button, no chevron). Use for a list that should always show full detail with no accordion behavior.
expandedIdsreadonly string[] | undefined-Controlled expanded item ids. Provide together with `onExpandedChange` to fully control expansion state.
defaultExpandedIdsreadonly string[] | undefined-Initial expanded item ids for uncontrolled usage.
onExpandedChange((expandedIds: string[]) => void) | undefined-
disabledIdsreadonly string[] | undefined-
loadingboolean | undefined-
errorboolean | undefined-
errorMessageReactNode-
emptyTitleReactNode-
emptyDescriptionReactNode-
emptyIconReactNode-
skeletonCountnumber | undefined-
data-testidstring | undefined-
classNamestring | undefined-
idstring | undefined-
defaultCheckedboolean | undefined-
defaultValuestring | number | readonly string[] | undefined-
suppressContentEditableWarningboolean | undefined-
suppressHydrationWarningboolean | undefined-
accessKeystring | undefined-
autoCapitalize"off" | "none" | "on" | "sentences" | "words" | "characters" | (string & {}) | undefined-
autoFocusboolean | undefined-
contentEditableBooleanish | "inherit" | "plaintext-only" | undefined-
contextMenustring | undefined-
dirstring | undefined-
draggableBooleanish | undefined-
enterKeyHint"enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined-
hiddenboolean | undefined-
langstring | undefined-
noncestring | undefined-
slotstring | undefined-
spellCheckBooleanish | undefined-
styleCSSProperties | undefined-
tabIndexnumber | undefined-
titlestring | undefined-
translate"yes" | "no" | undefined-
radioGroupstring | undefined-
roleAriaRole | undefined-
aboutstring | undefined-
contentstring | undefined-
datatypestring | undefined-
inlistany-
prefixstring | undefined-
propertystring | undefined-
relstring | undefined-
resourcestring | undefined-
revstring | undefined-
typeofstring | undefined-
vocabstring | undefined-
autoCorrectstring | undefined-
autoSavestring | undefined-
colorstring | undefined-
itemPropstring | undefined-
itemScopeboolean | undefined-
itemTypestring | undefined-
itemIDstring | undefined-
itemRefstring | undefined-
resultsnumber | undefined-
securitystring | undefined-
unselectable"off" | "on" | undefined-
popover"" | "auto" | "manual" | "hint" | undefined-
popoverTargetAction"toggle" | "show" | "hide" | undefined-
popoverTargetstring | undefined-
inertboolean | undefined-
inputMode"text" | "url" | "none" | "search" | "tel" | "email" | "numeric" | "decimal" | undefined-Hints at the type of data that might be entered by the user while editing the element or its contents
isstring | undefined-Specify that a standard HTML element should behave like a defined custom built-in element
exportpartsstring | undefined-
partstring | undefined-
aria-activedescendantstring | undefined-Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
aria-atomicBooleanish | undefined-Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.
aria-autocomplete"none" | "list" | "inline" | "both" | undefined-Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made.
aria-braillelabelstring | undefined-Defines a string value that labels the current element, which is intended to be converted into Braille.
aria-brailleroledescriptionstring | undefined-Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.
aria-busyBooleanish | undefined-
aria-checkedboolean | "true" | "false" | "mixed" | undefined-Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
aria-colcountnumber | undefined-Defines the total number of columns in a table, grid, or treegrid.
aria-colindexnumber | undefined-Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
aria-colindextextstring | undefined-Defines a human readable text alternative of aria-colindex.
aria-colspannumber | undefined-Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
aria-controlsstring | undefined-Identifies the element (or elements) whose contents or presence are controlled by the current element.
aria-currentboolean | "page" | "step" | "true" | "false" | "location" | "date" | "time" | undefined-Indicates the element that represents the current item within a container or set of related elements.
aria-describedbystring | undefined-Identifies the element (or elements) that describes the object.
aria-descriptionstring | undefined-Defines a string value that describes or annotates the current element.
aria-detailsstring | undefined-Identifies the element that provides a detailed, extended description for the object.
aria-disabledBooleanish | undefined-Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
aria-dropeffect"none" | "link" | "copy" | "execute" | "move" | "popup" | undefined-Indicates what functions can be performed when a dragged object is released on the drop target.
aria-errormessagestring | undefined-Identifies the element that provides an error message for the object.
aria-expandedBooleanish | undefined-Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
aria-flowtostring | undefined-Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order.
aria-grabbedBooleanish | undefined-Indicates an element's "grabbed" state in a drag-and-drop operation.
aria-haspopupboolean | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "tree" | undefined-Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
aria-hiddenBooleanish | undefined-Indicates whether the element is exposed to an accessibility API.
aria-invalidboolean | "true" | "false" | "grammar" | "spelling" | undefined-Indicates the entered value does not conform to the format expected by the application.
aria-keyshortcutsstring | undefined-Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
aria-labelstring | undefined-Defines a string value that labels the current element.
aria-labelledbystring | undefined-Identifies the element (or elements) that labels the current element.
aria-levelnumber | undefined-Defines the hierarchical level of an element within a structure.
aria-live"off" | "assertive" | "polite" | undefined-Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
aria-modalBooleanish | undefined-Indicates whether an element is modal when displayed.
aria-multilineBooleanish | undefined-Indicates whether a text box accepts multiple lines of input or only a single line.
aria-multiselectableBooleanish | undefined-Indicates that the user may select more than one item from the current selectable descendants.
aria-orientation"horizontal" | "vertical" | undefined-Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
aria-ownsstring | undefined-Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
aria-placeholderstring | undefined-Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format.
aria-posinsetnumber | undefined-Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
aria-pressedboolean | "true" | "false" | "mixed" | undefined-Indicates the current "pressed" state of toggle buttons.
aria-readonlyBooleanish | undefined-Indicates that the element is not editable, but is otherwise operable.
aria-relevant"text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined-Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
aria-requiredBooleanish | undefined-Indicates that user input is required on the element before a form may be submitted.
aria-roledescriptionstring | undefined-Defines a human-readable, author-localized description for the role of an element.
aria-rowcountnumber | undefined-Defines the total number of rows in a table, grid, or treegrid.
aria-rowindexnumber | undefined-Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
aria-rowindextextstring | undefined-Defines a human readable text alternative of aria-rowindex.
aria-rowspannumber | undefined-Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
aria-selectedBooleanish | undefined-Indicates the current "selected" state of various widgets.
aria-setsizenumber | undefined-Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
aria-sort"none" | "ascending" | "descending" | "other" | undefined-Indicates if items in a table or grid are sorted in ascending or descending order.
aria-valuemaxnumber | undefined-Defines the maximum allowed value for a range widget.
aria-valueminnumber | undefined-Defines the minimum allowed value for a range widget.
aria-valuenownumber | undefined-Defines the current value for a range widget.
aria-valuetextstring | undefined-Defines the human readable text alternative of aria-valuenow for a range widget.
dangerouslySetInnerHTML{ __html: string | TrustedHTML; } | undefined-
onCopyClipboardEventHandler<HTMLDivElement> | undefined-
onCopyCaptureClipboardEventHandler<HTMLDivElement> | undefined-
onCutClipboardEventHandler<HTMLDivElement> | undefined-
onCutCaptureClipboardEventHandler<HTMLDivElement> | undefined-
onPasteClipboardEventHandler<HTMLDivElement> | undefined-
onPasteCaptureClipboardEventHandler<HTMLDivElement> | undefined-
onCompositionEndCompositionEventHandler<HTMLDivElement> | undefined-
onCompositionEndCaptureCompositionEventHandler<HTMLDivElement> | undefined-
onCompositionStartCompositionEventHandler<HTMLDivElement> | undefined-
onCompositionStartCaptureCompositionEventHandler<HTMLDivElement> | undefined-
onCompositionUpdateCompositionEventHandler<HTMLDivElement> | undefined-
onCompositionUpdateCaptureCompositionEventHandler<HTMLDivElement> | undefined-
onFocusFocusEventHandler<HTMLDivElement> | undefined-
onFocusCaptureFocusEventHandler<HTMLDivElement> | undefined-
onBlurFocusEventHandler<HTMLDivElement> | undefined-
onBlurCaptureFocusEventHandler<HTMLDivElement> | undefined-
onChangeChangeEventHandler<HTMLDivElement, Element> | undefined-
onChangeCaptureChangeEventHandler<HTMLDivElement, Element> | undefined-
onBeforeInputInputEventHandler<HTMLDivElement> | undefined-
onBeforeInputCaptureInputEventHandler<HTMLDivElement> | undefined-
onInputInputEventHandler<HTMLDivElement> | undefined-
onInputCaptureInputEventHandler<HTMLDivElement> | undefined-
onResetReactEventHandler<HTMLDivElement> | undefined-
onResetCaptureReactEventHandler<HTMLDivElement> | undefined-
onSubmitSubmitEventHandler<HTMLDivElement> | undefined-
onSubmitCaptureSubmitEventHandler<HTMLDivElement> | undefined-
onInvalidReactEventHandler<HTMLDivElement> | undefined-
onInvalidCaptureReactEventHandler<HTMLDivElement> | undefined-
onLoadReactEventHandler<HTMLDivElement> | undefined-
onLoadCaptureReactEventHandler<HTMLDivElement> | undefined-
onErrorReactEventHandler<HTMLDivElement> | undefined-
onErrorCaptureReactEventHandler<HTMLDivElement> | undefined-
onKeyDownKeyboardEventHandler<HTMLDivElement> | undefined-
onKeyDownCaptureKeyboardEventHandler<HTMLDivElement> | undefined-
onKeyPressKeyboardEventHandler<HTMLDivElement> | undefined-
onKeyPressCaptureKeyboardEventHandler<HTMLDivElement> | undefined-
onKeyUpKeyboardEventHandler<HTMLDivElement> | undefined-
onKeyUpCaptureKeyboardEventHandler<HTMLDivElement> | undefined-
onAbortReactEventHandler<HTMLDivElement> | undefined-
onAbortCaptureReactEventHandler<HTMLDivElement> | undefined-
onCanPlayReactEventHandler<HTMLDivElement> | undefined-
onCanPlayCaptureReactEventHandler<HTMLDivElement> | undefined-
onCanPlayThroughReactEventHandler<HTMLDivElement> | undefined-
onCanPlayThroughCaptureReactEventHandler<HTMLDivElement> | undefined-
onDurationChangeReactEventHandler<HTMLDivElement> | undefined-
onDurationChangeCaptureReactEventHandler<HTMLDivElement> | undefined-
onEmptiedReactEventHandler<HTMLDivElement> | undefined-
onEmptiedCaptureReactEventHandler<HTMLDivElement> | undefined-
onEncryptedReactEventHandler<HTMLDivElement> | undefined-
onEncryptedCaptureReactEventHandler<HTMLDivElement> | undefined-
onEndedReactEventHandler<HTMLDivElement> | undefined-
onEndedCaptureReactEventHandler<HTMLDivElement> | undefined-
onLoadedDataReactEventHandler<HTMLDivElement> | undefined-
onLoadedDataCaptureReactEventHandler<HTMLDivElement> | undefined-
onLoadedMetadataReactEventHandler<HTMLDivElement> | undefined-
onLoadedMetadataCaptureReactEventHandler<HTMLDivElement> | undefined-
onLoadStartReactEventHandler<HTMLDivElement> | undefined-
onLoadStartCaptureReactEventHandler<HTMLDivElement> | undefined-
onPauseReactEventHandler<HTMLDivElement> | undefined-
onPauseCaptureReactEventHandler<HTMLDivElement> | undefined-
onPlayReactEventHandler<HTMLDivElement> | undefined-
onPlayCaptureReactEventHandler<HTMLDivElement> | undefined-
onPlayingReactEventHandler<HTMLDivElement> | undefined-
onPlayingCaptureReactEventHandler<HTMLDivElement> | undefined-
onProgressReactEventHandler<HTMLDivElement> | undefined-
onProgressCaptureReactEventHandler<HTMLDivElement> | undefined-
onRateChangeReactEventHandler<HTMLDivElement> | undefined-
onRateChangeCaptureReactEventHandler<HTMLDivElement> | undefined-
onSeekedReactEventHandler<HTMLDivElement> | undefined-
onSeekedCaptureReactEventHandler<HTMLDivElement> | undefined-
onSeekingReactEventHandler<HTMLDivElement> | undefined-
onSeekingCaptureReactEventHandler<HTMLDivElement> | undefined-
onStalledReactEventHandler<HTMLDivElement> | undefined-
onStalledCaptureReactEventHandler<HTMLDivElement> | undefined-
onSuspendReactEventHandler<HTMLDivElement> | undefined-
onSuspendCaptureReactEventHandler<HTMLDivElement> | undefined-
onTimeUpdateReactEventHandler<HTMLDivElement> | undefined-
onTimeUpdateCaptureReactEventHandler<HTMLDivElement> | undefined-
onVolumeChangeReactEventHandler<HTMLDivElement> | undefined-
onVolumeChangeCaptureReactEventHandler<HTMLDivElement> | undefined-
onWaitingReactEventHandler<HTMLDivElement> | undefined-
onWaitingCaptureReactEventHandler<HTMLDivElement> | undefined-
onAuxClickMouseEventHandler<HTMLDivElement> | undefined-
onAuxClickCaptureMouseEventHandler<HTMLDivElement> | undefined-
onClickMouseEventHandler<HTMLDivElement> | undefined-
onClickCaptureMouseEventHandler<HTMLDivElement> | undefined-
onContextMenuMouseEventHandler<HTMLDivElement> | undefined-
onContextMenuCaptureMouseEventHandler<HTMLDivElement> | undefined-
onDoubleClickMouseEventHandler<HTMLDivElement> | undefined-
onDoubleClickCaptureMouseEventHandler<HTMLDivElement> | undefined-
onDragDragEventHandler<HTMLDivElement> | undefined-
onDragCaptureDragEventHandler<HTMLDivElement> | undefined-
onDragEndDragEventHandler<HTMLDivElement> | undefined-
onDragEndCaptureDragEventHandler<HTMLDivElement> | undefined-
onDragEnterDragEventHandler<HTMLDivElement> | undefined-
onDragEnterCaptureDragEventHandler<HTMLDivElement> | undefined-
onDragExitDragEventHandler<HTMLDivElement> | undefined-
onDragExitCaptureDragEventHandler<HTMLDivElement> | undefined-
onDragLeaveDragEventHandler<HTMLDivElement> | undefined-
onDragLeaveCaptureDragEventHandler<HTMLDivElement> | undefined-
onDragOverDragEventHandler<HTMLDivElement> | undefined-
onDragOverCaptureDragEventHandler<HTMLDivElement> | undefined-
onDragStartDragEventHandler<HTMLDivElement> | undefined-
onDragStartCaptureDragEventHandler<HTMLDivElement> | undefined-
onDropDragEventHandler<HTMLDivElement> | undefined-
onDropCaptureDragEventHandler<HTMLDivElement> | undefined-
onMouseDownMouseEventHandler<HTMLDivElement> | undefined-
onMouseDownCaptureMouseEventHandler<HTMLDivElement> | undefined-
onMouseEnterMouseEventHandler<HTMLDivElement> | undefined-
onMouseLeaveMouseEventHandler<HTMLDivElement> | undefined-
onMouseMoveMouseEventHandler<HTMLDivElement> | undefined-
onMouseMoveCaptureMouseEventHandler<HTMLDivElement> | undefined-
onMouseOutMouseEventHandler<HTMLDivElement> | undefined-
onMouseOutCaptureMouseEventHandler<HTMLDivElement> | undefined-
onMouseOverMouseEventHandler<HTMLDivElement> | undefined-
onMouseOverCaptureMouseEventHandler<HTMLDivElement> | undefined-
onMouseUpMouseEventHandler<HTMLDivElement> | undefined-
onMouseUpCaptureMouseEventHandler<HTMLDivElement> | undefined-
onSelectCaptureReactEventHandler<HTMLDivElement> | undefined-
onTouchCancelTouchEventHandler<HTMLDivElement> | undefined-
onTouchCancelCaptureTouchEventHandler<HTMLDivElement> | undefined-
onTouchEndTouchEventHandler<HTMLDivElement> | undefined-
onTouchEndCaptureTouchEventHandler<HTMLDivElement> | undefined-
onTouchMoveTouchEventHandler<HTMLDivElement> | undefined-
onTouchMoveCaptureTouchEventHandler<HTMLDivElement> | undefined-
onTouchStartTouchEventHandler<HTMLDivElement> | undefined-
onTouchStartCaptureTouchEventHandler<HTMLDivElement> | undefined-
onPointerDownPointerEventHandler<HTMLDivElement> | undefined-
onPointerDownCapturePointerEventHandler<HTMLDivElement> | undefined-
onPointerMovePointerEventHandler<HTMLDivElement> | undefined-
onPointerMoveCapturePointerEventHandler<HTMLDivElement> | undefined-
onPointerUpPointerEventHandler<HTMLDivElement> | undefined-
onPointerUpCapturePointerEventHandler<HTMLDivElement> | undefined-
onPointerCancelPointerEventHandler<HTMLDivElement> | undefined-
onPointerCancelCapturePointerEventHandler<HTMLDivElement> | undefined-
onPointerEnterPointerEventHandler<HTMLDivElement> | undefined-
onPointerLeavePointerEventHandler<HTMLDivElement> | undefined-
onPointerOverPointerEventHandler<HTMLDivElement> | undefined-
onPointerOverCapturePointerEventHandler<HTMLDivElement> | undefined-
onPointerOutPointerEventHandler<HTMLDivElement> | undefined-
onPointerOutCapturePointerEventHandler<HTMLDivElement> | undefined-
onGotPointerCapturePointerEventHandler<HTMLDivElement> | undefined-
onGotPointerCaptureCapturePointerEventHandler<HTMLDivElement> | undefined-
onLostPointerCapturePointerEventHandler<HTMLDivElement> | undefined-
onLostPointerCaptureCapturePointerEventHandler<HTMLDivElement> | undefined-
onScrollUIEventHandler<HTMLDivElement> | undefined-
onScrollCaptureUIEventHandler<HTMLDivElement> | undefined-
onScrollEndUIEventHandler<HTMLDivElement> | undefined-
onScrollEndCaptureUIEventHandler<HTMLDivElement> | undefined-
onWheelWheelEventHandler<HTMLDivElement> | undefined-
onWheelCaptureWheelEventHandler<HTMLDivElement> | undefined-
onAnimationStartAnimationEventHandler<HTMLDivElement> | undefined-
onAnimationStartCaptureAnimationEventHandler<HTMLDivElement> | undefined-
onAnimationEndAnimationEventHandler<HTMLDivElement> | undefined-
onAnimationEndCaptureAnimationEventHandler<HTMLDivElement> | undefined-
onAnimationIterationAnimationEventHandler<HTMLDivElement> | undefined-
onAnimationIterationCaptureAnimationEventHandler<HTMLDivElement> | undefined-
onToggleToggleEventHandler<HTMLDivElement> | undefined-
onBeforeToggleToggleEventHandler<HTMLDivElement> | undefined-
onTransitionCancelTransitionEventHandler<HTMLDivElement> | undefined-
onTransitionCancelCaptureTransitionEventHandler<HTMLDivElement> | undefined-
onTransitionEndTransitionEventHandler<HTMLDivElement> | undefined-
onTransitionEndCaptureTransitionEventHandler<HTMLDivElement> | undefined-
onTransitionRunTransitionEventHandler<HTMLDivElement> | undefined-
onTransitionRunCaptureTransitionEventHandler<HTMLDivElement> | undefined-
onTransitionStartTransitionEventHandler<HTMLDivElement> | undefined-
onTransitionStartCaptureTransitionEventHandler<HTMLDivElement> | undefined-

Supporting types

export type ExpandableListVariant = "default" | "compact" | "normal"
export type ExpandableListItemSeverity =
  "critical" | "high" | "medium" | "low" | "info"
export type DecisionLogEventType =
  | "hypothesis.created"
  | "hypothesis.routed"
  | "hypothesis.expired"
  | "signal.fired"
  | "decision.created"
  | "feedback.submitted"
  | string

npm dependencies

lucide-react@^1.7.0class-variance-authority@^0.7.1

Changelog

0.4.0

  • Add disableCollapse prop to prevent collapsing an already-expanded row; include it in the useCallback dependency array for the expand toggle handler.
  • Expand ExpandableList.types.ts: add DecisionLogEvent, DecisionLogEventType types and optional events, act_by_reason, act_by_deadline, banner (now string | null) fields.

0.3.9

  • Fix cross-item imports to use canonical @/components paths; add missing signalos.category to manifests.

expandable-list

0.3.8

  • Split the built-in row design into components/ExpandableListDefaultRow.tsx. ExpandableList.tsx had crossed the 500-code-line ceiling that max-lines now enforces as an error. Pure move — no behaviour change, and the 16 existing tests cover it unchanged. Consumers pulling this widget now receive one extra file (declared in registry-item.json).

0.3.7

  • Merge of fix/cli-security-hardening into main. Adds the disableCollapse prop (row always renders expanded, no toggle affordance) and derives each row's -header/-panel test ids from its own per-item data-testid instead of a single list-level id, so multiple rows are individually addressable. Additive: callers that pass neither keep the previous behaviour.

0.3.6

0.3.5

0.3.4

0.3.3

  • Add a normal size variant and a disableCollapse prop that renders every item permanently expanded with no toggle affordance. Genericize the item types so the widget no longer needs domain-specific event types. Additive; existing callers keep the previous default/compact behavior.

0.3.2

  • Use semantic status tokens (text-text-error, bg-bg-warning, border-border-, bg-status-) instead of raw palette scales so client theme overrides restyle status colors.

0.3.8

  • Replace raw scale tokens with semantic tokens.

0.3.6

  • lint issue fix

0.3.5

  • Types update for events

0.3.3

  • Added disabled state for collapse.

0.3.2

  • Content sync fix to bring source in line with published registry payload.

0.3.1

  • Content sync fix to bring source in line with published registry payload.

0.3.0

  • Restructured to the standard widget file contract: folded the previously separate ExpandableList.skeleton.tsx, ExpandableList.defaultRow.tsx, and ExpandableList.defaultRow.utils.ts files into ExpandableList.tsx and ExpandableList.utils.ts.
  • Replaced the domain-specific HypothesisExpandableItem default-row shape (signalCount, maxDeviation, cagg, domain, ttlLabel, relatedCount, needsAttention, deadlineNoteText, …) with a fully generic ExpandableListDefaultItem (metrics, progressPercent, secondaryProgressPercent, category, relatedLabel, banner, footerNoteText, …) so the built-in default row carries no business vocabulary. Existing per-field labels/values map onto metrics entries.
  • Added @signalos/circular-progress to registryDependencies (previously imported from a relative, undeclared path).

0.2.0

  • Merged @signalos/hypothesis-card into this widget as the built-in default row design: when renderCollapsed/renderExpanded are omitted, each item renders as a triage card (severity accent, confidence ring, TTL progress, optional "needs attention" banner) driven by the new HypothesisExpandableItem item shape. Added renderExpandedContent and onViewDetail props, used only by the default row design.
  • Supplying renderCollapsed/renderExpanded still fully replaces the row design, as before.
  • @signalos/hypothesis-card is removed; consumers pull @signalos/expandable-list with no render props for the same triage-card look.

0.1.0

  • Initial release as a standalone registry item (previously bundled with HypothesisCard, now split out to @signalos/hypothesis-card).
  • Renamed renderHeader/renderContent to renderCollapsed/renderExpanded to make the before/after-expansion contract explicit.
  • Supports loading, empty, and error states; controlled and uncontrolled expansion; single or multi-expand via allowMultiple.