About
List item with label, description, start/end content slots, and interactive patterns. Astryx by Meta. Source: https://astryx.atmeta.com/components/ListItem
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx List Item to your project and fits it to your theme.
Code
How Astryx List Item 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 the MIT notice in astryx-list-item.tsx. */
import '@/components/ui/astryx-list-item-utils/astryx-preview.css';
import '@astryxdesign/theme-neutral/fonts.css';
import {useSyncExternalStore} from 'react';
import {Theme} from '@astryxdesign/core/theme';
import {neutralTheme} from '@astryxdesign/theme-neutral/built';
import {List, ListItem} from '@/components/ui/astryx-list-item';
import {Badge} from '@astryxdesign/core/Badge';
import {Icon} from '@astryxdesign/core/Icon';
function OfficialSample() {
return (
<List header="Settings" hasDividers>
<ListItem
label="Notifications"
description="Push, email, and SMS alerts"
startContent={<Icon icon="info" />}
endContent={<Badge label="3 new" variant="blue" />}
onClick={() => {}}
/>
<ListItem
label="Privacy"
description="Manage data sharing preferences"
startContent={<Icon icon="eyeSlash" />}
onClick={() => {}}
/>
<ListItem
label="Appearance"
description="Theme, font size, and display"
startContent={<Icon icon="wrench" />}
onClick={() => {}}
/>
<ListItem
label="Billing"
description="Plans and payment methods"
startContent={<Icon icon="copy" />}
endContent={<Badge label="Pro" variant="purple" />}
onClick={() => {}}
/>
</List>
);
}
function readPreviewMode() {
const {classList} = document.documentElement;
return classList.contains('dark') ? 'dark' : 'light';
}
function subscribeToPreviewMode(callback: () => void) {
const observer = new MutationObserver(callback);
observer.observe(document.documentElement, {attributes: true, attributeFilter: ['class']});
return () => observer.disconnect();
}
export default function Demo() {
const mode = useSyncExternalStore(subscribeToPreviewMode, readPreviewMode, () => 'light' as const);
return (
<Theme theme={neutralTheme} mode={mode}>
<div className="astryx-demo">
<div className="astryx-demo-content" data-centered style={{maxWidth: 350}}>
<OfficialSample />
</div>
</div>
</Theme>
);
}







