Skip to content

Flex-box

Box

Component responsible for spacings and sizes 📐

jsx
import { Box } from '@semcore/ui/base-components';
<Box />;

BoxProps

& {...}
NameTypeDescription
tag Custom tag to render
classNamestring HTML class name attribute
style HTML style attribute
display CSS `display` property
inlineboolean Sets the `inline-block` property
boxSizingboolean | "border-box" CSS `box-sizing: border-box` property
flex CSS `flex` property
mnumber | string CSS `margin` property
mtnumber | string CSS `margin-top` property
mrnumber | string CSS `margin-right` property
mbnumber | string CSS `margin-bottom` property
mlnumber | string CSS `margin-left` property
mxnumber | string CSS `margin-left` and `margin-right` property
mynumber | string CSS `margin-top` and `margin-bottom` property
pnumber | string CSS `padding` property
ptnumber | string CSS `padding-top` property
prnumber | string CSS `padding-right` property
pbnumber | string CSS `padding-bottom` property
plnumber | string CSS `padding-left` property
pxnumber | string CSS `padding-left` and `padding-right` property
pynumber | string CSS `padding-top` and `padding-bottom` property
wnumber | string CSS `width` property. If its value is less than 1, is considered as a fraction of 100%. If its value is more than 1, is considered as value in px, if it is a string, is passed as is.
wMinnumber | string CSS `min-width` property. If its value is less than 1, is considered as a fraction of 100%. If its value is more than 1, is considered as value in px, if it is a string, is passed as is.
wMaxnumber | string CSS `max-width` property. If its value is less than 1, is considered as a fraction of 100%. If its value is more than 1, is considered as value in px, if it is a string, is passed as is.
hnumber | string CSS `height` property. If its value is less than 1, is considered as a fraction of 100%. If its value is more than 1, is considered as value in px, if it is a string, is passed as is.
hMinnumber | string CSS `min-height` property. If its value is less than 1, is considered as a fraction of 100%. If its value is more than 1, is considered as value in px, if it is a string, is passed as is.
hMaxnumber | string CSS `max-height` property. If its value is less than 1, is considered as a fraction of 100%. If its value is more than 1, is considered as value in px, if it is a string, is passed as is.
scaleIndentnumber Multiplier of all indents. For example, if you specify a margin-top equal to 3 (mt = {3}), it will be 12px (3 * 4 = 12).
innerOutlineboolean Flag for render outline inside box
invertOutlineboolean Flag for render inverted outline
inAfterOutlineboolean Flag for render outline in the ::after element
position CSS `position` property
topnumber | string CSS `top` property
leftnumber | string CSS `left` property
bottomnumber | string CSS `bottom` property
rightnumber | string CSS `right` property
insetstring CSS `inset` property
zIndexnumber CSS `z-index` property
textAlign CSS `text-align` property
children Box content
hoverCursor Hover cursor
bg | | Background
borderRadius | Border radius
border Border
cssanyDeprecated Old way to add custom style
focusRingTopOffset Focus ring offset (top)
focusRingLeftOffset Focus ring offset (left)
focusRingRightOffset Focus ring offset (right)
focusRingBottomOffset Focus ring offset (bottom)

Flex

The layout building component is a wrapper over CSS-flex. It inherits all properties from Box.

jsx
import { Flex } from '@semcore/ui/base-components';
<Flex />;

FlexProps

& {...}
NameTypeDescription
inlineboolean It manages the `inline-flex` property
reverseboolean Adds the `reverse` property to `flex-direction`
flexWrapboolean It manages the `flex-wrap` property
direction It manages the `flex-direction` property
alignItems It manages the `align-items` property
alignContent It manages the `align-content` property
justifyContent CSS `justify-content` property
gap CSS `gap` property
rowGap CSS `gap` property
columnGap CSS `gap` property
scaleIndentnumber Multiplier of all indents. For example, if you specify a margin-top equal to 3 (mt = {3}), it will be 12px (3 * 4 = 12).

Released under the MIT License.

Released under the MIT License.