Documentation
Styling

Advanced Styling

Kitchn provides a powerful set of styling capabilities that allow you to create highly customizable and responsive React components. This guide will walk you through how to use these styling features effectively and provide a detailed props reference.

Usage

Here's a simple example of how to use the styling props:

Props

Layout Props

NameTypeDescription
displayCSSProperties["display"] (opens in a new tab)The display CSS property.
width | wCSSProperties["width"] (opens in a new tab) | keyof Gap | keyof BreakpointThe width CSS property.
height | hCSSProperties["height"] (opens in a new tab) | keyof Gap | keyof BreakpointThe height CSS property.
minWidth | minWCSSProperties["minWidth"] (opens in a new tab) | keyof Gap | keyof BreakpointThe min-width CSS property.
minHeight | minHCSSProperties["minHeight"] (opens in a new tab) | keyof Gap | keyof BreakpointThe min-height CSS property.
maxWidth | maxWCSSProperties["maxWidth"] (opens in a new tab) | keyof Gap | keyof BreakpointThe max-width CSS property.
maxHeight | maxHCSSProperties["maxHeight"] (opens in a new tab) | keyof Gap | keyof BreakpointThe max-height CSS property.

Typography Props

NameTypeDescription
fontCSSProperties["fontSize"] (opens in a new tab) | keyof SizeThe font-size CSS property.

Background Props

NameTypeDescription
background | bgCSSProperties["background"] (opens in a new tab) | keyof LayoutColorsThe background CSS property.
backgroundColor | bgcCSSProperties["backgroundColor"] (opens in a new tab) | keyof LayoutColorsThe background-color CSS property.
backgroundAccent | bgakeyof AccentColorsThe background CSS property.

Border Props

NameTypeDescription
borderStyle | bsCSSProperties["borderStyle"] (opens in a new tab)The border-style CSS property.
borderWidth | bwCSSProperties["borderWidth"] (opens in a new tab)The border-width CSS property.
borderLeftWidth | blwCSSProperties["borderLeftWidth"] (opens in a new tab)The border-left-width CSS property.
borderRightWidth | brwCSSProperties["borderRightWidth"] (opens in a new tab)The border-right-width CSS property.
borderTopWidth | btwCSSProperties["borderTopWidth"] (opens in a new tab)The border-top-width CSS property.
borderBottomWidth | bbwCSSProperties["borderBottomWidth"] (opens in a new tab)The border-bottom-width CSS property.
borderColor | bcCSSProperties["borderColor"] (opens in a new tab) | keyof LayoutColorsThe border-color CSS property.
borderLeftColor | blcCSSProperties["borderLeftColor"] (opens in a new tab) | keyof LayoutColorsThe border-left-color CSS property.
borderRightColor | brcCSSProperties["borderRightColor"] (opens in a new tab) | keyof LayoutColorsThe border-right-color CSS property.
borderTopColor | btcCSSProperties["borderTopColor"] (opens in a new tab) | keyof LayoutColorsThe border-top-color CSS property.
borderBottomColor | bbcCSSProperties["borderBottomColor"] (opens in a new tab) | keyof LayoutColorsThe border-bottom-color CSS property.
borderRadius | brCSSProperties["borderRadius"] (opens in a new tab) | keyof RadiusThe border-radius CSS property.
borderTopLeftRadius | btlrCSSProperties["borderTopLeftRadius"] (opens in a new tab) | keyof RadiusThe border-top-left-radius CSS property.
borderTopRightRadius | btrrCSSProperties["borderTopRightRadius"] (opens in a new tab) | keyof RadiusThe border-top-right-radius CSS property.
borderBottomLeftRadius | bblrCSSProperties["borderBottomLeftRadius"] (opens in a new tab) | keyof RadiusThe border-bottom-left-radius CSS property.
borderBottomRightRadius | bbrrCSSProperties["borderBottomRightRadius"] (opens in a new tab) | keyof RadiusThe border-bottom-right-radius CSS property.

Spacing Props

NameTypeDescription
margin | mCSSProperties["margin"] (opens in a new tab) | keyof GapThe margin CSS property.
marginLeft | mlCSSProperties["marginLeft"] (opens in a new tab) | keyof GapThe margin-left CSS property.
marginRight | mrCSSProperties["marginRight"] (opens in a new tab) | keyof GapThe margin-right CSS property.
marginTop | mtCSSProperties["marginTop"] (opens in a new tab) | keyof GapThe margin-top CSS property.
marginBottom | mbCSSProperties["marginBottom"] (opens in a new tab) | keyof GapThe margin-bottom CSS property.
mxCSSProperties["margin"] (opens in a new tab) | keyof GapThe margin CSS property for the x-axis.
myCSSProperties["margin"] (opens in a new tab) | keyof GapThe margin CSS property for the y-axis.
padding | pCSSProperties["padding"] (opens in a new tab) | keyof GapThe padding CSS property.
paddingLeft | plCSSProperties["paddingLeft"] (opens in a new tab) | keyof GapThe padding-left CSS property.
paddingRight | prCSSProperties["paddingRight"] (opens in a new tab) | keyof GapThe padding-right CSS property.
paddingTop | ptCSSProperties["paddingTop"] (opens in a new tab) | keyof GapThe padding-top CSS property.
paddingBottom | pbCSSProperties["paddingBottom"] (opens in a new tab) | keyof GapThe padding-bottom CSS property.
pxCSSProperties["padding"] (opens in a new tab) | keyof GapThe padding CSS property for the x-axis.
pyCSSProperties["padding"] (opens in a new tab) | keyof GapThe padding CSS property for the y-axis.

Positioning Props

NameTypeDescription
position | posCSSProperties["position"] (opens in a new tab)The position CSS property.
zIndex | ziCSSProperties["zIndex"] (opens in a new tab)The z-index CSS property.
left | lCSSProperties["left"] (opens in a new tab)The left CSS property.
right | rCSSProperties["right"] (opens in a new tab)The right CSS property.
top | tCSSProperties["top"] (opens in a new tab)The top CSS property.
bottom | bCSSProperties["bottom"] (opens in a new tab)The bottom CSS property.

Interaction Props

NameTypeDescription
overflowCSSProperties["overflow"] (opens in a new tab)The overflow CSS property.
cursorCSSProperties["cursor"] (opens in a new tab)The cursor CSS property.
pointerEventsCSSProperties["pointerEvents"] (opens in a new tab)The pointer-events CSS property.
userSelectCSSProperties["userSelect"] (opens in a new tab)The user-select CSS property.