Socket
Book a DemoInstallSign in
Socket

@4react/flex

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@4react/flex

Flexbox components for React Applications.

2020.1.0
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

@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>
PropTypeDefaultDescription
inlinebooleanfalseTransform 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).
rowbooleanfalseSet the container main-axis to "horizontal".
columnbooleanfalseSet the container main-axis to "vertical".
reversebooleanfalseReverse 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.
wrapboolean, 'reverse'falseControls if (and how) items will flow across multiple lines.
classNamestring-Additional className for the component.
styleobject-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} />

FAQs

Package last updated on 19 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.