# @advanced-rest-client/paper-chip

> A compact material design element that represent and input, attribute, or action.

Latest version **3.1.1** (published 2019-09-03) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @advanced-rest-client/paper-chip
pnpm add @advanced-rest-client/paper-chip
yarn add @advanced-rest-client/paper-chip
bun add @advanced-rest-client/paper-chip
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.1.1 |
| Published | 2019-09-03 |
| First published | 2019-04-01 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 30.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | jarrodek |
| Keywords | api-components, paper-elements, chip, ui-components |

## Links

- npm: https://www.npmjs.com/package/@advanced-rest-client/paper-chip
- Repository: https://github.com/advanced-rest-client/paper-chip
- Homepage: https://github.com/advanced-rest-client/paper-chip#readme
- Issues: https://github.com/advanced-rest-client/paper-chip/issues
- npm.io page: https://npm.io/package/@advanced-rest-client/paper-chip

## Dependencies (3)

- [lit-html](https://npm.io/package/lit-html.md) ^1.0.0
- [lit-element](https://npm.io/package/lit-element.md) ^2.0.1
- [@polymer/iron-icon](https://npm.io/package/@polymer/iron-icon.md) ^3.0.1

## Alternatives

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@progress/kendo-vue-listbox](https://npm.io/package/@progress/kendo-vue-listbox.md) — 932 weekly downloads

## Recent versions

- 3.1.1 (latest) — 2019-09-03
- 3.1.0 — 2019-06-06
- 3.0.0 — 2019-05-31
- 3.0.0-preview.1 — 2019-04-01

## README

[![Published on NPM](https://img.shields.io/npm/v/@advanced-rest-client/paper-chip.svg)](https://www.npmjs.com/package/@advanced-rest-client/paper-chip)

[![Build Status](https://travis-ci.org/advanced-rest-client/paper-chip.svg?branch=stage)](https://travis-ci.org/advanced-rest-client/paper-chip)

[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/advanced-rest-client/paper-chip)

# paper-chip

A compact material design element that represent and input, attribute, or action.

### Example

```html
<style>
.avatar {
  background-color: red;
  color: #fff !important;
  width: 24px;
  height: 24px;
}
</style>
<h2>Basics</h2>
<section>
  <paper-chip>Simple chip</paper-chip>

  <paper-chip>
    <span class="avatar" slot="icon">C</span>
    <span>Chip with icon</span>
  </paper-chip>

  <paper-chip removable>
    <span class="avatar" slot="icon">R</span>
    Chip that can be removed
  </paper-chip>

  <paper-chip removable disabled>
    <span class="avatar" slot="icon">D</span>
    Disabled chip
  </paper-chip>
</section>

<h2>Input chips</h2>
<section>
  <paper-chip removable>
    <iron-icon icon="communication:location-on" slot="icon"></iron-icon>
    Portland
  </paper-chip>

  <paper-chip removable>
    <iron-icon icon="maps:directions-bike" slot="icon"></iron-icon>
    Biking
  </paper-chip>
</section>
```

### API components

This components is a part of [API components ecosystem](https://elements.advancedrestclient.com/)

## Usage

### Installation
```
npm install --save @advanced-rest-client/paper-chip
```

### In an html file

```html
<html>
  <head>
    <script type="module">
      import './node_modules/@advanced-rest-client/paper-chip/paper-chip.js';
    </script>
  </head>
  <body>
    <paper-chip></paper-chip>
  </body>
</html>
```

### In a Polymer 3 element

```js
import {PolymerElement, html} from './node_modules/@polymer/polymer';
import './node_modules/@advanced-rest-client/paper-chip/paper-chip.js';

class SampleElement extends PolymerElement {
  static get template() {
    return html`
    <paper-chip></paper-chip>
    `;
  }
}
customElements.define('sample-element', SampleElement);
```

### Installation

```sh
git clone https://github.com/advanced-rest-client/paper-chip
cd api-url-editor
npm install
npm install -g polymer-cli
```

### Running the demo locally

```sh
polymer serve --npm
open http://127.0.0.1:<port>/demo/
```

### Running the tests
```sh
polymer test --npm
```

## Styling

`<paper-chip>` provides the following custom properties for styling:

Custom property | Description | Default
----------------|-------------|----------
`--paper-chip-background-color` | Chip background color | `rgba(35, 47, 52, 0.12)`
`--paper-chip-focused-background-color` | Background color when focused | `#D6D6D6`
`--paper-chip-active-background-color` | Background color when toggle is active | `#cdcdcd`
`--paper-chip-icon-color` | Color of the icon | `#666666`
`--paper-chip-label-color` | Color of the label | `#232F34`
`--paper-chip-label-focused-color` | Color of the when focused | ``
`--paper-chip-label-active-color` | Color of the when active | ``
`--paper-chip-icon-close-color` | Color of the close icon | `#dfdfdf`
`--paper-chip-icon-close-background-color` | Background color of the close icon | `#666666`

`<paper-chip>` provides the following [parts](https://www.w3.org/TR/css-shadow-parts-1/):

Part name | Description
----------------|-------------
`paper-chip-container` | Styles applied to the chip container
`paper-chip-icon` | Styles applied to the icon container
`paper-chip-label` | Styles applied to the label container
`paper-chip-remove` | Styles applied to the delete icon

---
_Source: https://npm.io/package/@advanced-rest-client/paper-chip · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
