基础布局构建块。
此组件基于 div
元素并支持 常用 margin 属性。
只有 display
属性值是 Box 组件独有的。
属性 | 类型 | 默认值 |
---|---|---|
as | "div" | "span" | "div" |
asChild | 布尔值 | |
display | Responsive<"none" | "inline" | "inline-block" | "block"> |
以下属性在 Box、Flex、Grid、Container 和 Section 组件之间共享。有关布局组件的更多信息,请阅读 布局。
属性 | 类型 | 默认值 |
---|---|---|
p | Responsive<枚举 | 字符串> | |
px | Responsive<枚举 | 字符串> | |
py | Responsive<枚举 | 字符串> | |
pt | Responsive<枚举 | 字符串> | |
pr | Responsive<枚举 | 字符串> | |
pb | Responsive<枚举 | 字符串> | |
pl | Responsive<枚举 | 字符串> | |
width | Responsive<字符串> | |
minWidth | Responsive<字符串> | |
maxWidth | Responsive<字符串> | |
height | Responsive<字符串> | |
minHeight | Responsive<字符串> | |
maxHeight | Responsive<字符串> | |
position | Responsive<枚举> | |
inset | Responsive<枚举 | 字符串> | |
top | Responsive<枚举 | 字符串> | |
right | Responsive<枚举 | 字符串> | |
bottom | Responsive<枚举 | 字符串> | |
left | Responsive<枚举 | 字符串> | |
overflow | Responsive<枚举> | |
overflowX | Responsive<枚举> | |
overflowY | Responsive<枚举> | |
flexBasis | Responsive<字符串> | |
flexShrink | Responsive<枚举 | 字符串> | |
flexGrow | Responsive<枚举 | 字符串> | |
gridArea | Responsive<字符串> | |
gridColumn | Responsive<字符串> | |
gridColumnStart | Responsive<字符串> | |
gridColumnEnd | Responsive<字符串> | |
gridRow | Responsive<字符串> | |
gridRowStart | Responsive<字符串> | |
gridRowEnd | Responsive<字符串> |