space between rows in a table antd

Viewed 5837

I know this question has many answers, I tried to apply them in ant design but I couldn't find any way to solve it.

Is there a known way to add space between rows in a table using antd table?

any suggestion would be helpful thank you

4 Answers

I think its not intended to add gutter in tablerows in ant-design. Consider building a grid instead of a table and then add e.g. <Row gutter={3}> to it. For the very first row you could assign a className that makes it look like a table header.

You could try something like border-spacing: 0 8px;.

.ant-table table { border-spacing: 0 10px; }

You can use <Space size={size}/>

size is the way to put distance between elements, the documentation - https://ant.design/components/space/

if you add align, direction - it will suit every need you have

Related