Dalal Mansour
Dalal Mansour

Reputation: 317

space between rows in a table antd

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

Upvotes: 4

Views: 13628

Answers (4)

Tzachi
Tzachi

Reputation: 32

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

Upvotes: 0

Oksana K
Oksana K

Reputation: 165

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

Upvotes: 5

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

Upvotes: 0

PRSHL
PRSHL

Reputation: 1444

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.

Upvotes: 0

Related Questions