About
EmptyState shows a placeholder when a content area has no data. Use it for empty lists, zero search results, first-time setups, or cleared inboxes. Always include a title and a next step so the user is not stuck. Astryx by Meta. Source: https://astryx.atmeta.com/components/EmptyState
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Empty State to your project and fits it to your theme.
Code
How Astryx Empty State 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-empty-state.tsx. */
import '@/components/ui/astryx-empty-state-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 {EmptyState} from '@/components/ui/astryx-empty-state';
import {Button} from '@astryxdesign/core/Button';
import {Icon} from '@astryxdesign/core/Icon';
import {MagnifyingGlassIcon as SearchIcon} from '@heroicons/react/24/outline';
import {useToast} from '@astryxdesign/core/Toast';
function OfficialSample() {
const showToast = useToast();
return (
<EmptyState
icon={<Icon icon={SearchIcon} size="lg" />}
title="No results found"
description="Try adjusting your search or filters to find what you need."
actions={
<Button
label="Clear filters"
variant="secondary"
onClick={() =>
showToast({body: 'Demo: your filters would be cleared here'})
}
/>
}
/>
);
}
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: 400}}>
<OfficialSample />
</div>
</div>
</Theme>
);
}







