Skip to content

Chip

<tpg-chip></tpg-chip>

Chips provide the user with an at-glance view of their input, selections, and data point they interacted with.

They can also delete the data point as well as acting as a shortcut to its location.

When in use, they will be displayed in a single-lined, array of items. If the line is longer than the container, it will be possible to swipe the chips horizontally.

Examples

Chip supports an option slot called closing-button. This is used if the chip should be able to be removed. Insert a quaternary-button

Tables

Properties

Attribute Property Description Type Default Value
label label Label to be displayed inside the chip string ''
disabled disabled Variable that disables the button boolean false
leading-icon-template leadingIconTemplate Leading icon name or identifier from IconConstant to appear before the text. IconConstant | '' ''
trailing-icon-template trailingIconTemplate Trailing icon name or identifier from IconConstant to appear after the text. IconConstant | '' ''

Events

Event name Reactjs attribute Description
tpg-click ontpg-click Event emitted when the button is clicked

Functions

Name Description Arguments
No functions found.

Slots

Name Description
closing-button Slot for inserting closing button

CSS Parts

Attribute Description
No CSS parts found.

Sandbox