Examples
Empty states
Compare permission, first-use, no-results, not-found, and error states independently.
Public contracts
NxButtonNxEmptyViewLive preview
LivePermission denied
kind="permission"
NxEmptyViewPermission denied
The current actor cannot open this content.
No records yet
kind="empty"
NxEmptyViewNo records yet
Create the first record to start this workflow.
No matching records
kind="noResults"
NxEmptyViewNo matching records
Change the filters and try again.
Record not found
kind="notFound"
NxEmptyViewRecord not found
It may have moved or been removed.
Could not load records
kind="error"
NxEmptyViewCould not load records
Retry after checking the connection.
Copyable source
Code example
TSX
import { NxButton, NxEmptyView } from "@nexia/sdk/host";
export function EmptyStatesExample() {
return (
<div className="grid gap-5 lg:grid-cols-2">
<NxEmptyView
kind="permission"
title="Permission denied"
description="The current actor cannot open this content."
/>
<NxEmptyView
kind="empty"
title="No records yet"
description="Create the first record to start this workflow."
>
<NxButton size="sm">Create record</NxButton>
</NxEmptyView>
<NxEmptyView
kind="noResults"
title="No matching records"
description="Change the filters and try again."
/>
<NxEmptyView
kind="notFound"
title="Record not found"
description="It may have moved or been removed."
/>
<NxEmptyView
kind="error"
title="Could not load records"
description="Retry after checking the connection."
>
<NxButton size="sm" variant="secondary">
Retry
</NxButton>
</NxEmptyView>
</div>
);
}