Skip to content

Chip

te-chip is a compact tag, optionally with an avatar and a close button.

Variants

primarysuccessdangerdark
vue
<te-chip type="primary">primary</te-chip>
<te-chip type="success">success</te-chip>
<te-chip type="danger">danger</te-chip>
<te-chip type="dark">dark</te-chip>

Sizes

smallmediumlarge
vue
<te-chip size="small">small</te-chip>
<te-chip size="medium">medium</te-chip>
<te-chip size="large">large</te-chip>

Closable

Dismiss me
vue
<te-chip type="primary" closable>Dismiss me</te-chip>

Props

PropTypeDefaultDescription
type'normal' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'pink' | 'purple' | 'light' | 'dark''light'Colour variant.
size'small' | 'medium' | 'large''medium'Height and avatar size.
closablebooleanfalseShows a close button that emits close.
imgUrlstring''Avatar image shown before the label.

Events

EventPayloadDescription
closeMouseEventClose button clicked. The chip does not remove itself.

Slots

SlotPropsDescription
defaultChip label.
iconReplaces the close icon.

Released under the MIT License.