Skip to content

Overflow List

@astryxdesign/core v0.7.1 · OverflowList

OverflowList Props ​

NameTypeDefaultDescription
itemsOverflowListItem[]-Items to lay out. The ones that do not fit go into More.
gapSpacingStep2Gap on the spacing scale.
minVisibleItemsnumber0Minimum number of items to keep visible.
maxVisibleItemsnumber-Maximum number of items to keep visible.
maxRowsnumber-Wrap up to this many rows before overflowing.
collapseFrom'start' | 'end''end'Which end collapses first.
behavior'observeSelf' | 'observeParent''observeSelf'Measure the list or its parent.
visibleCountnumber-Forces the visible count and skips measurement.
asNavLinkComponent'a'Link root for visible items and menu items.

OverflowList events ​

NameDescription
selectFired when an item is chosen, with the item and the click event.
overflowChangeFired when the collapsed set changes. The payload is { item, index }[], where index is the item's original place in items. A list that fits from the start never fires. When everything fits again, it fires once with an empty array.

OverflowList slots ​

NameDescription
itemCustom item. Props are { item, index }.
overflowCustom overflow. Props are { items }. Defaults to the More menu.