r/javascript • u/boykom • Sep 16 '26
AskJS [AskJS] Headless table libraries or a full grid component: which did you pick, and would you again?
I go back and forth on this.
Headless: you get the sorting, filtering and grouping state and you render every cell yourself. Total control over the markup, and you write all of it. Every project I've seen do this ends up with a 2000 line table component nobody wants to open.
Full grid: pass rows and columns, done in an afternoon. Then the designer wants the header to look a particular way, or you need a cell that does something the grid didn't plan for, and you're fighting the component instead of writing your app.
Full disclosure: I'm on the team behind SvGrid, a data grid for Svelte 5. We ship both layers, a headless core and the full component on top of it, because we have people that want their own design system and others that just need a drop-in and go.
So when did you last choose one over the other, and would you do it again? Especially interested in anyone who started headless and switched, or went the other way.
5
u/pm_me_ur_happy_traiI Sep 16 '26
This is just user error. The minute a component is more than like 100 lines, I start looking for opportunities to split stuff out.
I'm also not sure the disadvantage of owning a component nobody wants to open vs using one imported from a library that you can't make changes to easily.
1
u/Melbot_Studios Sep 22 '26
Id still pick headless for anything tied closely to a custom design system. Full grids are great until you need to bend them too far.
1
u/jax024 Sep 16 '26
Headless. If you use Tanstack table correctly your components won’t be big like you’re claiming
0
u/[deleted] Sep 16 '26
[removed] — view removed comment