Skip to content

PanelEmpty ​

An EmptyState that fills a panel or a card, centered in the room left under the panel's header.

tsx
import { PanelEmpty } from '@adecore/ui';
tsx
import { GitPullRequest } from 'lucide-react';
import { Button, PanelEmpty, PanelHeader } from '@adecore/ui';

export default function PanelEmptyDemo() {
    return (
        <div className="flex h-72 w-80 flex-col rounded-lg border border-border bg-surface">
            <PanelHeader title="Pull requests" />
            <PanelEmpty
                icon={GitPullRequest}
                action={
                    <Button variant="secondary" size="sm">
                        New pull request
                    </Button>
                }
            >
                No open pull requests on this repository.
            </PanelEmpty>
        </div>
    );
}

By default it grows into the rest of a flex column (fill="grow"). In a card with its own height, use fill="full". sunken gives it the sunken ground. header keeps the panel's header above the sentence, so its actions stay reachable.

Props ​

PropTypeDefault
childrenReactNodeRequired.
headerReactNode
iconLucideIcon
busybooleanfalseA Spinner in place of the icon.
actionReactNode
sunkenbooleanfalse
fill'grow' | 'full''grow'
classNamestring
refRef<HTMLDivElement>

PanelEmptyProps is an exported type.

Licenses and third-party notices are listed in each package.