How to build paging components