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

@zeejs/react

v0.3.1

Published

React layering

Readme

zeejs

zeejs React - simple API to create multi layered UI

test status npm version npm bundle size

what's in the box

  • layers - automatic ordering of nested layers
  • backdrop - hide / block background or keep a layer as part of the flow
  • focus
    • Tab between layers
    • trap focus above backdrop
    • re-focus when blocking layer close
    • focusChange notification when focus outside / inside logical layer
  • click outside - notification for click outside of logical layer
  • mouse interaction - notification for mouse enter / leave of logical layer
  • escape catching - notification for escape press
  • server rendering - single pass nested rendering of layers in the server
  • component primitives - Tooltip, Popover, Modal
  • typed - built with TypeScript
  • tested - tested in a browser

how to use

This document describes the zeejs React usage, For a more in depth overview of zeejs, please see the general documentation.

<Root> component

At the base of the application or website place the <Root> component. The Root component is responsible for collecting, rendering and managing the layers.

Notice that Root is required for zeejs to work properly.

props:

| name | type | default | required | description | | ----------- | ------------------- | ------- | -------- | -------------------------------------------------------------------- | | className | string | "" | false | CSS class name to be placed on the wrapper element around all layers | | style | React.CSSProperties | {} | false | CSS styles to be placed on the wrapper element around all layers |

code example:

import { Root } from '@zeejs/react';

ReactDOM.render(
    <Root className="app-root" style={{ height: `100%` }}>
        {/* application code */}
    </Root>
);

will output:

<div class="app-root" style="height: 100%">
    <zeejs-layer>
        <!-- application code -->
    </zeejs-layer>
</div>

<Layer> component

At every point that requires a part of the DOM to be moved up the normal layout flow and out of any overflows, a <Layer> component can be placed. The Layer is the low level primitive of zeejs that takes any given content and renders it in its own layer.

The component will generate a new zeejs layer above layer it is rendered in.

props:

| name | type | default | required | description | | --------------------- | ----------------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | backdrop | "none" | "block" | "hide" | "none" | false | background behavior; see docs | | overlap | "window" | HTMLElement | "window" | false | layer bounds reference | | onClickOutside | (target: EventTarget) => void | | false | invoked on click outside; see docs | | onMouseIntersection | (isInside: boolean) => void | | false | invoked when mouse leaves or enters layer; see docs | | onFocusChange | (isFocused: boolean) => void | | false | invoked when focus is moved into/out of layer; see docs | | onEscape | (event: KeyboardEvent) => void | | false | invoked when escape is pressed; see docs |

code example:

import { Layer } from '@zeejs/react';

const Component = () => {
    return (
        <div>
            <Layer>{/* layer content */}</Layer>
        </div>
    );
};

will output (assuming render in the application layer):

<div>
    <zeejs-layer>
        <!-- application code containing layer component -->
    </zeejs-layer>
    <zeejs-layer style="/* bound to window or reference element */">
        <!-- layer content -->
    </zeejs-layer>
</div>

nesting code example:

import { Layer } from '@zeejs/react';

const Component = () => {
    return (
        <div>
            <Layer>
                <div>
                    {/* layer A content*/}
                    <Layer>{/* layer B content */}</Layer>
                </div>
            </Layer>
        </div>
    );
};

will output (assuming render in the application layer):

<div>
    <zeejs-layer>
        <!-- application code containing layer component -->
    </zeejs-layer>
    <zeejs-layer>
        <!-- layer A content -->
    </zeejs-layer>
    <zeejs-layer>
        <!-- layer B content -->
    </zeejs-layer>
</div>

<Modal> component

The modal primitive display content that is not affected by the scroll of lower layers.

props:

| name | type | default | required | description | | --------------------- | -------------------------------------------------------------------------------------------------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | backdrop | "none" | "block" | "hide" | "block" | false | background behavior; see docs | | position | "topLeft" | "top" | "topRight" | "left" | "center" | "right" | "bottomLeft" | "bottom" | "bottomRight" | "center" | false | fixed align position | | show | boolean | true | false | flag if the layer should be displayed | | onClickOutside | (target: EventTarget) => void | | false | invoked on click outside; see docs | | onMouseIntersection | (isInside: boolean) => void | | false | invoked when mouse leaves or enters layer; see docs | | onFocusChange | (isFocused: boolean) => void | | false | invoked when focus is moved into/out of layer; see docs | | onEscape | (event: KeyboardEvent) => void | | false | invoked when escape is pressed; see docs | | className | string | "" | false | CSS class name to add to the modal box | | style | React.CSSProperties | {} | false | CSS inline style to add to the modal box |

<Tooltip> component

The tooltip primitive displays hovered content that is bound to the UI that opened it, usually used to label or describe it.

props:

| name | type | default | required | description | | ------------ | --------------------------------------------------- | -------- | ------------------------ | ---------------- | | mouseDelay | number | 500 | delay for mouse out / in | | | positionX | "before" | "start" | "center" | "end" | "after" | "center" | false | align X position | | positionY | "before" | "start" | "center" | "end" | "after" | "before" | false | align X position |

<Popover> component

The modal primitive display content that is not affected by the scroll of lower layers while being bound to the UI the opened it.

props:

| name | type | default | required | description | | --------------------- | --------------------------------------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | backdrop | "none" | "block" | "hide" | "block" | false | background behavior; see docs | | positionX | "before" | "start" | "center" | "end" | "after" | "center" | false | align X position | | positionY | "before" | "start" | "center" | "end" | "after" | "after" | false | align Y position | | avoidAnchor | boolean | false | false | attempt to not overlap the anchor that opened it while pushed in by overflow | | matchWidth | boolean | false | false | force the popover box to be in the width of the anchor | | matchHeight | boolean | false | false | force the popover box to be in the height of the anchor | | show | boolean | true | false | flag if the layer should be displayed | | onClickOutside | ((target: EventTarget) => void | | false | invoked on click outside; see docs | | ignoreAnchorClick | boolean | false | false | when true click on anchor does not invoke onClickOutside handler | | onMouseIntersection | (isInside: boolean) => void | | false | invoked when mouse leaves or enters layer; see docs | | onFocusChange | (isFocused: boolean) => void | | false | invoked when focus is moved into/out of layer; see docs | | onEscape | (event: KeyboardEvent) => void | | false | invoked when escape is pressed; see docs | | onDisplayChange | (isPositioned: boolean) => void | | false | invoked when the popover is displayed (after positioning) or removed from DOM | | className | string | "" | false | CSS class name to add to the popover box | | style | React.CSSProperties | {} | false | CSS inline style to add to the popover box |