
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
@constructor-io/constructorio-ui-plp
Advanced tools
Constructor PLP UI library for web applications
A UI library that provides React components to manage the fetching and rendering logic for Search & Browse product listing pages powered by Constructor. Typescript support is available.
Our Storybook Docs are the best place to explore the behavior and the available configuration options for this UI library.
npm i @constructor-io/constructorio-ui-plp
The CioPlp
component handles state management, data fetching, and rendering logic for the entire PLP.
import CioPlp from '@constructor-io/constructorio-ui-plp';
function YourComponent() {
return (
<div>
<CioPlp apiKey='key_M57QS8SMPdLdLx4x' />
</div>
);
}
This is a framework agnostic method that can be used in any JavaScript project. The CioPlp
function provides a simple interface to inject an entire PLP UI into the provided selector
.
In addition to PLP component props, this function also accepts selector
and includeCSS
.
import CioPlp from '@constructor-io/constructorio-ui-plp/constructorio-ui-plp-bundled';
CioPlp({
selector: '#plp-container',
includeCSS: true, // Include the default CSS styles - defaults to true
apiKey: 'key_M57QS8SMPdLdLx4x',
// ... additional arguments
});
By default, importing React components from this library does not pull any CSS into your project.
If you wish to use starter styles from this library, add an import statement similar to the example import statement below:
import '@constructor-io/constructorio-ui-plp/styles.css';
styles.css
stylesheet..cio-plp
CSS selector.CioPlp
component will take up the full width and height of the parent container.Please note the starter styles utilize @container queries and enable responsive styles for our PLPs based on the size of their container element. Since this feature is supported by modern browsers, polyfills have not been included in this library. However, if you want to support older browsers, you can add fallback styles or use a polyfill.
Older JavaScript environments
The library provides two different builds: CommonJS (cjs) and ECMAScript Modules (mjs).
For ECMAScript Modules (mjs) build. The JavaScript version is ESNext which might not be supported by your environment. If that's the case and your environment is using an older JavaScript version like ES6 (ES2015), you may get this error:
Module parse failed: Unexpected token (15:32) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file
To solve this you can import the CommonJS (cjs) build which supports ES6 (ES2015) syntax:
import CioPlp from '@constructor-io/constructorio-ui-plp/cjs'
ESLint
There is a known issue with ESLint where it fails to resolve the paths exposed in the exports
statement of NPM packages. If you are receiving the following error, you can safely disable ESLint using // eslint-disable-line
for that line.
Unable to resolve path to module '@constructor-io/constructorio-ui-plp/styles.css'
Relevant open issues: Issue 1868, Issue 1810
npm ci # Install dependencies for local dev
npm run dev # Start a local dev server for Storybook
npm run lint # Run lint
npm run compile # Generate lib folder for publishing to npm
npm run build-storybook # Generate Storybook static bundle for deploy with GitHub Pages
Dispatch the Publish workflow in GitHub Actions. You're required to provide two arguments:
major
, minor
, or patch
.This workflow will automatically:
The library version is tracked by releases and git tags. We intentionally keep the package.json version at 0.0.0
to avoid pushing changes to the main
branch. This solves many security concerns by avoiding the need for branch-protection rule exceptions.
Dispatch the Deploy Storybook workflow in GitHub Actions.
FAQs
Constructor PLP UI library for web applications
We found that @constructor-io/constructorio-ui-plp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.