Box

All props are optional. Generic Props like Events and HTML-Attributes are passed automatically.

Props to define a Grid#

NameTypeDefaultDescription
breakpoints[][0, 432, 768, 1024, 1200, 1400]Breakpoints in Pixels, in ascending order starting with zero.
colspanNumber Number[]1Number of columns.
controlBooleanfalseEnable visual control via ESC-Key.
controlColorString'rgba(0, 0, 0, 0.1)'Custom color for the grid-control.

Props for layouting and special features#

NameTypeDefaultDescription
colsNumber Number[]nullWidth of the Box. Falls back to width of parent Box or Grid. Unit: Grid-columns defined with the prop "colspan". The value 0 sets display: none;.
componentReactElementnullRender a React Component instead of a normal Box. Useful for Framer Motion.
stylesString String[]nullCustom styles with styled-components.
onResizeFunctionnullPass a resize handler. Is also triggered on first render. ⚠️ Caution: Uses Resize Observer internally, so it just works with newer browsers! See https://caniuse.com/resizeobserver
onIntersectFunctionnullPass a intersection handler. Is also triggered on first render. ⚠️ Caution: Uses Intersection Observer internally, so it just works with newer browsers! See https://caniuse.com/intersectionobserver
rootHTML-Element DocumentnullIntersection Observer’s root
rootMarginstring0pxIntersection Observer’s rootMargin
thresholdnumber number[]0Intersection Observer’s threshold
refReact Ref-ObjectnullPass a ref.
asString'div'HTML-Tag

Props for Styling#