react-data-grid
react-data-grid copied to clipboard
tailwindcss style
What is the best way to style a table using tailwindcss with React/JS?
You can modify the default table styles by adding them to your tailwind CSS. E.g., if you add this to your tailwind .css file (either for the table component or global):
.rdg-cell { @apply bg-green-400; }
It will make every cell in the table green.
But if you do:
.rdg-header-sort-cell { @apply bg-green-400; }
Then, only the header cells (assuming they are sort-cells) will have a green background. You should be able to figure out the rest from there.