New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-styled-box

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-styled-box

Styled component with simple mapping to basic position oriented styles

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

npm version

react-styled-box

What is it ?

This is a simple styled.div component, that makes your basic positioning of elements faster. Instead of writing all of the "styled" components upfront you can prototype the layout faster with this ready <Box>.

How it works ?

import Box from 'react-styled-box';

<Box flexDirection="column">
  <Box flexDirection="row">
    <span> header </span>
    <span> header 2 </span>
  </Box>

  <Box flexGrow={1}>
    <Box margin={10} padding="10px 0 0 0">
      Item one
    </Box>
    <Box margin={10} padding="10px 0 0 0">
      Item two
    </Box>
  </Box>
</Box>

What does it support ?

Check A Complete Guide to FlexBox

propTypevalid typessample valuesdescription
displaystring'flex', 'block'flex - default value
margininteger, string10, '50%'number values are suffixed with px
paddinginteger, string10, '50%'number values are suffixed with px
widthinteger, string10, '50%'number values are suffixed with px
maxWidthinteger, string10, '50%'number values are suffixed with px
minWidthinteger, string10, '50%'number values are suffixed with px
heightinteger, string10, '50%'number values are suffixed with px
maxHeightinteger, string10, '50%'number values are suffixed with px
minHeightinteger, string10, '50%'number values are suffixed with px
flexDirectionstring'row', 'column'
flexWrapstring'nowrap', 'wrap'
flexFlowstring'column nowrap', 'row wrap'
justifyContentstring'flex-start', 'center'
alignItemsstring'base-line', 'flex-start'
alignContentstring'flex-start', 'space-around'
orderinteger1, 2
flexGrowinteger1, 2
flexShrinkinteger1, 0
flexBasisinteger, string30, 'auto', '30%'number values are suffixed with px
flexstring'0 1 auto', '1 0'
alignSelfstring'auto', 'flex-start'
overflowstringvisible, hidden
overflowXstringvisible, hidden
overflowYstringvisible, hidden

Keywords

react

FAQs

Package last updated on 18 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts