You are currently viewing outdated (<=3.x) Chameleon documentation on our old website. For version >=4.x, check out our new website.

Current release: 3.5.0 | hub

Look at me, being all boxed in
import { Box } from '@mediahuis/chameleon-react'

Props

NameTypeDefaultRequiredDescription
alignContent'center''flex-end''flex-start''space-around''space-between''space-evenly''stretch'--Is similar to align-items, but instead of aligning flex items, it aligns flex lines.
alignItems'flex-start''center''flex-end''stretch''baseline'--Specifies the default alignment for items inside the flexible container.
alignSelf'auto''flex-start''flex-end''center''baseline''stretch'--Allows the default alignment to be overridden for individual flex items.
bgColorString--Sets the background-color style, must be one of the system. It will also set the associative text-color.
borderBottomColorString--Sets the border-bottom-color style, must be one of the system.
borderBottomStyle'none''hidden''dotted''dashed''solid''double''groove''ridge''inset''outset''initial''inherit'--Sets the border-bottom-style value.
borderBottomWidth01234--Sets the border-bottom-width style.
borderColorString--Sets the border-color style, must be one of the system.
borderLeftColorString--Sets the border-left-color style, must be one of the system.
borderLeftStyle'none''hidden''dotted''dashed''solid''double''groove''ridge''inset''outset''initial''inherit'--Sets the border-left-style value.
borderLeftWidth01234--Sets the border-bottom-width style.
borderRadius01234567891011'fill''sides'--Sets the css border-radius property, maps on spacing values + fill, + sides.
borderRightColorString--Sets the border-right-color style, must be one of the system.
borderRightStyle'none''hidden''dotted''dashed''solid''double''groove''ridge''inset''outset''initial''inherit'--Sets the border-right-style value.
borderRightWidth01234--Sets the border-right-width style.
borderStyle'none''hidden''dotted''dashed''solid''double''groove''ridge''inset''outset''initial''inherit'--Sets the border-style value.
borderTopColorString--Sets the border-top-color style, must be one of the system.
borderTopStyle'none''hidden''dotted''dashed''solid''double''groove''ridge''inset''outset''initial''inherit'--Sets the border-top-style value.
borderTopWidth01234--Sets the border-top-width style.
borderWidth01234--Sets the border-width style.
bottom01234567891011--Sets the css bottom property, maps on spacing values.
childrenNode--Contents displayed within the Box.
classNameString--Extend classNames.
cloneBoolean--The Box component has a clone property to enable the usage of the clone element method of React (React.cloneElement()). NOTE: The CSS specificity relies on the import order. If you want the guarantee that the wrapped component's style will be overridden, you need to import the Box last.
colorString--Sets the color style, must be one of the system.
display'inline''block''flex''grid''inline-block''inline-flex''inline-grid''inline-table''list-item''run-in''table''table-caption''table-column-group''table-header-group''table-footer-group''table-row-group''table-cell''table-column''table-row''none''initial''inherit'--Changes the box's display property.
flexStringNumber--shorthand for flex-grow, flex-shrink and flex-basis combined. (none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ])
flexBasisStringNumber--Defines the default size of an element before the remaining space is distributed. (default auto)
flexDirection'row''row-reverse''column''column-reverse'--Sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed)..
flexGrowStringNumber--Defines the ability for a flex item to grow if necessary. (default 0)
flexShrinkStringNumber--Defines the ability for a flex item to shrink if necessary.(default 1)
flexWrap'nowrap''wrap''wrap-reverse'--Specifies whether the flexible items should wrap or not.
float'left''right''none'--The float CSS property places an element on the left or right side of its container, allowing text and inline elements to wrap around it. The element is removed from the normal flow of the page, though still remaining a part of the flow (in contrast to absolute positioning).
fontStyle'inherit''normal''italic''oblique'--Sets the css font-style property.
fontWeight'inherit''regular''medium''bold'--Sets the css font-weight property.
heightString01234567891011'auto''full'--Controls Box's height property.
justifyContent'flex-start''center''flex-end''space-between''space-around''space-evenly'--Aligns the flexible container's items when the items do not use all available space on the main-axis (horizontally).
left01234567891011--Sets the css left property, maps on spacing values.
m-11-10-9-8-7-6-5-4-3-2-101234567891011'auto'--Changes the box's margin.
maxHeightString01234567891011'auto''full'--Controls Box's maxHeight property.
maxWidthString01234567891011'auto''full'--Controls Box's maxWidth property.
mb-11-10-9-8-7-6-5-4-3-2-101234567891011'auto'--Changes the box's margin-bottom.
ml-11-10-9-8-7-6-5-4-3-2-101234567891011'auto'--Changes the box's margin-left.
mr-11-10-9-8-7-6-5-4-3-2-101234567891011'auto'--Changes the box's margin-right.
mt-11-10-9-8-7-6-5-4-3-2-101234567891011'auto'--Changes the box's margin-top.
mx-11-10-9-8-7-6-5-4-3-2-101234567891011'auto'--Changes the box's margin-left and margin-right.
my-11-10-9-8-7-6-5-4-3-2-101234567891011'auto'--Changes the box's margin-top and margin-bottom.
orderNumberString--Controls the order in which flex items appear in the flex container.
p01234567891011--Changes the box's padding.
pb01234567891011--Changes the box's padding-bottom.
pl01234567891011--Changes the box's padding-left.
position'absolute''fixed''relative''sticky'--Changes the box's position.
pr01234567891011--Changes the box's padding-right.
pt01234567891011--Changes the box's padding-top.
px01234567891011--Changes the box's padding-left and padding-right.
py01234567891011--Changes the box's padding-top and padding-bottom.
right01234567891011--Sets the css right property, maps on spacing values.
styleObject--Style attribute
textAlign'inherit''left''right''center''justify'--Sets the css text-align property.
textTransform'inherit''none''capitalize''uppercase''lowercase'--Sets the css text-transform property.
top01234567891011--Sets the css top property, maps on spacing values.
widthString01234567891011'auto''full'--Controls Box's width property.
zIndex0100200300400500600700800900--Controls Box's zIndex property.

