Feedback and status
Empty state
default / compact
function EmptyStateDemo() { return ( <View className="w-full gap-4"> <Card className="w-full py-0"> <EmptyState icon={InboxIcon} title="Nothing here yet" subtitle="Items you add will show up in this list." action={{ label: 'Add an item', onPress: () => {} }} /> </Card> <Card className="w-full py-0"> <EmptyState variant="compact" icon={SearchXIcon} title="No results" subtitle="Try a different search." action={{ label: 'Clear filters', onPress: () => {} }} /> </Card> </View> );}API
<EmptyState icon title subtitle? action? variant="default|compact" />Get it
Already in every copy of the native kit:
import { EmptyState } from '@/components/kit/empty-state';Details
- Exports
EmptyState- Packages
- lucide-react-native@^1.21.0
- Installs with
- @halftone-native/button, @halftone-native/icon, @halftone-native/lib-utils, @halftone-native/spot, @halftone-native/text
- Also searched as
- no results, nothing here, zero state
- Registry JSON
- /r/native/empty-state.json
<Card className="w-full max-w-xl"> <EmptyState icon={InboxIcon} title="No invoices yet" description="Invoices you send appear here, with their status." action={ <Button> <PlusIcon /> New invoice </Button> } /></Card>Usage
Every list and table needs one. Always offer the next step as a button.
API
<EmptyState icon title description? action? variant? />Get it
Already in every copy of the web kit:
import { EmptyState } from '@/components/kit/empty-state';Details
- Exports
EmptyState- Packages
- cn@^0.5.2, lucide-react@^1.52.0
- Also searched as
- zero state, no results
- Registry JSON
- /r/web/empty-state.json
Agents: the whole registry is at /llms.txt.