This package has been deprecated

Author message:

WARNING: This project has been renamed to @alexanderjeurissen/flex. Install using @alexanderjeurissen/flex instead.

react-flex-primitive
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

image

Be infinitely flexible and constantly amazed. - Jason Kravitz

A declarative React primitive Flex component that exposes the flexbox specification in JSX

Based on Styled System and Styled Components. Written in typescript to provide strict prop validation on css spec adherence.

Usage

Import as follows:

import Flex from 'react-flex-primitive';

Then use the Flex component to define the desired flexbox layout:

e.g. for a Flex container that has vertically aligned flex-items, where the first flex item grows:

<Flex alignItems='center'>
 <Flex flexGrow={1}>
   This flex item grows!
 </Flex>
 <Flex>
  This flex item does not grow :(
 </Flex>
</Flex>

Additional resources

Package Sidebar

Install

npm i react-flex-primitive

Weekly Downloads

0

Version

1.0.8

License

GNU General Public License v3.0

Unpacked Size

40.8 kB

Total Files

5

Last publish

Collaborators

  • alexanderjeurissen