🤩
Windframe Import Update is finally here.

LIstGroup

Angular Bootstrap ListGroup

Angular Bootstrap List group is a flexible component which displays not only simple list of elements but complex custom content.

Importing the Contrast Angular Bootstrap ListGroup Module

To use the Contrast Angular Bootstrap ListGroup component in your project you need to import ListGroupModule.

typescript
import {ListgroupModule } from 'cdbangular';

Default LIstGroup

The CDBListGroupItem component is a single list item in a CDBListGroup.

Angular Bootstrap ListGroup Default

html
html
<CDBListGroup style="width: 30rem">
<CDBListGroupItem>List Group </CDBListGroupItem>
<CDBListGroupItem>List Group</CDBListGroupItem>
<CDBListGroupItem>List Group</CDBListGroupItem>
<CDBListGroupItem>List Group</CDBListGroupItem>
<CDBListGroupItem>List Group</CDBListGroupItem>
<CDBListGroupItem>List Group</CDBListGroupItem>
</CDBListGroup>

Passing the CDBLIstGroupItem a href attribute makes the list group item act like an a tag.

Angular Bootstrap ListGroup as Link

html
html
<CDBListGroup style="width: 30rem">
<CDBListGroupItem href="/" [active]=true>
List Group
</CDBListGroupItem>
<CDBListGroupItem href="/" [hover]=true>
List Group
</CDBListGroupItem>
<CDBListGroupItem href="/" [hover]=true>
List Group
</CDBListGroupItem>
<CDBListGroupItem href="/" [hover]=true>
List Group
</CDBListGroupItem>
<CDBListGroupItem href="/" [hover]=true>
List Group Link
</CDBListGroupItem>
<CDBListGroupItem href="/" [hover]=true>
List Group
</CDBListGroupItem>
</CDBListGroup>

Label

Use the CDBBadge component to put labels in our list group.

Angular Bootstrap ListGroup Label

html
html
<CDBListGroup style="width: 30rem">
<CDBListGroupItem class="d-flex justify-content-between align-items-center">
List Group <CDBBadge color="primary">19</CDBBadge>
</CDBListGroupItem>
<CDBListGroupItem class="d-flex justify-content-between align-items-center">
List Group
<CDBBadge color="secondary">19</CDBBadge>
</CDBListGroupItem>
<CDBListGroupItem class="d-flex justify-content-between align-items-center">
List Group
<CDBBadge color="success">19</CDBBadge>
</CDBListGroupItem>
<CDBListGroupItem class="d-flex justify-content-between align-items-center">
List Group
<CDBBadge color="danger">19</CDBBadge>
</CDBListGroupItem>
<CDBListGroupItem class="d-flex justify-content-between align-items-center">
List Group<CDBBadge color="info">19</CDBBadge>
</CDBListGroupItem>
<CDBListGroupItem class="d-flex justify-content-between align-items-center">
List Group<CDBBadge color="warning">19</CDBBadge>
</CDBListGroupItem>
</CDBListGroup>

Color List Group

Use the color prop to give your list group a background color.

Angular Bootstrap ListGroup Color

html
html
<CDBListGroup style="width: 30rem">
<CDBListGroupItem color="primary">List Group </CDBListGroupItem>
<CDBListGroupItem color="secondary">List Group</CDBListGroupItem>
<CDBListGroupItem color="success">List Group</CDBListGroupItem>
<CDBListGroupItem color="danger">List Group</CDBListGroupItem>
<CDBListGroupItem color="info">List Group Link</CDBListGroupItem>
<CDBListGroupItem color="warning">List Group</CDBListGroupItem>
</CDBListGroup>

Icons

We nest the component in our CDBListGrpupItem to have icons in our list group.

Angular Bootstrap ListGroup Icons

html
html
<CDBListGroup style="width: 30rem">
<CDBListGroupItem>
<CDBIcon [fab]=true icon="facebook" class="mr-3"></CDBIcon>
List Group
</CDBListGroupItem>
<CDBListGroupItem>
<CDBIcon [fab]=true icon="facebook" size="2x" class="mr-3"></CDBIcon>
List Group
</CDBListGroupItem>
<CDBListGroupItem>
<CDBIcon [fab]=true icon="facebook" size="2x" class="mr-3"></CDBIcon>
List Group
</CDBListGroupItem>
<CDBListGroupItem>
<CDBIcon [fab]=true icon="facebook" size="2x" class="mr-3"></CDBIcon>
List Group
</CDBListGroupItem>
<CDBListGroupItem>
<CDBIcon [fab]=true icon="facebook" size="2x" class="mr-3"></CDBIcon>
List Group
</CDBListGroupItem>
<CDBListGroupItem>
<CDBIcon [fab]=true icon="facebook" size="2x" class="mr-3"></CDBIcon>
List Group
</CDBListGroupItem>
</CDBListGroup>

API

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

API Reference: Contrast Angular Bootstrap ListGroup Props

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

NameTypeDefaultDescriptionExample
classStringAdds custom classesclass="myClass"

API Reference: Contrast Angular Bootstrap LIstGroupItem Properties

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

NameTypeDefaultDescriptionExample
classStringAdds custom classesclass="myClass"
activeBooleanfalseAdds default active state to itemactive=true
colorStringChanges Item background and text color, accepts ["primary", "default", "secondary", "success", "dark", "danger", "info", "warning", "white" ]color="primary"
disableBooleanfalseDisables item from being clickeddisabled=true
hoverBooleanfalseAdds hover effect (slightly background color change)hover=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