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

@alexseitsinger/react-presentation-components

v0.2.0

Published

Some presentation components to make building layouts easier

Downloads

6

Readme

Presentation Components

Some presentation components to make building layouts easier.

Installation

yarn add @alexseitsinger/react-presentation-components

Oritentations

Column

An element which shares the parent element's width, but occupies 100% of the parent's height.

Props

Name | Description | Default | Required? --- | --- | --- | --- isMaximized | Should the column use 100% height? | false | no isVerticallyCentered | Should the content be vertically centered? | false | no direction | Flexbox direction for children to use. | row | no

Row

An element which shares the parent element's height, but occupies 100% of the parent's width.

Props

Name | Description | Default | Required? --- | --- | --- | --- direction | The direction that children should use. | row | no isMaximized | Should the row fill 100% width? | true | no spacing | Space within the element. | 0px | no ends | Should the two contained elements grip the left and right sides? | false | no


Positions

All grips take the following props:

Name | Description | Default | Required? --- | --- | --- | --- children | Elements to render within | undefined | yes containerStyle | Extra css to apply to the container element | undefined | no isMaximized | Maximize the primary direction | undefined | no

GripBottom

Positions itself to the bottom edge of the parent element.

GripRight

Positions itself to the right edge of the parent element.


Alignments

Center

Elements within are both vertically and horizontally centered.

Wrapper

A container width a max-width: 1200px, and margin: 0 auto.

Props

Name | Description | Default | Required? --- | --- | --- | --- maxWidth | Alternative value for max-width | 1200px | no minHeight | Alternative value for min-height | auto | no

VerticalAlign

Uses the flexbox model to vertically align children.

VerticallyCenter

Uses the inline-block model to vertically align children.


Lists

All lists use the following props:

Name | Description | Default | Required? --- | --- | --- | --- children | The elements to render within list items | undefined | if items, no, otherwise yes spacing | The padding to apply evenly between list items | undefined | no renderEach | Invoked to render each list item with either children or items | undefined | if items, yes, else no renderFirst | Invoked to render a list item before all others | undefined | no renderLast | Invoked to render a list item after all others | undefined | no renderNone | Invoked to render a list item when no items or children produced any output. | undefined | no listStyle | Extra css to apply to the list element. | undefined | no itemStyle | Extra css to apply to each list item element | undefined | no items | An optional list of data objects to use with renderEach to render each list item | undefined | If items, yes, else no isMaximized | Should the list height fill the parent element? | false | no

FlexList

A list of items that span across a single line using all available space.

InlineList

A list of items with equal width, that will continue to occupy space on current line, then continue onto the next.

VerticalList

A list of items, separated one per line, with each using 100% width of the parent element.


Dividers

HorizontalDivider

Displays text in the center, with a pair of horizontal lines on the left and right side which run across the center of the remaining width equally.

Props

Name | Description | Default | Required? --- | --- | --- | --- text | The text to display between the two horizontal lines. | undefined | yes textColor | The color to display the text in. | undefined | no textSpacing | The spacing to apply to the left and right of the text. | undefined | no lineSize | The height of each left and right line. | 1px | no lineColor | The color of each left and right line. | black | no containerSpacing | Additional spacing to apply to the top and bottom of the container element. | undefined | no

HorizontalRule

A single horizontal line across the width of the parent element.

Props

Name | Description | Default | Required? --- | --- | --- | --- color | The color of the line. | black | no inset | Should the line be inset? | false | no size | The height of the line. | 1px | no

RightRule

Renders text followed by a horizontal line across the center of the remaining width.

Props

Name | Description | Default | Required? --- | --- | --- | --- outerStyle | Extra css to apply to the outer container. | {} | no innerStyle | Extra css to apply to the inner container. | {} | no children | Elements to render before the line. | undefined | yes ruleColor | Color of the line. | black | no ruleSize | The height of the line. | 1px no

VerticalBuffer

A DOM element, which allows for vertical spacing in multiple of the root font-size.

Props

Name | Description | Default | Required? --- | --- | --- | --- size | The height of the vertical buffer. | 1rem | no


Misc

Menu

A container with button to toggle the menu's list item visibility.

Props

Name | Description | Default | Required? onClick | Toggles the visibility of the menu's list items. | undefined | yes children | The elements to render within the menu's list. | undefined | yes

Box

An element with equal width and height.

Props

Name | Description | Default | Required? --- | --- | --- | --- size | The size(px) to use for the width and height | undefined | yes children | Elements to render | undefined | yes isCentered | Should the box be centered within its parent | undefined | no containerSyle | Extra css to apply to the container element. | undefined | no bodyStyle | Extra css to apply to the body element. | undefined | no