1.3.0 • Published 7 years ago

react-plan v1.3.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

#REACT PLAN npm version

##MOTIVATION The main goal of this library is to provide a declarative (JSX) way to build a responsive webapp leveraging the flex model.

##DEMOS //TODO

##INSTALL

npm i --save react-plan

##USAGE

###Containers (Rows & columns) The container classes, Rows and Colums create flex containers DOM elements. They share the same props, the only difference betwwen the two is that they have the flex-direction attribute set to row or column by default.

Available props:

PropTypeDescriptionValues
alignStringSets the align-items alignement on the flex axisflex-start, flex-end, center, baseline, stretch (default)
classNameStringA Classname being passed to the flex container. If responsive breakpoints are set, the current breakpoint value is appended to the className.Any
itemDefaultsObjectAllows to pass default props to all the child Items.An object of Item props.
justifyStringSets the justify-content flex propertyflex-start, flex-end, center, space-between, space-around
noWrapBoolSets the flex-wrap property to nowrapBy default, in order to support responsive layouts all the containers are set to wrap, if you wish to override this behavior set this prop to true.
reverseBoolReverses the container's flex-direction
sizeNumber or StringSets the flex propertyIf a number is provided (1), the flex shorthand property is set: flex: 1, if a width is provided ('20%'), the flex shortahnd property is set as follows flex: 1 10%
smallNumber or StringSets and override the size property when the small breakpoint is active.When set to 'hide', it prevents rendering the children when the small breakpoint is active.
mediumNumber or StringSets and override the size property when the medium breakpoint is active.When set to 'hide', it prevents rendering the children when the medium breakpoint is active.
largeNumber or StringSets and override the size property when the large breakpoint is active.When set to 'hide', it prevents rendering the children when the large breakpoint is active.
wideNumber or StringSets and override the size property when the wide breakpoint is active.When set to 'hide', it prevents rendering the children when the wide breakpoint is active.

###Items

The Item class creates flex item DOM elements.

Available props:

PropTypeDescriptionValues
alignStringSets the align-self alignement on the flex axisflex-start, flex-end, center, baseline, stretch (default)
classNameStringA Classname being passed to the flex container. If responsive breakpoints are set, the current breakpoint value is appended to the className.Any
orderNumberSets the order flex property1, 2, 3, ...
sizeNumber or StringSets the flex propertyIf a number is provided (1), the flex shorthand property is set: flex: 1, if a width is provided ('20%'), the flex shortahnd property is set as follows flex: 1 10%
smallNumber or StringSets and override the size property when the small breakpoint is active.When set to 'hide', it prevents rendering the children when the small breakpoint is active.
mediumNumber or StringSets and override the size property when the medium breakpoint is active.When set to 'hide', it prevents rendering the children when the medium breakpoint is active.
largeNumber or StringSets and override the size property when the large breakpoint is active.When set to 'hide', it prevents rendering the children when the large breakpoint is active.
wideNumber or StringSets and override the size property when the wide breakpoint is active.When set to 'hide', it prevents rendering the children when the wide breakpoint is active.

##CONTRIBUTE //TODO

1.3.0

7 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.4.2

8 years ago

0.4.0

8 years ago

0.3.7

8 years ago

0.3.6-RC1

8 years ago

0.3.5

8 years ago

0.3.4

8 years ago

0.3.3

8 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago