Skip to main content

Box

Description

The most basic of all components, all other layout components are based on this one. Implements some props for layout definition and should be used at the lowest level when defining new components.

Demo

import { Box } from "@neui/layout";
Live Editor
Result
Loading...

Props

CSS PropExtendsRenderAs PropRenders by default
undefineddiv
NameCSS Rule(s)Description
paddingpaddingSets the component's padding
paddingXpadding-left, padding-rightSets the component's X-axis padding
paddingYpadding-top, padding-bottomSets the component's Y-axis padding
paddingToppadding-topSets the component's top padding
paddingRightpadding-rightSets the component's right padding
paddingBottompadding-bottomSets the component's bottom padding
paddingLeftpadding-leftSets the component's toleftp padding
marginmarginSets the component's margin
marginXmargin-left, margin-rightSets the component's X-axis margin
marginYmargin-top, margin-bottomSets the component's Y-axis margin
marginTopmargin-topSets the component's top margin
marginRightmargin-rightSets the component's right margin
marginBottommargin-bottomSets the component's bottom margin
marginLeftmargin-leftSets the component's left margin
sizewidth, heightSets the component's size by setting width and height
widthwidthSets the component's width
heightheightSets the component's height
minWidthmin-widthSets the component's min-width
maxWidthmax-widthSets the component's max-width
minHeightmin-heightSets the component's min-height
maxHeightmax-heightSets the component's max-height
aspectRatioaspect-ratioSets the component's aspect-ratio