# @justeattakeaway/pie-thumbnail

> PIE Design System Thumbnail built using Web Components

Latest version **1.0.2** (published 2026-11-18) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @justeattakeaway/pie-thumbnail
pnpm add @justeattakeaway/pie-thumbnail
yarn add @justeattakeaway/pie-thumbnail
bun add @justeattakeaway/pie-thumbnail
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2026-11-18 |
| First published | 2024-12-06 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 53.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 42 |
| Author | Just Eat Takeaway.com - Design System Team |
| Maintainers | mwh1989, anastasiia.horban, ashleynolan, jamieomaguire, lizzie.turney, davidpn.11, roberto.santana, mmakwe-onyeka, fozzie-bot, siggerzz, maledr5 |

## Links

- npm: https://www.npmjs.com/package/@justeattakeaway/pie-thumbnail
- Repository: https://github.com/justeattakeaway/pie
- Homepage: https://webc.pie.design/?path=/docs/components-thumbnail--overview
- Issues: https://github.com/justeattakeaway/pie/issues
- npm.io page: https://npm.io/package/@justeattakeaway/pie-thumbnail

## Dependencies (2)

- [@lit/context](https://npm.io/package/@lit/context.md) 1.1.6
- [@justeattakeaway/pie-webc-core](https://npm.io/package/@justeattakeaway/pie-webc-core.md) 22.1.0

## Recent versions

- 1.0.2 (latest) — 2026-11-18
- 0.0.0-snapshot-release-20261118102158 (snapshot-release) — 2026-11-18
- 0.0.0-snapshot-release-20261117171525 — 2026-11-17
- 0.0.0-snapshot-release-20261117100349 — 2026-11-17
- 0.0.0-snapshot-release-20261117084101 — 2026-11-17
- 0.0.0-snapshot-release-20261110113822 — 2026-11-10
- 0.0.0-snapshot-release-20261104130132 — 2026-11-04
- 0.0.0-snapshot-release-20261104103259 — 2026-11-04
- 0.0.0-snapshot-release-20261103180059 — 2026-11-03
- 1.0.1 — 2026-10-14
- 0.0.0-snapshot-release-20261013151643 — 2026-10-13
- 0.0.0-snapshot-release-20261013150640 — 2026-10-13
- 0.0.0-snapshot-release-20261013143817 — 2026-10-13
- 0.0.0-snapshot-release-20261013113410 — 2026-10-13
- 1.0.0 — 2026-09-30
- … 173 more at https://npm.io/package/@justeattakeaway/pie-thumbnail/versions

## README

# @justeattakeaway/pie-thumbnail
[Source Code](https://github.com/justeattakeaway/pie/tree/main/packages/components/pie-thumbnail) | [Design Documentation](https://pie.design/components/thumbnail) | [NPM](https://www.npmjs.com/package/@justeattakeaway/pie-thumbnail)

<p>
  <a href="https://www.npmjs.com/@justeattakeaway/pie-thumbnail">
    <img alt="GitHub Workflow Status" src="https://img.shields.io/npm/v/@justeattakeaway/pie-thumbnail.svg">
  </a>
</p>

`@justeattakeaway/pie-thumbnail` is a Web Component built using the Lit library. It offers a simple and accessible thumbnail component for web applications.

## Table of Contents

- [Installation](#installation)
- [Documentation](#documentation)
  - [Properties](#properties)
  - [Slots](#slots)
  - [CSS Variables](#css-variables)
  - [Events](#events)
- [Usage Examples](#usage-examples)
- [Questions and Support](#questions-and-support)
- [Contributing](#contributing)

## Installation

> To install any of our web components in your application, we would suggest following the [getting started guide](https://webc.pie.design/?path=/docs/introduction-getting-started--docs) to set up your project.

Ideally, you should install the component using the **`@justeattakeaway/pie-webc`** package, which includes all of the components. Or you can install the individual component package.

## Documentation

### Properties
| Prop                   | Options                                                                                           | Description                                                                                                               | Default     |
|------------------------|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|-------------|
| `src`                  | —                                                                                                 | The `src` attribute for the underlying image tag.                                                                         | `""`        |
| `alt`                  | —                                                                                                 | The `alt` attribute for the underlying image tag.                                                                         | `""`        |
| `variant`              | `"default"`, `"outline"`                                                                          | Sets the variant of the thumbnail.                                                                                        | `"default"` |
| `backgroundColor`      | `"default"`, `"subtle"`, `"strong"`, `"dark"`, `"inverse"`, `"inverse-alternative"`               | Sets the background color of the thumbnail container.                                                                     | `"default"` |
| `size`                 | A number between 24 and 128, in multiples of 8                                                    | Sets the size of the thumbnail.                                                                                           | `48`        |
| `aspectRatio`          | `"1by1"`, `"4by3"`, `"16by9"`                                                                     | Sets the aspect-ratio of the thumbnail image.                                                                             | `"1by1"`    |
| `disabled`             | `true`, `false`                                                                                   | When true, the disabled styles are applied. Also applied automatically when the thumbnail is inside a disabled `pie-radio-group` or `pie-checkbox-group`. | `false`     |
| `hasPadding`           | `true`, `false`                                                                                   | When true, extra spacing around the thumbnail container is applied.                                                       | `false`     |
| `hideDefaultPlaceholder` | `true`, `false`                                                                                 | When true, hides the component default placeholder on image load failure.                                                 | `false`     |
| `placeholder`          | `{ src?: string, alt?: string }`                                                                  | Overrides the component default placeholder with a custom one on image load failure.                                     | `{}`        |

### Slots
This component does not have any slots. All content is controlled through properties.

### CSS Variables
This component does not expose any CSS variables for style overrides.

### Events

This component does not emit any custom events. In order to add event listening to this component, you can treat it like a native HTML element in your application.

## Usage Examples

**For HTML:**

```js
// import as module into a js file e.g. main.js
import '@justeattakeaway/pie-webc/components/thumbnail.js'
```

```html
<!-- pass js file into <script> tag -->
<pie-thumbnail src="" alt=""></pie-thumbnail>
<script type="module" src="/main.js"></script>
```

**For Native JS Applications, Vue, Angular, Svelte etc.:**

```js
// Vue templates (using Nuxt 3)
import '@justeattakeaway/pie-webc/components/thumbnail.js';

<pie-thumbnail src="" alt=""></pie-thumbnail>
```

**For React Applications:**

```jsx
import { PieThumbnail } from '@justeattakeaway/pie-webc/react/thumbnail.js';

<PieThumbnail src="" alt=""></PieThumbnail>
```

## Questions and Support

If you work at Just Eat Takeaway.com, please contact us on **#help-designsystem**. Otherwise, please raise an issue on [Github](https://github.com/justeattakeaway/pie/issues).

## Contributing

Check out our [contributing guide](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide) for more information on [local development](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide#local-development) and how to run specific [component tests](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide#testing).

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