npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-vnc-display

v2.0.1

Published

React component to connect and display a remote VNC connection

Downloads

4,754

Readme

react-vnc-display

React component to connect and display a remote VNC connection

preview

Features from noVNC

  • Supports all modern browsers including mobile (iOS, Android)
  • Supported VNC encodings: raw, copyrect, rre, hextile, tight, tightPNG
  • WebSocket SSL/TLS encryption (i.e. "wss://") support
  • 24-bit true color and 8 bit colour mapped
  • Supports desktop resize notification/pseudo-encoding
  • Local or remote cursor
  • Clipboard copy/paste
  • Clipping or scolling modes for large remote screens
  • Easy site integration and theming (3 example themes included)
  • Licensed under the MPL 2.0

Getting started

You can install react-vnc-display via Yarn or npm:

# If using Yarn:
yarn add react-vnc-display

# If using npm:
npm install --save react-vnc-display

The component from react-vnc-display is VncDisplay. This module can be required via ES imports, CommonJS require, or UMD.

import { VncDisplay } from 'react-vnc-display';

// using require
const { VncDisplay } = require('react-vnc-display');

Usage

After importing the component, it can be rendered with the required url prop:

import React from 'react';
import { render } from 'react-dom';
import { VncDisplay } from 'react-vnc-display';

render((
  <VncDisplay url="wss://some-remote-display:5991/path" />
), document.getElementById('root'));

By default the VncDisplay will start out with dimensions of 1280x720, but will be resized to the dimensions of the display once the connection has been established. You can pass noVNC callbacks as props to VncDisplay to customize this and additional behavior.

Props

VncDisplay accepts a single required property of URL:

| Property | Type | Required? | Description | |:---|:---|:---:|:---| | url | String | ✓ | The URL for which to create a remote VNC connection. Should include the protocol, host, port, and path. |

In addition, most of the properties available to noVNC can be provided and will be passed through to the noVNC instance. Here are a few useful props:

| Property | Type | Required? | Description | |:---|:---|:---:|:---| | onClipboard | func | | Execute a function when the VNC connection's clipboard updates. | | onUpdateState | func | | Execute a function when the state of the VNC connection changes. | | shared | bool | | Specify whether a VNC connection should disconnect other connections before connecting. | | wsProtocols | arrayOf(string) | | Specify a list of WebSocket protocols this connection should support. |

Development and Contributing

This repository uses Neutrino and neutrino-preset-react-components for developing, previewing, and building React components. To get started:

  • Fork and clone this repo.
  • Install the dependencies with yarn.
  • Start the development servers with yarn start. Open a browser to http://localhost:5000 to preview the React components.
  • Use CTRL-C to exit the dev server.
  • Use yarn build to generate the compiled component for publishing to npm.

Feel free to open an issue, submit a pull request, or contribute however you would like. Understand that this documentation is still a work in progress, so file an issue or submit a PR to ask questions or make improvements. Thanks!