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

v0.6.24-alpha.3

Published

A layout generator for React

Downloads

22

Readme

React Layout Generator 0.6.24-alpha.3

React-layout-generator (RLG) is exploring a layout system that uses React to compute the layouts directly.

RLG is an experimental framework for building, editing, and running sites that compute the layout dynamically using generators. It does not directly rely on css for the layout. Generators are used to compute and update the layout and since the generators are just javascript they can generate whatever you can imagine and translate into code. All positioning is based on the css absolute position. RLG only needs to know the window size. From there all other positions are computed.

RLG is general purpose, supports both html and svg*, and allows precise and continuous control for responsive layouts. Major features include template support, animation support including custom engines, persistance support, built-in property-controlled editor with position and size editing, fine grain responsiveness, top down design, drag and drop, and layers support.

As an example consider the drag and drop implementation in RLG. It is high level built with RLG blocks. Its runtime behavior follows the philosophy of React. A block specifies the position of a component in a layout and it is the block that is dragged. Its location and size are known. There is little need to query or manipulate html.

RLG can do more than layout. It can be used to visually connect components that know their relationships. It can edit and animate blocks. An example of using HTML with svg connecting components is shown in the demo.

Like other components, RLG can be used through-out an app or only for one component. It's only significant dependency is React 16 itself since RLG is built on top of React.

* For SVG to be more than an icon generator or canvas in React it needs to know position and size along with relationships. RLG makes this easy. For example to use svg to generate a line connecting two react components requires access to the layout details of both components. It also needs to assume that it and the two components layout will not change. This can be done in React but small changes in layout can easily break the assumption. In RLG you just link the two components.

Examples

See Live examples. Be sure to turn on the info-circle for details.

Documentation

See docs.

Install

Use either npm or yarn to install.

yarn add react-layout-generator

or

npm install react-layout-generator

You can also clone or fork the project to evaluate. To run locally follow these steps: 1) cd to the <directory> where you installed RLG, 2) run npm install or yarn, 3) cd to the examples directory, 4) run npm install or yarn, and 4) yarn start (to build the examples).

Features

  • Top down design of pages
  • Edit and runtime support
  • Persistence
  • Template support
  • Animation support
  • HTML and SVG
  • Fine grain responsiveness
  • Layers with support for grouping, reordering, hiding, and animation
  • Drag and drop

Applications

  • Responsive page layout
  • Dashboards
  • Organization charts
  • Diagrams
  • Games
  • Animations
  • Free form layout