Box
COMPONENT

LAYOUT / BOX

Box

Lightweight styled container accepting all StyleProps — great for inset subcards, rounded icon wells, status indicator dots, gradient tiles, and bordered callouts.

Signature#

SIGNATURE
<Box
  padding={12}
  background="theme.faint"
  cornerRadius={12}
  borderColor="theme.divider"
  borderWidth={1}
>
  <Text fontWeight="semibold">Subcard</Text>
</Box>
Box · r12 · pad 12
Subcard

Props#

Inherits all StyleProps, commonly paired with:

backgroundstringOptional
Solid background token (e.g. "theme.faint"), hex color, or "clear".
gradientGradientSpecOptional
Gradient fill { colors: ["#0EA5E9", "#6366F1"], kind?: "linear" }.
materialstringOptional
Native vibrancy material: "ultraThin", "thin", "regular", "thick", "pill", or "glass".
cornerRadiusnumberOptional
Continuous corner radius in points.
clipbooleanOptional
Mask overflowing children to cornerRadius.
borderColorstringOptional
Stroke color used alongside borderWidth.
borderWidthnumberOptional
Stroke thickness in points.
widthnumberOptional
Fixed width in points (e.g. width={8} height={8} cornerRadius={4} for status dots).
heightnumberOptional
Fixed height in points.

Example: Status Dot, Icon Tile & Gradient#

TSX
<Box width={10} height={10} cornerRadius={5}
  background="theme.success" />

<Box width={36} height={36}
  cornerRadius={10}
  background="theme.accent">
  <Icon name="bolt.fill" color="#FFFFFF" />
</Box>

<Box padding={10} cornerRadius={12}
  gradient={{
    colors: ["#0EA5E9", "#6366F1"],
  }}>
  <Text color="#FFFFFF">Gradient Box</Text>
</Box>
Dot · Tile · Gradient
Gradient Box