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

@4react/flex

v2020.1.0

Published

Flexbox components for React Applications.

Downloads

7

Readme

@4react / flex

Flexbox components for React Applications.

alt text

  <Flex row justify="space-between" align="center">
    <Flex alignSelf="start" ... />
    <Flex shrink grow ... />
    <Flex
      column
      alignSelf="stretch"
      grow={2}
      justify="space-between"
      align="center"
    >
      <Flex alignSelf="stretch" ... />
      <Flex ... />
      <Flex alignSelf="end" grow ... />
    </Flex>
  </Flex>

Install

npm i @4react/flex

Flex

Generic div element with display: flex

<Flex row justify="space-between" align="center">
  ...
</Flex>

| Prop | Type | Default | Description | | --- | --- | --- | --- | | inline | boolean | false | Transform in a inline-flex element. | | direction | 'row', 'column' | 'row' | Define the main-axis of the container i.e. where the flex items are placed. Corresponding of the flex-direction property (along with the reverse prop). | | row | boolean | false | Set the container main-axis to "horizontal". | | column | boolean | false | Set the container main-axis to "vertical". | | reverse | boolean | false | Reverse the container direction. | | justify | 'start', 'end', 'center', 'space-between', 'space-around', 'space-evenly' | 'start' | Alignment of flex items along the main axis. Corresponding of the justify-content property. | | align | 'stretch', 'start', 'end', 'center', 'baseline' | 'stretch' | Alignment of flex items along the cross axis on the current line. Corresponding of the align-items property. | | lines | 'stretch', 'start', 'end', 'space-between', 'space-around', 'space-evenly' | 'stretch' | Alignment of lines (when there is extra space in the cross-axis). Corresponding of the align-content property. | | wrap | boolean, 'reverse' | false | Controls if (and how) items will flow across multiple lines. | | className | string | - | Additional className for the component. | | style | object | - | Additional style object for the component. |

Display

Description

// display: flex
<Flex>

// display: inline-flex
<Flex inline>

Direction

Description.

// row
<Flex>
<Flex row
<Flex direction="row">

// row-reverse
<Flex row reverse>
<Flex direction="row" reverse>

// column
<Flex column
<Flex direction="column">

// column-reverse
<Flex column reverse>
<Flex direction="column" reverse>

Justification

Description.

// justify-content
<Flex justify="start">
<Flex justify="center">
<Flex justify="space-between">

// align-items
<Flex align="start">
<Flex align="stretch">
<Flex align="center">

// align-content
<Flex lines="start">
<Flex lines="center">
<Flex lines="space-between">

Wrap

Description.

// nowrap
<Flex>

// wrap
<Flex wrap>

// wrap-reverse
<Flex wrap="reverse">

Flexed

<Flexed grow order={2} />