Automatically alternating table row fill-colours

I would like to make a table in Figma which, when you add a new row to the table, it automatically change the fill-colour of that new row against the previous one. The table will have grey odd-numbered rows, and white even-numbered rows, so each row will be the opposite colour of the previous one.

Hey @Roman12, thank you for reaching out!

I guess this might be possible to create with variables and conditionals in Figma.

I’d recommend connecting the interaction with a button so whenever you click on the button you’ll receive a grey or a white row.

Feel free to try it out yourself and reach out when you’re stuck on a step. Leaving this open for community members to jump in and suggest their design solutions.

Thank you,
Gayani