About
A horizontal list that automatically hides items when they exceed the available width. Use OverflowList for breadcrumbs, toolbars, tag lists, or any row that needs to collapse gracefully at smaller sizes. Astryx by Meta. Source: https://astryx.atmeta.com/components/OverflowList
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Overflow List to your project and fits it to your theme.
Code
How Astryx Overflow List is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
'use client';
/* Copyright (c) 2026 Meta Platforms, Inc. See MIT notice in astryx-overflow-list.tsx. */
import '@/components/ui/astryx-overflow-list-utils/astryx-preview.css';
import {useImperativeAlertDialog} from '@astryxdesign/core/AlertDialog';
import {OverflowList} from '@/components/ui/astryx-overflow-list';
import {Button} from '@astryxdesign/core/Button';
import {DropdownMenu} from '@astryxdesign/core/DropdownMenu';
import {Card} from '@astryxdesign/core/Card';
import {Center} from '@astryxdesign/core/Center';
import {useToast} from '@astryxdesign/core/Toast';
// Archive and Delete ask first, as a real destructive action would.
const destructive: Record<string, {verb: string; done: string}> = {
Archive: {verb: 'archive', done: 'archived'},
Delete: {verb: 'delete', done: 'deleted'},
};
const actions = ['Save', 'Edit', 'Duplicate', 'Share', 'Archive', 'Delete'];
function OfficialSample() {
const showToast = useToast();
const confirm = useImperativeAlertDialog();
const runAction = (action: string) => {
const destructiveAction = destructive[action];
if (destructiveAction == null) {
showToast({body: `Demo: ${action} would run here`});
return;
}
confirm.show({
title: `${action} this item?`,
description: `This demo won't ${destructiveAction.verb} anything.`,
actionLabel: action,
onAction: () => {
confirm.hide();
// Demo only: replace this toast with the call that performs the action.
showToast({
body: `Demo: the item would be ${destructiveAction.done} here`,
});
},
});
};
return (
<Center width="100%" maxWidth={420}>
<Card padding={2} width="100%">
<OverflowList
gap={2}
maxVisibleItems={3}
overflowRenderer={overflowItems => (
<DropdownMenu
button={{
label: `+${overflowItems.length}`,
variant: 'ghost',
size: 'sm',
}}
items={overflowItems.map(({index}) => ({
label: actions[index],
onClick: () => runAction(actions[index]),
}))}
/>
)}>
{actions.map(action => (
<Button
key={action}
label={action}
size="sm"
onClick={() => runAction(action)}
/>
))}
</OverflowList>
{confirm.element}
</Card>
</Center>
);
}
export default function Demo() {
return (
<div className="astryx-demo" data-astryx-theme="neutral" data-theme="light">
<div className="astryx-demo-content" data-centered style={{maxWidth: 440}}>
<OfficialSample />
</div>
</div>
);
}







