# @chantelle/pl-image

> The Image component of the Chantelle Pattern Library

Latest version **1.1.3** (published 2018-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @chantelle/pl-image
pnpm add @chantelle/pl-image
yarn add @chantelle/pl-image
bun add @chantelle/pl-image
```

## 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.1.3 |
| Published | 2018-09-13 |
| First published | 2018-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 372.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Chantelle Lingerie GmbH |
| Maintainers | blackakula, chkmrv, ctsd, evashchuk, gabrielizaias, jacopkane, krasnovyehor |

## Links

- npm: https://www.npmjs.com/package/@chantelle/pl-image
- Repository: git@bitbucket.org:editionlingerie/pattern-library
- npm.io page: https://npm.io/package/@chantelle/pl-image

## Dependencies (5)

- [react](https://npm.io/package/react.md) ^16.3.2
- [recompose](https://npm.io/package/recompose.md) ^0.27.1
- [classnames](https://npm.io/package/classnames.md) ^2.2.5
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.1
- [@chantelle/pl-styles](https://npm.io/package/@chantelle/pl-styles.md) ^1.1.3

## Recent versions

- 1.1.3 (latest) — 2018-09-13
- 2.0.0-0 — 2018-07-19
- 1.0.0-1 — 2018-06-19
- 0.0.1 — 2018-06-07
- 0.0.0 — 2018-06-05

## README

# Image

## Installation

```bash
yarn add @chantelle/pl-image
```

### React Component

```jsx
import Image from '@chantelle/pl-image';

ReactDOM.render(
  <Image source="http://via.placeholder.com/350x150" alt="Alternative text" />,
  container
);
```

#### SrcSet

```jsx
import Image from '@chantelle/pl-image';

ReactDOM.render(
  <Image
    source="http://via.placeholder.com/350x150"
    alt="Alternative text"
    sourceSet={[
      {source: "http://via.placeholder.com/350x150", descriptor: "150w", condition: "(max-width: 850px) 150px"},
      {source: "http://via.placeholder.com/350x200", descriptor: "200w", condition: "200px"},
    ]}
  />,
  container
);
```

### CSS API

To use the Image component, add the `.pl-image` to the `<img />` element to apply the styles.

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