New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@manifoldco/ui

Package Overview
Dependencies
Maintainers
20
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@manifoldco/ui

Manifold UI

  • 0.1.0-alpha.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
20
Created
Source

Built With Stencil version (scoped) codecov

🍱 Manifold UI

Manifold’s web component UI library, powered by Stencil.

Installation

npm i @manifoldco/ui

Usage

FrameworkSupported?
Vanilla JS (no framework)
Angular
React
Vue
Ember

HTML (ES Modules)

<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>

HTML (No ESM Support)

<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>

React

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);

TypeScript + JSX setup

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, JSX as StencilJSX } from '@manifoldco/ui';
import { HTMLAttributes, ReactNode } from 'react';

interface ReactInterface {
  children?: ReactNode;
}

declare global {
  export namespace JSX {
    interface IntrinsicElements {
      'manifold-button-link': HTMLManifoldButtonLinkElement & ReactInterface;
    }
  }
}

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.*🎉

Ember, Angular, Vue, and others

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

Package last updated on 13 Jun 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc