Components chevron_right Chips

Basic Usage

Default Template

Press delete to remove this chip.
Press delete to remove this chip.
Press delete to remove this chip.

Custom Template

Press delete to remove this chip.
Press delete to remove this chip.
Press delete to remove this chip.

Chips with Autocomplete

Press delete to remove this chip.

Chips with Autocomplete (requires match)

Press delete to remove this chip.

Template

<h2>Default Template</h2>
<PaperChips @content={{this.fruitNames}} @readOnly={{this.readOnly}} @removeItem={{action "removeItem"}} @addItem={{action "addItem"}} @placeholder="Add a tag" />

<h2>Custom Template</h2>
<PaperChips @readOnly={{this.readOnly}} @removeItem={{action "removeCustomItem"}} @addItem={{action "addCustomItem"}} @placeholder="Add a tag" @content={{this.customFruitNames}} as |item|>
  <strong>{{item}}</strong>
  <em>(fruit)</em>
</PaperChips>

<h2>Chips with Autocomplete</h2>
<PaperChips @readOnly={{this.readOnly}} @removeItem={{action "removeVegetable"}} @addItem={{action "addVegetable"}} @placeholder="Add a vegetable" @content={{this.vegetables}} @options={{this.remainingVegetables}} @searchField="name" @noMatchesMessage="Not found. Click to add." as |item|>
  <strong>{{item.name}}</strong>
  {{#if item.family}}
    <em>{{item.family}}</em>
  {{/if}}
</PaperChips>

<h2>Chips with Autocomplete (requires match)</h2>
<PaperChips @readOnly={{this.readOnly}} @removeItem={{action "removeVegeName"}} @addItem={{action "addVegeName"}} @placeholder="Add a vegetable" @content={{this.vegeNames}} @options={{this.remainingVegeNames}} @requireMatch={{true}} />

Contact chips

Contact Chips