Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@openscreen/ui-kit

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openscreen/ui-kit

Public component library

  • 0.1.0
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

🧰 Openscreen React Component Library

This is a React component library built using Rollup, a module bundler for JavaScript. This library includes a set of reusable UI components that can be used in any React application.



🛠 Installation

To install the library, you can use npm or yarn:

npm install @openscreen/ui-kit --save

or

yarn add @openscrenn/ui-kit


🏗 Usage

To use a component in your application, import it from the library:

import { Button } from '@openscreen/ui-kit';

function App() {
  return (
    <div>
      <Button onClick={() => console.log('Clicked!')}>Click me!</Button>
    </div>
  );
}

🚧 Gotchas

In order to use the QrCodeDesigner component in NextJS, it needs to be imported dynamically. This is because the component uses a library called qr-styling-library which relies on browser APIs. NextJS uses a Node runtime which does not have access to those browser APIs so it will error out. Dynamically importing the component should fix this error and looks like this:

import dynamic from 'next/dynamic'

const QrCodeDesigner = dynamic(() =>
  import('@openscreen/ui-kit')
    .then((lib) => lib.QrCodeDesigner),
      {ssr: false}
    )


🧱 Development

Development will continue to be done in the Openscreen private component library.

To export components using this library, add the component to src/index.ts from the libs/components folder in the monorepor.



📦 Building

To build the library, you can run the following command:

rushx build

This will create a dist folder with the compiled library.



🪪 License

This library is licensed under the Apache-2.0 license

FAQs

Package last updated on 24 Feb 2023

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