#๐Ÿ†˜ Need Help with Table Loading States!

3 messages ยท Page 1 of 1 (latest)

stuck summit
#

I'm working on a data table with skeleton loading states (you know, those gray animated bars that show while content is loading), but I'm running into a super annoying issue that's driving me crazy! When my table switches from loading state to normal state, the table headers keep moving/shifting. It's creating this jarring visual jump that makes the whole UI feel unstable.

What I'm Trying to Achieve

  • Skeleton loading bars for each table row (like the ones you see on LinkedIn, Facebook, etc.)
  • Zero layout shift - headers should stay perfectly still
  • Smooth transition between loading and loaded states
  • Professional looking loading experience

Example of the Issue

Imagine a simple user table like this:

Normal State:

| Name          | Email               | Status    | Actions |
|---------------|---------------------|-----------|---------|
| John Smith    | john@example.com    | Active    | Edit    |
| Jane Doe      | jane@company.org    | Inactive  | Edit    |

Loading State (what I want):

| Name          | Email               | Status    | Actions |
|---------------|---------------------|-----------|---------|
| โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  | โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ    | โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ    | โ–ˆโ–ˆโ–ˆโ–ˆ    |
| โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ      | โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ    | โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ    | โ–ˆโ–ˆโ–ˆโ–ˆ    |

Questions

  1. Has anyone dealt with this before? What worked for you?
  2. Are there any CSS tricks or best practices I'm missing?
  3. Should I be using a different approach entirely?
  4. Any good libraries that handle this well?

Would Really Appreciate

  • Code examples or CodePen demos
  • Articles/tutorials you've found helpful
  • Any tips from your own experience
  • Even just pointing me in the right direction!

I've been stuck on this for way too long and could really use some fresh eyes on the problem. Thanks in advance!

rare bone
#

don't think you can get around it without fixed widths for the columns

#

that's what i do anyways + having the table filled with an array of null's while loading and then just show the skeletons in the cells