Skip to content

Chip ​

The bq-chip component is an interactive tag with optional remove button and toggleable selected state.

Basic Usage ​

html
<bq-chip>Label</bq-chip>

Variants ​

html
<bq-chip variant="primary">Primary</bq-chip>
<bq-chip variant="secondary">Secondary</bq-chip>
<bq-chip variant="success">Success</bq-chip>
<bq-chip variant="danger">Danger</bq-chip>
<bq-chip variant="warning">Warning</bq-chip>
<bq-chip variant="info">Info</bq-chip>

Sizes ​

html
<bq-chip size="sm">Small</bq-chip>
<bq-chip size="md">Medium</bq-chip>
<bq-chip size="lg">Large</bq-chip>

Removable ​

html
<bq-chip removable>Removable tag</bq-chip>

Selected ​

html
<bq-chip selected>Active filter</bq-chip>

Disabled ​

html
<bq-chip disabled>Disabled</bq-chip>

Properties ​

PropertyTypeDefaultDescription
variantstring'primary'primary | secondary | success | danger | warning | info
sizestring'md'sm | md | lg
removablebooleanfalseShows a remove (✕) button
selectedbooleanfalseToggled/pressed state
disabledbooleanfalseDisables the chip

Events ​

EventDetailDescription
bq-click—Fired when the chip is clicked
bq-remove—Fired when the remove button is clicked

Slots ​

SlotDescription
(default)Chip label content

CSS Parts ​

PartDescription
chipThe chip element

Accessibility ​

  • The chip surface has tabindex="0" for keyboard focus (-1 when disabled).
  • aria-pressed reflects the selected state.
  • aria-disabled is set when disabled.
  • Activates on Enter key down and Space key up (matching native button behaviour).

Released under the MIT License.