Pagination

Pagination

Angular Bootstrap Pagination is a component used to indicate existence of a series of related content across multiple pages and enables navigation across them.

We use a large block of connected links for our pagination, making links hard to miss and easily scalable—all while providing large hit areas. Pagination is built with list HTML elements so screen readers can announce the number of available links. We use a wrapping <nav> element to identify it as a navigation section to screen readers and other assistive technologies.

Examples

Default Pagination example.

image info

html
<CDBPagination circle=true>
<CDBPagelink>Prev</CDBPagelink>
<CDBPageitem>1</CDBPageitem>
<CDBPageitem>2</CDBPageitem>
<CDBPageitem>3</CDBPageitem>
<CDBPagelink>Next</CDBPagelink>
</CDBPagination>
<CDBPagination circle='true' size="big" color="success">
<CDBPagelink>Prev</CDBPagelink>
<CDBPageitem>1</CDBPageitem>
<CDBPageitem>2</CDBPageitem>
<CDBPageitem>3</CDBPageitem>
<CDBPagelink>Next</CDBPagelink>
</CDBPagination>
<CDBPagination size="small" color="secondary">
<CDBPagelink>Prev</CDBPagelink>
<CDBPageitem>1</CDBPageitem>
<CDBPageitem>2</CDBPageitem>
<CDBPageitem>3</CDBPageitem>
<CDBPagelink>Next</CDBPagelink>
</CDBPagination>
<CDBPagination color="warning" sm=true>
<CDBPagelink>Prev</CDBPagelink>
<CDBPageitem>1</CDBPageitem>
<CDBPageitem>2</CDBPageitem>
<CDBPageitem>3</CDBPageitem>
<CDBPagelink>Next</CDBPagelink>
</CDBPagination>
<CDBPagination color="white" sm=true>
<CDBPagelink>Prev</CDBPagelink>
<CDBPageitem>1</CDBPageitem>
<CDBPageitem>2</CDBPageitem>
<CDBPageitem>3</CDBPageitem>
<CDBPagelink>Next</CDBPagelink>
</CDBPagination>
<CDBPagination color="light">
<CDBPagelink>Prev</CDBPagelink>
<CDBPageitem>1</CDBPageitem>
<CDBPageitem>2</CDBPageitem>
<CDBPageitem>3</CDBPageitem>
<CDBPagelink>Next</CDBPagelink>
</CDBPagination>
<CDBPagination color="danger">
<CDBPagelink>Prev</CDBPagelink>
<CDBPageitem>1</CDBPageitem>
<CDBPageitem>2</CDBPageitem>
<CDBPageitem>3</CDBPageitem>
<CDBPagelink>Next</CDBPagelink>
</CDBPagination>
<CDBPagination>
<CDBPagelink>Prev</CDBPagelink>
<CDBPageitem>1</CDBPageitem>
<CDBPageitem>2</CDBPageitem>
<CDBPageitem>3</CDBPageitem>
<CDBPagelink>Next</CDBPagelink>
</CDBPagination>

API

Here in this section you will find information about required modules and available inputs, outputs, methods and events of this component.

Contrast Pagination Bootstrap Modules used

import {PaginationModule } from 'cdbangular';

API Reference: Contrast Pagination Inputs

The table below shows the possible input of the Pagination component.

NameTypeDefaultDescriptionExample
classStringAdds custom classesAdds custom classesclass="myClass"
sizeStringChanges size of pagination component. Choose from lg and smsize="sm"
smBooleanfalseChanges the size of pagination component to smsm=true
circleBooleanfalseChanges the shape of pagination component to circularcircle=true
colorStringdarkChanges default pagination buttons color; available values: [blue, red, teal, dark-grey, dark, blue-grey, amber, purple]color="red"

API Reference: Contrast Pagination Item Properties

The table below shows the configuration options of the CDBPageItem component.

NameTypeDefaultDescriptionExample
classStringAdds custom classesclass="myClass"
disableBooleanfalseDisables item from being clickeddisabled=true
activeBooleanfalseSets active state of the buttonactive=true

API Reference: Contrast Pagination Link Properties

The table below shows the configuration options of the CDBPageLink component.

NameTypeDefaultDescriptionExample
classNameStringAdds custom classesclass="myClass"
disableBooleanfalseDisables item from being clickeddisabled=true
activeBooleanfalseSets active state of the buttonactive=true