# @prestashopcorp/puik-web-components

> PUIK Web-Components library.

Latest version **2.8.1** (published 2026-04-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @prestashopcorp/puik-web-components
pnpm add @prestashopcorp/puik-web-components
yarn add @prestashopcorp/puik-web-components
bun add @prestashopcorp/puik-web-components
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.8.1 |
| Published | 2026-04-15 |
| First published | 2024-03-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 370.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 24 |
| Author | Prestashop |
| Maintainers | rxmat_presta, natsuflame, devops-prestashop |

## Links

- npm: https://www.npmjs.com/package/@prestashopcorp/puik-web-components
- Repository: https://github.com/PrestaShopCorp/puik
- Homepage: https://github.com/PrestaShopCorp/puik#readme
- Issues: https://github.com/PrestaShopCorp/puik/issues
- npm.io page: https://npm.io/package/@prestashopcorp/puik-web-components

## Dependencies (3)

- [vue](https://npm.io/package/vue.md) ^3.5.32
- [@prestashopcorp/puik-theme](https://npm.io/package/@prestashopcorp/puik-theme.md) 2.8.1
- [@prestashopcorp/puik-components](https://npm.io/package/@prestashopcorp/puik-components.md) 2.8.1

## Recent versions

- 2.8.1 (latest) — 2026-04-15
- 2.0.0-beta.4 (beta) — 2024-05-21
- 2.8.0 — 2026-04-09
- 2.7.0 — 2025-10-22
- 2.6.0 — 2025-06-04
- 2.5.1 — 2025-04-24
- 2.5.0 — 2025-04-08
- 2.4.0 — 2025-01-17
- 2.3.0 — 2024-11-19
- 2.2.0 — 2024-09-19
- 2.1.0 — 2024-07-29
- 2.0.1 — 2024-06-10
- 2.0.0 — 2024-05-28
- 2.0.0-beta.3 — 2024-05-20
- 2.0.0-beta.2 — 2024-03-19
- … 1 more at https://npm.io/package/@prestashopcorp/puik-web-components/versions

## README

<div align="center">
  <a href="https://prestashop.com">
    <img src="https://prestashop.com/sites/default/files/email/logo_x2_rebrand.png" alt="Logo" width="420">
  </a>

<h3 align="center">Puik Web Components</h3>

  <p align="center">
    The <b>P</b>restaShop <b>UI</b> <b>K</b>it Web Components
  </p>
  <a href="https://uikit.prestashop.com/">Documentation</a>
</div>

## About The Project

Puik Web Components is a library that aims to provide a complete set of reusable web components based on the PrestaShop Design System for all the PrestaShop ecosystem.

ℹ️ [see list of available Web components](https://github.com/PrestaShopCorp/puik/blob/main/RELEASE-NOTES-V2.md#available-components)

## Prerequisites

- Node.js LTS is required.

## Installation

```shell
# NPM
$ npm install @prestashopcorp/puik-web-components --save

# Yarn
$ yarn add @prestashopcorp/puik-web-components

# pnpm
$ pnpm install @prestashopcorp/puik-web-components
```

## Using Puik Web Components

### Global registration

To use all Puik web components in your application, you first need to import and initialize them. Here’s how you can do it:  

```js
import {
  initAllWeb,
  PuikExampleCe,
  PuikAnotherExampleCe,
  // other components...
 } from @prestashopcorp/puik-web-components
 ```

Then, run the following function in your application:  
`initAllWeb();`

For each component, it replaces 'ce' in the component's name with the provided suffix to form the `tagname`.
If no suffix is provided, 'ce' is used as the default suffix

Here’s how you can do it:

```javascript
// Initialize all web components without argument
initAllWeb(); // The tagname for PuikExampleCe will default to 'puik-example-ce'

// Initialize all web components with 'mySuffix' as the suffix
initAllWeb('mySuffix'); // The tagname for PuikExampleCe will be 'puik-example-mySuffix'
```

### On-demand Registration (recommended)

If you only want to use a specific component in your application, you can import and initialize it individually.
In this case you can name your web-component whatever you want.

1 - Import the Web component in JS file and apply one of the following two ways to registering your custom element :

- By using the [`customElements.define`](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#registering_a_custom_element) method :

```js
import { PuikExampleCe } from @prestashopcorp/puik-web-components

customElements.define('your-tagname-here', PuikExampleCe);
```

- Or by using the `initCe` method that you can importing from the package :

```js
import { initCe, PuikExampleCe } from @prestashopcorp/puik-web-components

initCe('your-tagname-here', PuikExampleCe)
```

2 - Then, use your web-component:

```html
<your-tagname-here>
  ...
</your-tagname-here>
```

ℹ️ Web components can use the same props as Vue components

---
_Source: https://npm.io/package/@prestashopcorp/puik-web-components · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
