1.0.3 • Published 10 years ago
vdux-layout v1.0.3
layout
Flexbox layout components (ported to vdux with some modifications from reflexbox.
Installation
$ npm install vdux-layoutUsage
vdux-layout exports two components, <Flex/> and <Box/>. Flex is the container, and box is the child.
import {Flex, Box} from 'vdux-layout'
function render ({props}) {
const {items} = props
return (
<Flex justify='space-between' align='center'>
{
items.map(item =>
<Box auto>
<Tile item={item} />
</Box>
)
}
</Flex>
)
}- props
justify-start/end/center/space-around/space-between. SetsjustifyContentstyle property.align-start/end/stretch/center/baseline. SetsalignItemsstyle property.auto- Boolean. Setsflex: 1 1 autowrap- Boolean. Setsflex-wrap: wrapcolumn- Boolean. Defaults to false, which means row.gutter- Set negative left/right margins to compensate for<Box />padding....<Base/> props- All the props you can pass to base.
- props
auto- Boolean. Setsflex: 1 1 auto.flex- Boolean. Setsdisplay: flex.col- Number. Sets width/flex-basis on a 12 column grid....<Base/> props- All the props you can pass to base.
License
MIT