alignSelf

default: undefined

Flex-end
normal

bgColor

default: undefined

Sets the backgroundColor of the Boxe. It's important to know it will also try to set the corresponding text color!

My text will get the coresponding color
My text will get the coresponding color (white)
My text will get the coresponding color (black)

border

default: undefined

border
borderTop
borderRight
borderBottom
borderLeft

borderRadius

default: undefined

A bit rounded
Oooooooooval
Round and round

bottom

default: undefined

Bottom: space 5

clone

The Box component has a clone property to enable the usage of the clone element method of React (<React.cloneElement()>). NOTE: The CSS specificity relies on the import order. If you want the guarantee that the wrapped component's style will be overridden, you need to import the Box last.

Paper with box props.

color

default: undefined

My color is better than yours.
My color is better than yours.
My color is better than yours.
My color is better than yours.

flex

default: undefined

flexBasis

default: undefined

flexGrow

flexShrink

float

default: undefined

float left

float right

float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none float none.

fontWeight

default: undefined

Controls the font-weight css attribute. Only 3 values are available. If a value is missing, it will fallback on the more bold weight.

Lorem ipsum dolor amet gastropub meditation tumblr hashtag. Meggings cornhole prism +1 sriracha authentic la croix street art af typewriter poke. Tumblr YOLO freegan thundercats fixie, craft beer shoreditch humblebrag. Ramps kinfolk roof party waistcoat ennui prism. Authentic edison bulb iceland letterpress yr.

Lorem ipsum dolor amet gastropub meditation tumblr hashtag. Meggings cornhole prism +1 sriracha authentic la croix street art af typewriter poke. Tumblr YOLO freegan thundercats fixie, craft beer shoreditch humblebrag. Ramps kinfolk roof party waistcoat ennui prism. Authentic edison bulb iceland letterpress yr.

Single-origin coffee hoodie edison bulb man braid la croix ethical fashion axe street art yr hammock. Asymmetrical roof party truffaut, forage fashion axe tacos gentrify narwhal raclette fingerstache. Hexagon austin affogato kale chips, jean shorts etsy sriracha banh mi forage waistcoat scenester next level small batch try-hard letterpress. Blue bottle taiyaki roof party helvetica selfies gochujang.

Single-origin coffee hoodie edison bulb man braid la croix ethical fashion axe street art yr hammock. Asymmetrical roof party truffaut, forage fashion axe tacos gentrify narwhal raclette fingerstache. Hexagon austin affogato kale chips, jean shorts etsy sriracha banh mi forage waistcoat scenester next level small batch try-hard letterpress. Blue bottle taiyaki roof party helvetica selfies gochujang.

