Flex
Flex description.
Props
Flex properties
Property | Description | Type | Default | Version |
---|---|---|---|---|
wrap | Should flex items wrap? | boolean | false | |
width | Width of the flex container | number | ||
direction | Flex direction | row column | row | |
alignItems | Set flex container align-items property | flex-start flex-end center baseline stretch | flex-start | |
alignContent | Align flex items on cross-axis | flex-start flex-end center space-between space-around , etc | stretch | |
justify | Align flex items on main-axis | flex-start flex-end center space-between space-around , space-evenly | center |
Usage
Basic Flex
Dark Mode 



camara.space
import { Flex, Image, BrowserWindow } from 'camara';render(<BrowserWindow docs><Flex><Imagewidth="25%"imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth="25%"imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth="25%"imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth="25%"imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/></Flex></BrowserWindow>);
Direction - Column
Dark Mode 


camara.space
import { Flex, Image, BrowserWindow } from 'camara';render(<BrowserWindow docs><Flex direction="column"><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/></Flex></BrowserWindow>);
Direction - Row
Dark Mode 


camara.space
import { Flex, Image, BrowserWindow } from 'camara';render(<BrowserWindow docs><Flex direction="row"><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/></Flex></BrowserWindow>);
Justify
Space Between
Dark Mode 


camara.space
import { Flex, Image, BrowserWindow } from 'camara';render(<BrowserWindow docs><Flex direction="row" justify="space-between"><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/></Flex></BrowserWindow>);
Space Around
Dark Mode 


camara.space
import { Flex, Image, BrowserWindow } from 'camara';render(<BrowserWindow docs><Flex direction="row" justify="space-around"><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/></Flex></BrowserWindow>);
Space Evenly
Dark Mode 


camara.space
import { Flex, Image, BrowserWindow } from 'camara';render(<BrowserWindow docs><Flex direction="row" justify="space-evenly"><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/></Flex></BrowserWindow>);
Center
Dark Mode 


camara.space
import { Flex, Image, BrowserWindow } from 'camara';render(<BrowserWindow docs><Flex direction="row" justify="center"><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/></Flex></BrowserWindow>);
Flex Start
Dark Mode 


camara.space
import { Flex, Image, BrowserWindow } from 'camara';render(<BrowserWindow docs><Flex direction="row" justify="flex-start"><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/></Flex></BrowserWindow>);
Flex End
Dark Mode 


camara.space
import { Flex, Image, BrowserWindow } from 'camara';render(<BrowserWindow docs><Flex direction="row" justify="flex-end"><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={100}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/></Flex></BrowserWindow>);
Wrap
Dark Mode 







camara.space
import { Flex, Image, BrowserWindow } from 'camara';render(<BrowserWindow docs><Flex wrap direction="row" justify="space-between"><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/></Flex></BrowserWindow>);
Align Content
Dark Mode 







camara.space
import { Flex, Image, BrowserWindow } from 'camara';render(<BrowserWindow docs><Flexwrapdirection="row"justify="space-between"alignContent="space-between"><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/><Imagewidth={170}imageUrl="https://source.unsplash.com/V_WBdOLOgJU/600x500"imageAlt="woman in orange knit cap and blue jacket"/></Flex></BrowserWindow>);