Skeleton loading with dynamic search results from API response

When fetching data from API, the response has 20 items, a known number, but when you search or filter using web app user interface, you don’t know the amount of results that will come in the response.

So how many skeleton cards you should show? For example: if you show 20 skeleton cards when loading (fetching data from API), and the response has 4 items, it seems a bit confusing to the user.

Does anyone know a technique for displaying skeleton cards with dynamic search results (you don’t know the number of results that will come in the API response)?

Similar Posts