Skip to content
Okaapiأوكابي
Framework for the code
Theme
Okaapi on GitHub

Chapter 10 Feedback

Empty state

What a list, table or page shows while it has nothing in it. It says what will appear here, why it is empty now, and offers the one action that fills it.

Use it in Angular
import { EmptyStateComponent } from '@okaapi-ui/angular';

First use

Nothing has been made yet: name what goes here and give the action that makes the first one.

No orders yet

Orders show here as soon as a customer pays.

Angular
<ui-empty-state title="No orders yet">
  <p>Orders show here as soon as a customer pays.</p>
  <div ui-empty-state-actions>
    <button ui-button>Share your menu</button>
  </div>
</ui-empty-state>

No results

A search or filter matched nothing: say so, and give the way back.

No orders match “Mohamed”

Check the spelling, or search by order number.

Angular
<ui-empty-state title="No orders match “Mohamed”">
  <p>Check the spelling, or search by order number.</p>
  <div ui-empty-state-actions>
    <button ui-button variant="secondary">Clear search</button>
  </div>
</ui-empty-state>

In Arabic

لا توجد طلبات بعد

تظهر الطلبات هنا بمجرد أن يدفع العميل.

Angular
<ui-empty-state title="لا توجد طلبات بعد">
  <p>تظهر الطلبات هنا بمجرد أن يدفع العميل.</p>
</ui-empty-state>

When to use something else

If you needUse
Content that is still loadingSkeleton
Something went wrongAlert

Inputs

NameTypeDefaultWhat it does
titlestring — Required. What is missing, as a heading.
level2 | 3 | 43Heading level of the title, so it fits the page outline.
[ui-empty-state-actions]slot — The action that fills the space. One, usually.

Keyboard and screen readers

  • Its title is a heading, at the level you set so it fits the page outline.