Blog migas tbh man braid pitchfork vaporware, chicharrones selvage seitan subway tile jean shorts humblebrag post-ironic. Tattooed live-edge readymade, vice cold-pressed swag tousled lomo air plant. Edison bulb bitters actually banjo pok pok hammock single-origin coffee stumptown knausgaard direct trade pinterest yr locavore jean shorts.

Blog migas tbh man braid pitchfork vaporware, chicharrones selvage seitan subway tile jean shorts humblebrag post-ironic. Tattooed live-edge readymade, vice cold-pressed swag tousled lomo air plant. Edison bulb bitters actually banjo pok pok hammock single-origin coffee stumptown knausgaard direct trade pinterest yr locavore jean shorts.

height

default: undefined

3
5
full
50%

left

default: undefined

Left: space 5

m

default: undefined

Margin around

mb

default: undefined

Margin bottom

ml

default: undefined

Margin left

mr

default: undefined

Margin right

mt

default: undefined

Margin top

mx

default: undefined

Margin left and right

my

default: undefined

Margin top and bottom

order

default: undefined

1 order 1
2 order 2
3 order 0

p

default: undefined

Padding around

pb

default: undefined

Padding bottom

pl

default: undefined

Padding left

position

default: undefined

relative
absolute
fixed (commented)

pr

default: undefined

Padding right

pt

default: undefined

Padding top

px

default: undefined

Padding left and right

py

default: undefined

Padding top and bottom

right

default: undefined

Right: space 5

textAlign

default: undefined

Controls the css text-align attribute.

Lorem ipsum dolor amet gastropub meditation tumblr hashtag. Meggings cornhole prism +1 sriracha authentic la croix street art af typewriter poke. Tumblr YOLO freegan thundercats fixie, craft beer shoreditch humblebrag. Ramps kinfolk roof party waistcoat ennui prism. Authentic edison bulb iceland letterpress yr.

Lorem ipsum dolor amet gastropub meditation tumblr hashtag. Meggings cornhole prism +1 sriracha authentic la croix street art af typewriter poke. Tumblr YOLO freegan thundercats fixie, craft beer shoreditch humblebrag. Ramps kinfolk roof party waistcoat ennui prism. Authentic edison bulb iceland letterpress yr.

Single-origin coffee hoodie edison bulb man braid la croix ethical fashion axe street art yr hammock. Asymmetrical roof party truffaut, forage fashion axe tacos gentrify narwhal raclette fingerstache. Hexagon austin affogato kale chips, jean shorts etsy sriracha banh mi forage waistcoat scenester next level small batch try-hard letterpress. Blue bottle taiyaki roof party helvetica selfies gochujang.

Single-origin coffee hoodie edison bulb man braid la croix ethical fashion axe street art yr hammock. Asymmetrical roof party truffaut, forage fashion axe tacos gentrify narwhal raclette fingerstache. Hexagon austin affogato kale chips, jean shorts etsy sriracha banh mi forage waistcoat scenester next level small batch try-hard letterpress. Blue bottle taiyaki roof party helvetica selfies gochujang.

Blog migas tbh man braid pitchfork vaporware, chicharrones selvage seitan subway tile jean shorts humblebrag post-ironic. Tattooed live-edge readymade, vice cold-pressed swag tousled lomo air plant. Edison bulb bitters actually banjo pok pok hammock single-origin coffee stumptown knausgaard direct trade pinterest yr locavore jean shorts.

Blog migas tbh man braid pitchfork vaporware, chicharrones selvage seitan subway tile jean shorts humblebrag post-ironic. Tattooed live-edge readymade, vice cold-pressed swag tousled lomo air plant. Edison bulb bitters actually banjo pok pok hammock single-origin coffee stumptown knausgaard direct trade pinterest yr locavore jean shorts.

Lorem ipsum dolor amet gastropub meditation tumblr hashtag. Meggings cornhole prism +1 sriracha authentic la croix street art af typewriter poke. Tumblr YOLO freegan thundercats fixie, craft beer shoreditch humblebrag. Ramps kinfolk roof party waistcoat ennui prism. Authentic edison bulb iceland letterpress yr.

Lorem ipsum dolor amet gastropub meditation tumblr hashtag. Meggings cornhole prism +1 sriracha authentic la croix street art af typewriter poke. Tumblr YOLO freegan thundercats fixie, craft beer shoreditch humblebrag. Ramps kinfolk roof party waistcoat ennui prism. Authentic edison bulb iceland letterpress yr.

top

default: undefined

Top: space 5

width

default: undefined

"full"
"70%"
"300px"
5 (token value)

© Copyright 2020 Mediahuis NV. All rights Reserved