Search code examples
reactjspaginationcomponentsantd

How to change showTotal postiton in antd pagination component


showTotal is currently aligned to the left of the pagination ( list of numbers ) always.

How to change its position.

Refer to the image below to understand the expected behavior

enter image description here

Documentation for Reference: https://ant.design/components/pagination/


Solution

  • Altough it is a li inside a ul, you can trick it somehow using absolute position

    .ant-pagination-total-text { 
      position: absolute;
      right: 0;
    }
    

    Example