0.2.9 • Published 8 months ago

react-layout-box v0.2.9

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Installation

npm install react-layout-box

React Container Component

A highly customizable and responsive Container component designed to handle the minimum and maximum width of its child elements. Particularly useful for readability and maintaining layout constraints.

Installation

Usage

import Container from 'react-layout-box';

<Container minWidth="200px" maxWidth="800px">
  <p>Your content here</p>
</Container>

API

Props

PropTypeDescription
minWidthnumber | stringMinimum width of the container
maxWidthnumber | stringMaximum width of the container
childrenReactNodeThe content inside the container

React Flex Component

A flexible and easy-to-use Flex component for building modern layouts with flexbox.

Usage

Here is a simple usage example:

import Flex from 'react-layout-box';

<Flex direction="row" justify="center" align="center">
  <div>Item 1</div>
  <div>Item 2</div>
</Flex>

API

Props

PropTypeDescription
direction'row' | 'row-reverse' | 'column' | 'column-reverse' | 'inherit' | 'initial' | 'unset'Flex direction
justify'start' | 'center' | 'space-between' | 'space-around' | 'space-evenly'Justify content
align'stretch' | 'center' | 'start' | 'end'Align items
gapnumber | stringGap between items
childrenReactNodeThe content inside the flex container

React Grid Component

An intuitive Grid component that simplifies the creation of grid layouts in React.

Usage

Here is a simple usage example:

import Grid from 'react-layout-box';

<Grid rows={3} columns={3}>
  <div>Item 1</div>
  <div>Item 2</div>
  <div>Item 3</div>
</Grid>

API

Props

PropTypeDescription
rowsnumber | stringNumber of rows
columnsnumber | stringNumber of columns
gapnumber | stringGap between items
childrenReactNodeThe content inside the grid container
0.2.9

8 months ago

0.2.8

8 months ago

0.2.6

8 months ago

0.2.5

8 months ago

0.2.4

8 months ago

0.2.3

8 months ago

0.2.2

8 months ago

0.2.1

8 months ago

0.2.0

8 months ago

0.1.9

8 months ago

0.1.8

8 months ago

0.1.7

8 months ago

0.1.6

8 months ago

0.1.5

8 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago

0.0.1

8 months ago