# cp-select

> A consistently styled cross-browser select component

Latest version **1.5.24** (published 2018-11-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install cp-select
pnpm add cp-select
yarn add cp-select
bun add cp-select
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.24 |
| Published | 2018-11-20 |
| First published | 2015-05-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 119.7 KB |
| Known vulnerabilities | 0 (+10 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Bret Little |
| Maintainers | blittle, joeldenning, keithhalterman, kentmclean, leahjlou |

## Links

- npm: https://www.npmjs.com/package/cp-select
- Repository: https://github.com/canopytax/cp-select
- Issues: https://github.com/canopytax/cp-select/issues
- npm.io page: https://npm.io/package/cp-select

## Dependencies (5)

- [jquery](https://npm.io/package/jquery.md) ^3.3.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [angular](https://npm.io/package/angular.md) ^1.6.8
- [babel-cli](https://npm.io/package/babel-cli.md) ^6.26.0
- [canopy-styleguide](https://npm.io/package/canopy-styleguide.md) latest

## Recent versions

- 1.5.24 (latest) — 2018-11-20
- 1.5.23 — 2018-11-20
- 1.5.22 — 2018-01-22
- 1.5.21 — 2017-05-22
- 1.5.20 — 2017-05-22
- 1.5.19 — 2016-08-08
- 1.5.18 — 2016-07-22
- 1.5.17 — 2016-07-22
- 1.5.16 — 2016-07-21
- 1.5.15 — 2016-07-21
- 1.5.14 — 2016-07-21
- 1.5.13 — 2016-05-04
- 1.5.12 — 2016-04-11
- 1.5.11 — 2016-04-11
- 1.5.10 — 2016-03-25
- … 14 more at https://npm.io/package/cp-select/versions

## README

# cp-select
A consistently styled cross-browser and keyboard friendly select component

## Requirements
 - Angular 1.3
 - Lodash
 - jQuery

## Installation
1. Install through npm `npm install --save cp-select`
2. Make sure your angular app depends upon 'cp-select':
```javascript
angular.module('app', ['cp-select']);
```

## Usage
### Markup:
```html
<cp-select ng-model="model" collection="collection"></cp-select>
```

```javascript
scope.model = {
	value: "Arizona",
	key: "AZ"
};

scope.collection = [{
	"value": "Alabama",
	"key": "AL"
}, {
	"value": "Alaska",
	"key": "AK"
}, {
	"value": "American Samoa",
	"key": "AS"
}, {
	"value": "Arizona",
	"key": "AZ"
}, {
	"value": "Arkansas",
	"key": "AR"
}];

// The collection object can also be an array of strings
scope.collection = [
	"Alabama",
	"Alaska",
	"American Samoa",
	"Arizona",
	"Arkansas",
];

```
## Options
+ `key-model`: Make the selected model to be only the `key` attribute of the selected item
+ `transparent`
+ `append-text`
+ `autosize-input`: Make styling match autosize inputs
+ `allow-clear`: show an 'x' icon next to selected value, allowing the user to clear the input

## Demo
http://canopytax.github.io/cp-select/

---
_Source: https://npm.io/package/cp-select · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
