utilities
border

Border

Bamboo's border utilities.

Bamboo provides CSS properties for styling borders.

Every group below has a logical counterpart that resolves against the document's writing mode. borderStartWidth emits border-inline-start-width, which is the left edge in LTR and the right edge in RTL. The radius shorthands compose corners rather than mapping to a single property: borderStartRadius sets border-start-start-radius and border-end-start-radius.

Compound Properties

The border compound property maps to the borders token category.

PropCSS PropertyToken Category
borderborderborders
borderX , borderInlineborderInlineborders
borderY , borderBlockborderBlockborders
borderStart , borderInlineStartborderInlineStartborders
borderEnd , borderInlineEndborderInlineEndborders

Border Radius

<div className={css({ borderRadius: 'md' })} />
<div className={css({ rounded: 'md' })} /> // shorthand
<div className={css({ roundedTop: 'md' })} /> // one side
<div className={css({ roundedTopLeft: 'md' })} /> // one corner
PropCSS PropertyToken Category
rounded,borderRadiusborder-radiusradii
roundedTopLeft,borderTopLeftRadiusborder-top-left-radiusradii
roundedTopRight,borderTopRightRadiusborder-top-right-radiusradii
roundedBottomRight,borderBottomRightRadiusborder-bottom-right-radiusradii
roundedBottomLeft,borderBottomLeftRadiusborder-bottom-left-radiusradii
roundedTop,borderTopRadiusborder-top-{left+right}-radiusradii
roundedRight,borderRightRadiusborder-{top+bottom}-right-radiusradii
roundedBottom,borderBottomRadiusborder-bottom-{left+right}-radiusradii
roundedLeft,borderLeftRadiusborder-{top+bottom}-left-radiusradii

Logical Properties

<div className={css({ borderStartRadius: 'md' })} />
<div className={css({ roundedStart: 'md' })} /> // shorthand
PropCSS PropertyToken Category
roundedStartStart,borderStartStartRadiusborder-start-start-radiusradii
roundedStartEnd,borderStartEndRadiusborder-start-end-radiusradii
roundedStart,borderStartRadiusborder-{start+end}-start-radiusradii
roundedEndStart,borderEndStartRadiusborder-end-start-radiusradii
roundedEndEnd,borderEndEndRadiusborder-end-end-radiusradii
roundedEnd ,borderEndRadiusborder-{start+end}-end-radiusradii

Border Width

<div className={css({ borderWidth: '1px' })} />
<div className={css({ borderTopWidth: '1px' })} /> // one side
PropCSS Property
borderWidthborder-width
borderTopWidthborder-top-width
borderLeftWidthborder-left-width
borderRightWidthborder-right-width
borderBottomWidthborder-bottom-width
borderXWidth , borderInlineWidthborder-{left+right}-width
borderYWidth , borderBlockWidthborder-{top+bottom}-width

Logical Properties

<div className={css({ borderStartWidth: '1px' })} />
PropCSS Property
borderStartWidth , borderInlineStartWidthborder-inline-start-width
borderEndWidth , borderInlineEndWidthborder-inline-end-width

Border Color

The border color utilities are used to set the border color of an element. It references the colors token category.

<div className={css({ borderColor: 'primary' })} />
<div className={css({ borderTopColor: 'primary' })} /> // one side
PropCSS PropertyToken Category
borderColorborder-colorcolors
borderTopColorborder-top-colorcolors
borderLeftColorborder-left-colorcolors
borderRightColorborder-right-colorcolors
borderBottomColorborder-bottom-colorcolors

Logical Properties

<div className={css({ borderInlineStartColor: 'red.500' })} />
PropCSS PropertyToken Category
borderStartColor , borderInlineStartColorborder-inline-start-colorcolors
borderEndColor , borderInlineEndColorborder-inline-end-colorcolors
borderXColor, borderInlineColorborder-inline-colorcolors
borderYColor, borderBlockColorborder-block-colorcolors