Theme Variables

Theme Variables

VariableType
colorBodystring
colorBodyAccentstring
colorBodyContentstring
colorBodySubContentstring
colorBorderstring
colorErrorstring
colorErrorAccentstring
colorErrorContentstring
colorInfostring
colorInfoAccentstring
colorInfoContentstring
colorPrimarystring
colorPrimaryAccentstring
colorPrimaryContentstring
colorSecondarystring
colorSecondaryAccentstring
colorSecondaryContentstring
colorSuccessstring
colorSuccessAccentstring
colorSuccessContentstring
colorWarningstring
colorWarningAccentstring
colorWarningContentstring
fontFamilystring
fontLineHeightstring
fontSizeHeading1string
fontSizeHeading2string
fontSizeHeading3string
fontSizeHeading4string
fontSizeHeading5string
fontSizeHeading6string
fontSizeLargestring
fontSizeRegularstring
fontSizeRootstring
fontSizeSmallstring
fontWeightBoldstring
fontWeightMediumstring
fontWeightRegularstring
fontWeightSemiboldstring
focusRingColorstring
focusRingWidthstring
shadowRestingstring
shadowTopmoststring
badgeRadiusstring
buttonRadiusstring
inputAdornmentColorstring
inputBackgroundColorstring
inputBorderColorstring
inputBorderWidthstring
inputContentColorstring
inputDescriptionColorstring
inputDisabledBackgroundColorstring
inputErrorColorstring
inputLabelColorstring
inputLabelFontSizestring
inputLabelFontWeightstring
inputPlaceholderColorstring
inputRadiusstring
transitionDurationstring

Usage

To customize the theme, pass a partial theme object to the GustoProvider:

import { GustoProvider } from '@gusto/embedded-react-sdk'

function App() {
  return (
    <GustoProvider
      theme={{
        colorPrimary: '#007bff',
        fontSizeRegular: '18px',
        inputRadius: '12px',
      }}
    >
      {/* Your app content */}
    </GustoProvider>
  )
}

Default Values

The theme uses sensible defaults for all variables. You only need to specify the variables you want to customize.