Skip to main content

Box 盒子

使用场景#

跨端原子组件,支持所有 Style Props,支持快捷消费 Design Tokens。

示例#

基本示例#

Hello World
inline

边框盒子#

除了使用 Design Tokens,也可以直接使用 CSS value。

border box
border box
inline

改变渲染元素#

通过 as 属性改变渲染的目标 HTML 元素。

inline

API#

字段描述
asany
styleCSSProperties
classNamestring
mStringOrNumber
marginStringOrNumber
mtStringOrNumber
marginTopStringOrNumber
mrStringOrNumber
marginRightStringOrNumber
mbStringOrNumber
marginBottomStringOrNumber
mlStringOrNumber
marginLeftStringOrNumber
mxStringOrNumber
marginXStringOrNumber
myStringOrNumber
marginYStringOrNumber
pStringOrNumber
paddingStringOrNumber
ptStringOrNumber
paddingTopStringOrNumber
prStringOrNumber
paddingRightStringOrNumber
pbStringOrNumber
paddingBottomStringOrNumber
plStringOrNumber
paddingLeftStringOrNumber
pxStringOrNumber
paddingXStringOrNumber
pyStringOrNumber
paddingYStringOrNumber
colorColor
bgColor
backgroundColorColor
opacityOpacity
widthStringOrNumber
minWidthStringOrNumber
maxWidthStringOrNumber
heightStringOrNumber
minHeightStringOrNumber
maxHeightStringOrNumber
sizeStringOrNumber
displayDisplay
verticalAlignVerticalAlign<0 | (string & {})>
overflowOverflow
overflowXOverflowX
overflowYOverflowY
fontFamilyFontFamily
fontStyleFontStyle
letterSpacingLetterSpacing<0 | (string & {})>
textAlignTextAlign
fontSizestring
fontWeightFontWeight
lineHeightStringOrNumber
alignItemsAlignItems
alignContentAlignContent
justifyItemsJustifyItems
justifyContentJustifyContent
flexWrapFlexWrap
flexDirectionFlexDirection
flexFlex<Length>
flexGrowFlexGrow
flexShrinkFlexShrink
flexBasisFlexBasis<Length>
justifySelfJustifySelf
alignSelfAlignSelf
orderOrder
gridGapGridGap<Length>
gridRowGapGridRowGap<Length>
gridColumnGapGridColumnGap<Length>
gridColumnGridColumn
gridColumnStartGridColumnStart
gridColumnEndGridColumnEnd
gridRowGridRow
gridRowStartGridRowStart
gridRowEndGridRowEnd
gridAreaGridArea
gridTemplateRowsGridTemplateRows<0 | (string & {})>
gridTemplateColumnsGridTemplateColumns<0 | (string & {})>
gridTemplateAreasGridTemplateAreas
borderstring
borderTopstring
borderRightstring
borderBottomstring
borderLeftstring
borderWidthStringOrNumber
borderColorColor
borderTopColorColor
borderRightColorColor
borderBottomColorColor
borderLeftColorColor
borderRadiusstring
positionPosition
zIndexZIndex
topstring
rightstring
bottomstring
leftstring
boxShadowBoxShadow
textShadowTextShadow
Copyright © 2021 Alibaba Inc.
Built with ❤️ by hema-FE.