spritejs / Sprite Flex Layout
Licence: mit
grid-layout is a layout engine which implements flex, can use in canvas/node-canvas
Stars: ✭ 15
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Sprite Flex Layout
Core Layout
Flexbox & CSS-style Layout in Swift.
Stars: ✭ 215 (+1333.33%)
Mutual labels: flex, flexbox
React Flexa
Responsive React Flexbox (CSS Flexible Box Layout Module) grid system based heavily on the standard CSS API.
Stars: ✭ 120 (+700%)
Mutual labels: flex, flexbox
Infinity Css Grid
Fluid Flex Solution for making infinite grid columns.
Stars: ✭ 112 (+646.67%)
Mutual labels: flex, flexbox
React Three Flex
💪📦 Flexbox for react-three-fiber
Stars: ✭ 764 (+4993.33%)
Mutual labels: flex, flexbox
Flex.css
flex.css is declarative layout which is compatible with wechat, UC, webview and other main-stream mobile browser and surpports react, vue, angular.
Stars: ✭ 1,537 (+10146.67%)
Mutual labels: flex, flexbox
Flexulator
A visual flexbox space distribution calculator
Stars: ✭ 171 (+1040%)
Mutual labels: flex, flexbox
react-styled-flexbox
A Flexbox React component harnessing the power of styled-components
Stars: ✭ 30 (+100%)
Mutual labels: flex, flexbox
Flexible Grid
Flexible grid layouts to get you familiar with building within the flexible grid system.(HTML, CSS, SASS, SCSS)
Stars: ✭ 154 (+926.67%)
Mutual labels: flex, flexbox
flexboxes
CSS flexbox framework with pure flexbox grid ability
Stars: ✭ 27 (+80%)
Mutual labels: flex, flexbox
React Flexview
A powerful React component to abstract over flexbox and create any layout on any browser
Stars: ✭ 276 (+1740%)
Mutual labels: flex, flexbox
Flex Layout Attribute
HTML layout helper based on CSS flexbox specification —
Stars: ✭ 705 (+4600%)
Mutual labels: flexbox
React Cnode
基于webpack + react + react-router + redux + less + flex.css + ES6 的React版cnode社区
Stars: ✭ 688 (+4486.67%)
Mutual labels: flex
sprite-flex-layout
FlexLayout for SpriteJS
Install
npm install sprite-flex-layout
How to use
import {Node} from 'sprite-flex-layout';
const container = Node.create({
width: 500,
height: 500,
flexDirection: 'row'
});
const node1 = Node.create({
width: 100,
height: 100
})
const node2 = Node.create({
width: 100,
height: 100
});
container.appendChild(node1);
container.appendChild(node2);
container.calculateLayout();
const layout = container.getAllComputedLayout();
console.log(layout);
support properties
flex container
-
flexDirection
, supportrow
|row-reverse
|column
|column-reverse
, default isrow
-
flexWrap
, supportnowrap
|wrap
|wrap-reverse
, default isnowrap
-
flexFlow
,<‘flex-direction’> || <‘flex-wrap’>
-
alignItems
, supportstretch
|flex-start
|flex-end
|center
, default isstretch
, not supportbaseline
-
alignContent
, supportstretch
|flex-start
|flex-end
|center
|space-between
|space-around
|space-evenly
, default isstretch
-
justifyContent
, supportflex-start
|flex-end
|center
|space-between
|space-around
|space-evenly
, default isflex-start
-
height
, container height,<length>
-
width
, container width,<length>
flex items
-
flex
,[ <‘flex-grow’> <‘flex-shrink’>? || <‘flex-basis’> ]
-
alignSelf
, supportauto
|stretch
|flex-start
|flex-end
|center
, default isauto
. not supportbaseline
-
flexShrink
,<Number>
-
flexBasis
,<Number>
-
flexGrow
,<Number>
-
maxHeight
, support<length>
|<percentage>
-
maxWidth
, support<length>
|<percentage>
-
minHeight
, support<length>
|<percentage>
-
minWidth
, support<length>
|<percentage>
-
border
, support[borderTop, borderRight, borderBottom, borderLeft]
-
borderTop
, support<length>
-
borderRight
, support<length>
-
borderBottom
, support<length>
-
borderLeft
, support<length>
-
height
, support<length>
|<percentage>
-
width
, support<length>
|<percentage>
-
margin
, support[marginTop, marginRight, marginBottom, marginLeft]
-
marginTop
, support<length>
|<percentage>
-
marginRight
, support<length>
|<percentage>
-
marginBottom
, support<length>
|<percentage>
-
marginLeft
, support<length>
|<percentage>
-
padding
, support[paddingTop, paddingRight, paddingBottom, paddingLeft]
-
paddingTop
, support<length>
|<percentage>
-
paddingRight
, support<length>
|<percentage>
-
paddingBottom
, support<length>
|<percentage>
-
paddingLeft
, support<length>
|<percentage>
-
boxSizing
, supportcontent-box
|border-box
, default iscontent-box
-
offsetWidth
, set offset width of flex item -
offsetHeight
, set offset height of flex item -
order
, set flex items order
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].