# codethereal-iconpicker

> Iconpicker for Bootstrap 5 icons or use with whatever icon family you want

Latest version **1.2.1** (published 2021-07-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install codethereal-iconpicker
pnpm add codethereal-iconpicker
yarn add codethereal-iconpicker
bun add codethereal-iconpicker
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2021-07-08 |
| First published | 2021-01-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 61 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | dogukanakkaya |
| Keywords | icons, css, js, bootstrap-icons, fontawesome, iconpicker |

## Links

- npm: https://www.npmjs.com/package/codethereal-iconpicker
- npm.io page: https://npm.io/package/codethereal-iconpicker

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.2.1 (latest) — 2021-07-08
- 1.2.0 — 2021-07-08
- 1.1.5 — 2021-02-23
- 1.1.4 — 2021-02-06
- 1.1.3 — 2021-02-04
- 1.1.2 — 2021-01-31
- 1.1.1 — 2021-01-31
- 1.1.0 — 2021-01-31

## README

# Iconpicker for Bootstrap 5

### Usage

**1** - Via **cdn**

```js
<script src="https://unpkg.com/codethereal-iconpicker@1.2.0/dist/iconpicker.js"></script>
```

**2** - Via **npm**

```
npm i codethereal-iconpicker
```

```js
import Iconpicker from 'codethereal-iconpicker'
```

**3** - Or just download the git repo and get file under dist directory and import it

```js
<script src="/path/to/iconpicker.js"></script>
```


```js
new Iconpicker(document.querySelector(".iconpicker"));
new Iconpicker(document.querySelector(".iconpicker"), options);
document.querySelectorAll('.iconpicker').forEach(picker => new Iconpicker(picker))
```


**Options**
```js
(async () => {
    const response = await fetch('https://unpkg.com/codethereal-iconpicker@1.2.1/dist/iconsets/bootstrap5.json')
    const result = await response.json()

    const iconpicker = new Iconpicker(document.querySelector(".iconpicker"), {
        icons: result,
        showSelectedIn: document.querySelector(".selected-icon"),
        searchable: true,
        selectedClass: "selected",
        containerClass: "my-picker",
        hideOnSelect: true,
        fade: true,
        defaultValue: 'bi-alarm',
        valueFormat: val => `bi ${val}`
    });

    iconpicker.set() // Set as empty
    iconpicker.set('bi-alarm') // Reset with a value
})()
```

**Use with font awesome**
```js
(async () => {
  const response = await fetch('https://unpkg.com/codethereal-iconpicker@1.2.1/dist/iconsets/fontawesome4.json')
  const result = await response.json()

  new Iconpicker(document.querySelector(".iconpicker"), {
    icons: result,
    valueFormat: val => `fa ${val}`
  })
})()
```

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