About
Tree list container. Accepts items data and rendering configuration. Expansion state is managed internally. Astryx by Meta. Source: https://astryx.atmeta.com/components/TreeList
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Tree List to your project and fits it to your theme.
Code
How Astryx Tree 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-tree-list.tsx. */
import '@/components/ui/astryx-tree-list-utils/astryx-preview.css';
import {TreeList} from '@/components/ui/astryx-tree-list';
const noop = () => {};
function TreeListShowcase() {
return (
<TreeList
items={[
{
id: 'src',
label: 'src',
isExpanded: true,
children: [
{
id: 'components',
label: 'components',
children: [
{id: 'button', label: 'Button.tsx', onClick: noop},
{id: 'card', label: 'Card.tsx', onClick: noop},
{id: 'list', label: 'List.tsx', onClick: noop},
],
},
{id: 'app', label: 'App.tsx', onClick: noop},
{id: 'index', label: 'index.tsx', onClick: noop},
],
},
{
id: 'public',
label: 'public',
children: [
{id: 'favicon', label: 'favicon.ico', onClick: noop},
{id: 'index-html', label: 'index.html', onClick: noop},
],
},
{id: 'pkg', label: 'package.json', onClick: noop},
{id: 'readme', label: 'README.md', onClick: noop},
]}
/>
);
}
export default function Demo() {
return (
<div className="astryx-demo" data-astryx-theme="neutral" data-theme="light">
<div className="astryx-demo-content" style={{maxWidth: 400}}>
<TreeListShowcase />
</div>
</div>
);
}















