![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@manifoldco/ui
Advanced tools
Manifold’s web component UI library, powered by Stencil.
npm i @manifoldco/ui
Framework | Supported? |
---|---|
Vanilla JS (no framework) | ✅ |
Angular | ✅ |
React | ✅ |
Vue | ✅ |
Ember | ✅ |
<head>
<link
rel="stylesheet"
type="text/css"
href="https://unpkg.com/@manifoldco/ui/dist/manifold/manifold.css"
/>
</head>
<body>
<manifold-marketplace></manifold-marketplace>
<script type="module">
import { defineCustomElements } from 'https://unpkg.com/@manifoldco/ui/dist/esm/es2017/manifold.define.js';
defineCustomElements(window);
</script>
</body>
<head>
<link
rel="stylesheet"
type="text/css"
href="https://unpkg.com/@manifoldco/ui/dist/manifold/manifold.css"
/>
</head>
<body>
<manifold-marketplace></manifold-marketplace>
<script src="https://unpkg.com/@manifoldco/ui/dist/manifold.js"></script>
</body>
import React from 'react';
import ReactDOM from 'react-dom';
import '@manifoldco/ui/dist/manifold/manifold.css';
import { defineCustomElements } from '@manifoldco/ui/dist/loader';
const App = () => <manifold-marketplace />;
ReactDOM.render(<App />, document.getElementById('root'));
defineCustomElements(window);
When using inside TypeScript, you’ll likely see this error (
manifold-connection
could be any custom element):
Property 'manifold-connection' does not exist on type 'JSX.IntrinsicElements'
To solve that, create a custom-elements.d.ts
file somewhere inside your
project (must be inside the include option in tsconfig.json
):
import { Components } from '@manifoldco/ui';
import { DetailedHTMLProps, HTMLAttributes } from 'react';
type ToReact<T> = DetailedHTMLProps<HTMLAttributes<T>, T>;
declare global {
export namespace JSX {
interface IntrinsicElements {
'manifold-marketplace': Components.ManifoldMarketplace &
ToReact<HTMLManifoldMarketplaceElement>;
'manifold-product': Components.ManifoldProduct & ToReact<HTMLManifoldProductElement>;
'manifold-plan-selector': Components.ManifoldPlanSelector &
ToReact<HTMLManifoldPlanSelectorElement>;
}
}
}
This will expose the types from Stencil to JSX, and you’ll be able to get typechecking as you write.
Note: every element will have to be declared manually, at least until this PR is merged in TypeScript core.
Initializing Manifold UI works the exact same as any other Stencil project. For more advanced instructions on integrating with your specific stack, please refer to Stencil’s docs on integration.
FAQs
Manifold UI
The npm package @manifoldco/ui receives a total of 3 weekly downloads. As such, @manifoldco/ui popularity was classified as not popular.
We found that @manifoldco/ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.