Components
← All components

Empty State Observer

stimeo--empty-state

Shows an empty message only while a list has nothing in it, and hides it once something arrives.

  • Core

Watches a list and swaps in the placeholder you prepared when it empties, swapping back once something arrives. On a page where Turbo Stream rows appear, that saves counting them yourself. Whether it is empty and how many items there are can be read from CSS, so the presentation is yours. Emptying and filling can each announce their own wording. The state is counted afresh from the list, so it keeps up when the page is swapped or the list itself is replaced. The artwork and the wording for the empty case belong to you.

running
  • Item 1
  • Item 2

Keyboard

This component has no keyboard interactions of its own.