I have a table with a bunch of different values, and I want to style each cell to have a certain color depending on the value. How can I do this in Slate?
How can I conditionally style a Table Cell, Row, or Column in Slate?
655 views Asked by Andrew St P At
1
The Slate table widget will render inline HTML and CSS, so the common pattern is to add a Function between your query and the resulting table, map through the values for the column(s) that need styling, and add markup CSS classes that you can then style as needed.
In your Foundry instance, search for
Styling Tables
to find a robust reference example for common styling patterns and considerations for maintaining sortability with different formatting applied.