radix-ui / themes

Radix Themes is an open-source component library optimized for fast development, easy maintenance, and accessibility. Maintained by @workos.
https://radix-ui.com/themes
MIT License
4.71k stars 161 forks source link

There should be a Table.Footer component #524

Open zmillman opened 3 weeks ago

zmillman commented 3 weeks ago

In the same way that there's a Table.Header (thead) and Table.Body (tbody), there should be a Table.Footer corresponding to tfoot.

I encountered this gap as I was building a table showing a list of prices and wanted to add a "totals" row at the bottom. Ended up re-using Table.Header and Table.ColumnHeaderCell but it's not semantically correct.

Screenshot 2024-06-10 at 4 20 22 PM

More on tfoot https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot

vladmoroz commented 3 weeks ago

We'll look into this, but you should be pretty much able to use tfoot directly and compose it with Table.Row, Table.RowHeaderCell, and Table.Cell instead of using the header parts