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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@starchart-labs/react-flightdeck

v0.1.2

Published

Common React user interface components for use across StarChart applications

Downloads

8

Readme

react-flightdeck

npm (scoped) Build Status Black Duck Security Risk

Flightdeck is the collection of common user interface components that StarChart Labs uses across its various applications. This React library has fully functional and fully styled components ready for you to use!

Installation

In your React application directory run:

npm i --save @starchart-labs/react-flightdeck

or for Yarn:

yarn add @starchart-labs/react-flightdeck

Usage

Modal

Modal is a component which creates a modal dialog box, with a customizable title, content area, and a list of buttons to display along the bottom.

Import the component from the library, and optionally import the ready-made styles if you do not want to provide your own:

import { Modal } from '@starchart-labs/react-flightdeck';
import '@starchart-labs/react-flightdeck/dist/styles/Modal.css';

The parent component (whatever is hosting the modal) must control the state of the modal. You should have a variable for whether the modal is open or closed in the parent component's state, and a method for closing the modal:

constructor() {
  super();
  this.state = {
    modalOpen: false
  }
  this.closeModal = this.closeModal.bind(this);
}

closeModal() {
  this.setState({
    modalOpen: false
  })
}

Then in the parent component's render method, define the modal!

render() {
  return(
    <div>
    <Modal title='Sample Modal'
        open={this.state.modalOpen}
        onClose={this.closeModal}
        content={
          <React.Fragment>
            The contents of this modal!
          </React.Fragment>
        }
        buttons={[
           <button key='close-button' className='button' onClick={this.closeModal}>Close</button>,
        ]}
      />
    </div>
    <button onClick={() => this.setState({modalOpen:true})}>Open the Modal</button>
  );
}

The properties of the Modal component are as follows:

  • open - A boolean that determines whether the modal is open or not
  • onClose - A function reference that will be called when the background is clicked or the X button in the title bar is clicked. For proper functionality it should set the boolean referenced in open to false, but it may do other actions as well such as clearing out form inputs
  • content - a JSX string defining what should appear in the modal content area. Can be anything.
  • buttons - An array of JSX items that will be displayed horizontally across the bottom bar of the modal. Intended for action buttons.

In the example above, the component will render a button that says "Open the Modal". When clicked, the modal will open with a title of "Sample Modal", a content area which says "The contents of this modal!", and one button on the bottom which also closes the modal (in addition to the X in the top bar, or clicking the background).