Skip to content

Chip Group

BsChipGroup extends the BsChip component by providing groupable functionality. It is used for creating groups of selections using chips.

Overview

<bs-chip-group> is a collection of <bs-chip>. Rather than create multiple <bs-chip>, it’s better to create single <bs-chip-group>. <bs-chip-group> provides select functionality, which will come in handy when working with more chips. The items property is used as data source to create the chips.

Updated on v2.0.0
Arts
Creative Writers
Drawers
Foods

Multi Rows

If the total width of chip items exceeds the container's width, use column property to wrap chip items.

Arts
Creative Writers
Drawers
Foods
Home
Shopping
Tech
Vacation
Work

Multiple Selection

By default <bs-chip-group> works in single selection mode. Use multiple property to enable multiple selection mode.

Arts
Creative Writers
Drawers
Foods
Home
Shopping
Tech
Vacation
Work

Filter Chips

Filter chips use tags or descriptive words to filter content. It creates an alternative visual style that communicates to the user that the chip is selected. They are a good alternative to toggle buttons or checkboxes. Use checked-icon property to enable this feature. Additionally, you can use active-class property to change the appearance of the selected chips.

Choose amenities
Elevator
Washer / Dryer
Fireplace
Wheelchair access
Dogs ok
Cats ok

Choose neighborhoods
Snowy Rock Place
Honey Lane Circle
Donna Drive
Elaine Street
Court Street
Kennedy Park

Enabling Avatar

Additionally, each chips can also has avatar. This can be achieved by providing the imgSrc on the chips data source.

Choose amenities
Chip Avatar
Elevator
Chip Avatar
Washer / Dryer
Chip Avatar
Fireplace
Chip Avatar
Wheelchair access
Chip Avatar
Dogs ok
Chip Avatar
Cats ok

Choose neighborhoods
Chip Avatar
Snowy Rock Place
Chip Avatar
Honey Lane Circle
Chip Avatar
Donna Drive
Chip Avatar
Elaine Street
Chip Avatar
Court Street
Chip Avatar
Kennedy Park

Sliding Chips

Sliding Chips is used when the total width of chip items exceed the container's width, but still wants to keep it within a single row. When enabled, it creates a visual style like slide carousel. Left and right arrows button is provided as a navigation functionality. To enable this feature, use the slider-button property explicitly.

Arts
Creative Writers
Drawers
Foods
Home
Shopping
Tech
Vacation
Work

API Reference

TChipOptionItem

The Chip's item has properties as described below:

PropertyTypeDescription
idString<BsChip> element ID.
text requiredStringThe item text.
valueString/Number/BooleanThe item value.
disabledBoolean<BsChip> element state.
dismissibleBooleanEnable dismissible <BsChip>.
hrefStringRender <BsChip> as <a> element and define its href property and apply chip styles to the <a> element.
iconString
The icon to display inside the <BsChip>. Updated on v2.1.0

Use any valid android icon name from Google Material Symbols with or without a suffix. Valid suffixes are: _outlined, _rounded, _sharp, _filled, _outlined_filled, _rounded_filled, and _sharp_filled.

Suffix will take precedence over iconVariant property.
iconFlipStringFlip the icon. Valid values are: horizontal, vertical, both.
iconPulseBooleanApply pulse animation to the icon.
iconSpinBooleanApply spin animation to the icon.
iconRotationNumberRotate the icon. Valid values are: 90, 180, 270.
iconVariantStringPredefined icon style variant. Valid values are: outlined, rounded, sharp, filled, outlined_filled, rounded_filled, and sharp_filled. Updated on v2.1.0
imgSrcString<BsChip> avatar image source url.

Released under the BSD-3-Clause License.