šŸ¤©
Windframe Import Update is finally here.

Pagination

Angular Bootstrap 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.

Importing the Contrast Angular Bootstrap Pagination Module

To use the Contrast Angular Bootstrap Pagination component in your project you need to import PaginationModule.

typescript
import {PaginationModule } from 'cdbangular';

Default Pagination

Alongside the CDBPagination component, we also use the CDBPageItem, this represents an item in the CDBPagination component. Next, we imported the CDBPageLink component, this component acts as a link.

Setting the circle prop makes our pagination more rounded. Use the size prop to describe how little or large you want your pagination to be, and the color prop.

Angular Bootstrap Pagination Default

html
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 Reference: Contrast Angular Bootstrap Pagination Props

This section will build on your information about the props you get to use with the Contrast Angular Bootstrap Pagination component. You will find out what these props do, their default values, and how you would use them in your code.

The table below lists other prop options of the CDBPagination 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 Angular Bootstrap Pagination Item Props

The table below lists other prop 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 Bootstrap Pagination Link Props

The table below lists other prop options of the CDBPageLink component.

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

Trying to build out all user interfaces and components for your website or web app from scratch can become a very tedious task. A huge reason why we created Contrast Bootstrap to help reduce the amount of time we spend doing that, so we can focus on building some other aspects of the project. Contrast Bootstrap PRO consists of a UI Kit featuring over 10000+ component variants. Together with a template of 5 admin dashboards and 23+ additional multipurpose pages template for building almost any type of website or web app. You can view a demo and learn more about Contrast by clicking here.Download the free react template

ad-banner

Contrast Bootstrap PRO was built using the most popular CSS framework Bootstrap to help build your next landing, admin SAAS, prelaunch etc project with a clean, prebuilt and well documented template and UI components.Learn more about Contrast